Lines Matching refs:filebytes

119 	off_t filebytes;
203 filebytes = (off_t)fp->ff_blocks * (off_t)hfsmp->blockSize;
213 (int)uio_offset(uio), uio_resid(uio), (int)filesize, (int)filebytes, 0);
220 (int)uio_offset(uio), uio_resid(uio), (int)filesize, (int)filebytes, 0);
281 off_t filebytes;
395 filebytes = (off_t)fp->ff_blocks * (off_t)hfsmp->blockSize;
467 (int)filebytes, 0);
470 if (writelimit <= filebytes) {
475 bytesToAdd = writelimit - filebytes;
489 while (writelimit > filebytes) {
490 bytesToAdd = writelimit - filebytes;
513 filebytes = (off_t)fp->ff_blocks * (off_t)hfsmp->blockSize;
515 (int)offset, uio_resid(uio), (int)fp->ff_size, (int)filebytes, 0);
525 if ((retval == ENOSPC) && (filebytes > offset)) {
530 writelimit = filebytes;
780 filebytes = (off_t)fp->ff_blocks * (off_t)hfsmp->blockSize;
793 (int)uio_offset(uio), uio_resid(uio), (int)fp->ff_size, (int)filebytes, 0);
2847 off_t filebytes;
2855 filebytes = (off_t)fileblocks * (off_t)blksize;
2858 (int)length, (int)fp->ff_size, (int)filebytes, 0, 0);
2895 retval = hfs_chkdq(cp, (int64_t)(roundup(length - filebytes, blksize)),
2904 if (length > filebytes) {
2917 if (filebytes == 0 &&
2934 while ((length > filebytes) && (retval == E_NONE)) {
2935 bytesToAdd = length - filebytes;
2943 filebytes = (off_t)fp->ff_blocks * (off_t)blksize;
2945 if (length > filebytes)
2946 length = filebytes;
2969 (int)length, (int)fp->ff_size, (int)filebytes, 0, 0);
3101 filebytes = (off_t)fp->ff_blocks * (off_t)blksize;
3106 (void) hfs_chkdq(cp, (int64_t)-(savedbytes - filebytes), NOCRED, 0);
3136 (int)length, (int)fp->ff_size, (int)filebytes, retval, 0);
3238 off_t filebytes;
3249 filebytes = (off_t)fileblocks * (off_t)blksize;
3253 while (filebytes > 0) {
3254 if (filebytes > HFS_BIGFILE_SIZE && overflow_extents(datafork)) {
3255 filebytes -= HFS_BIGFILE_SIZE;
3257 filebytes = 0;
3273 error = MacToVFSError(TruncateFileC(HFSTOVCB(hfsmp), datafork, filebytes, 1, 0, fileid, false));
3278 datafork->ff_size = filebytes;
3294 filebytes = (off_t)fileblocks * (off_t)blksize;
3298 while (filebytes > 0) {
3299 if (filebytes > HFS_BIGFILE_SIZE && overflow_extents(rsrcfork)) {
3300 filebytes -= HFS_BIGFILE_SIZE;
3302 filebytes = 0;
3318 error = MacToVFSError(TruncateFileC(HFSTOVCB(hfsmp), rsrcfork, filebytes, 1, 1, fileid, false));
3323 rsrcfork->ff_size = filebytes;
3349 off_t filebytes;
3365 filebytes = (off_t)fileblocks * (off_t)blksize;
3390 if (length < filebytes) {
3391 while (filebytes > length) {
3392 if ((filebytes - length) > HFS_BIGFILE_SIZE && overflow_extents(fp)) {
3393 filebytes -= HFS_BIGFILE_SIZE;
3395 filebytes = length;
3398 error = do_hfs_truncate(vp, filebytes, flags, skipupdate, context);
3402 } else if (length > filebytes) {
3403 while (filebytes < length) {
3404 if ((length - filebytes) > HFS_BIGFILE_SIZE && overflow_extents(fp)) {
3405 filebytes += HFS_BIGFILE_SIZE;
3407 filebytes = length;
3410 error = do_hfs_truncate(vp, filebytes, flags, skipupdate, context);
3449 off_t filebytes;
3483 filebytes = (off_t)fileblocks * (off_t)vcb->blockSize;
3485 if ((ap->a_flags & ALLOCATEFROMVOL) && (length < filebytes)) {
3504 startingPEOF = filebytes;
3507 length += filebytes;
3512 if (filebytes == length)
3518 * value of filebytes is 0, length will be at least 1.
3520 if (length > filebytes) {
3523 orig_request_size = moreBytesRequested = length - filebytes;
3552 while ((length > filebytes) && (retval == E_NONE)) {
3593 filebytes = (off_t)fp->ff_blocks * (off_t)vcb->blockSize;
3610 if (retval && (startingPEOF == filebytes))
3634 filebytes = (off_t)fp->ff_blocks * (off_t)vcb->blockSize;
3640 if (retval && (startingPEOF == filebytes)) goto Err_Exit;
3643 (void) hfs_chkdq(cp, (int64_t)-((startingPEOF - filebytes)), NOCRED,0);
3646 if (fp->ff_size > filebytes) {
3647 fp->ff_size = filebytes;