Lines Matching +full:fast +full:- +full:read

62  * each mapping request has an additional 16Kb added to it - mappings over
63 * 4Mb will be rounded to a 4Mb boundary - thus if there were 8mb, adding
64 * in the 16Kb overhead the mapping would use another 4Mb-16kb - that is
68 #define MAXMAPSIZE (1024*1024*8)-(1024*16) /* map at most 8MB */
73 * Description: fast copy of file - use mmap()/write() loop if possible
74 * Arguments: char *srcPath - name of source file to copy from
75 * char *dstPath - name of target file to copy to
77 * == 0 - replicate source file access/modification times
78 * != 0 - use specified time for access/modification times
80 * == 0 - successful
81 * != 0 - failure
99 return (-1); in copyf()
107 return (-1); in copyf()
125 return (-1); in copyf()
138 return (-1); in copyf()
153 * -- a_mytime == 0: replicate source file access/modification times in copyf()
154 * -- otherwise: use a_mytime for file access/modification times in copyf()
169 return (-1); in copyf()
176 return (-1); in copyf()
186 * Description: fast copy of file - use mmap()/write() loop if possible
187 * Arguments: int srcFd - file descriptor open on source file
188 * int dstFd - file descriptor open on target file
189 * char *srcPath - name of source file (for error messages)
190 * char *dstPath - name of target file (for error messages)
191 * struct stat *a_srcStatbuf - stat structure for source file
192 * long a_iosize - preferred io size for read/write loop
194 * == 0 - successful
195 * != 0 - failure
203 off_t filesize = a_srcStatbuf->st_size; in copyFile()
215 if (S_ISREG(a_srcStatbuf->st_mode) && (filesize > SMALLFILESIZE)) { in copyFile()
228 * remember size of mapping to "unmap" - if the source file in copyFile()
246 * if the source was not mapped into memory, copy via read/write loop in copyFile()
277 /* read next block of data */ in copyFile()
279 n = read(a_srcFd, buf, blocksize); in copyFile()
281 /* end of file - return success */ in copyFile()
285 /* read error - return error */ in copyFile()
292 /* write out block of data just read in */ in copyFile()
295 /* short write/write error - return error */ in copyFile()
324 remains = mapsize - nbytes; in copyFile()
327 (cp + mapsize - remains), remains); in copyFile()
329 remains -= nbytes; in copyFile()
336 /* i/o error - report and exit */ in copyFile()
354 * as a possible errno, it is set when the nfs read in copyFile()
374 filesize -= nbytes; in copyFile()
408 * a file that is local to the current system - if the file is not
411 * Arguments: a_path - [RO, *RO] - (char *)
414 * a_oflag - [RO, *RO] - (int)
416 * a_tmpdir - [RO, *RO] - (char *)
422 * >= 0 - file descriptor opened on the file
423 * == -1 - failed to open - errno contains error code
426 * file descriptor opened on the file is closed - there is no need
456 * source file is remote - must make a local copy in openLocal()
466 return (-1); in openLocal()
478 a_tmpdir, a_tmpdir[n-1] == '/' ? "" : "/", bn); in openLocal()
506 return (-1); in openLocal()