Lines Matching defs:file

6  * This file contains Original Code and/or Modifications of Original Code
8 * Version 2.0 (the 'License'). You may not use this file except in
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
88 const char *file;
93 _malloc(uint32_t sz, __unused int type, __unused int flags, const char *file, int line)
109 alloc->file = file;
121 _free(char *ret, __unused int type, const char *file, int line)
141 alloc2->file = file;
250 ErrorLog("tried to access a compressed file of unregistered type %d\n", type);
452 /* this file's xattr didn't have any extra data when we fetched it, so we can synthesize a header from the data in the cnode */
549 ErrorLog("decmpfs_fast_get_state called on unknown file\n");
574 ErrorLog("decmpfs_fast_get_state called on unknown file\n");
586 /* give a compressor a chance to indicate that a compressed file is invalid */
593 /* the file is no longer compressed, so return success */
626 determines whether vp points to a compressed file
646 since named streams of the same file share the same cnode,
660 /* treat the file as compressed, because this gives us a way to block future reads until decompression is done */
666 /* unknown state, assume file is not compressed */
701 /* failed to get the bsd flags so the file is not compressed */
706 /* UF_COMPRESSED is on, make sure the file has the DECMPFS_XATTR_NAME xattr */
712 /* failed to get the xattr so the file is not compressed */
716 /* we got the xattr, so the file is compressed */
720 /* UF_COMPRESSED isn't on, so the file isn't compressed */
746 /* update the ubc's size for this file */
774 /* unknown state, assume file is not compressed */
801 * Compression bit was turned on, make sure the file has the DECMPFS_XATTR_NAME attribute.
820 in that case, we also want to truncate the data fork of the file
825 /* the file had a decmpfs attribute but the type was out of range, so don't muck with the file's data size */
846 /* file is not decompressing */
864 This routine should only be called after a file has already been through decmpfs_file_is_compressed
885 This routine should only be called after a file has already been through decmpfs_file_is_compressed
893 /* file is not compressed, so don't hide this xattr */
995 /* reading past end of file; nothing to do */
1000 /* tried to read from before start of file */
1005 /* adjust size so we don't read past the end of the file */
1062 /* handles a page-in request from vfs for a compressed file */
1111 /* clip the size to the size of the file */
1113 /* truncate the read to the size of the file */
1129 if the file is converting, this must be a recursive call to pagein from underneath a call to decmpfs_decompress_file;
1151 /* the file was decompressed after we started reading it */
1186 /* handles a read request from vfs for a compressed file */
1218 /* truncate the read to the size of the file */
1232 /* truncate the read to the size of the file */
1260 /* give the compressor a chance to adjust the portion of the file that we read */
1266 /* clip the adjusted size to the size of the file */
1268 /* truncate the read to the size of the file */
1278 since we're going to create a upl for the given region of the file,
1338 /* maybe the file is converting to decompressed */
1351 /* the file was decompressed after we started reading it */
1422 call out to the decompressor to free remove any data associated with this compressed file
1423 then delete the file's compression xattr
1457 #pragma mark --- file conversion routines ---
1488 /* convert a compressed file to an uncompressed file */
1513 /* someone else decompressed the file */
1520 /* the file is in an unknown state, so update the state and retry */
1529 /* the file is compressed, so decompress it */
1555 /* special case truncating the file to zero bytes */
1558 /* the caller is trying to grow the file, so we should decompress all the data */
1578 /* tell the buffer cache that this is an empty file */
1581 /* if we got here, we need to decompress the file */
1585 /* loop decompressing data from the file and writing it into the data fork */
1610 /* if the write failed, truncate the file to zero bytes */
1620 ErrorLog("file decompressed to %lld instead of %lld\n", offset, toSize);
1647 /* if we're truncating the file to zero bytes, we'll skip ahead to here */
1652 /* free the compressed data associated with this file */
1660 since we succeeded in writing all of the file data to the data fork
1664 /* if we got this far, the file was successfully decompressed */
1672 DebugLog("new file size %lld\n", filesize);