Jim Luther wrote:
I don't know that the file system APIs on OSX/iOS support files larger than
LONG_LONG_MAX since they use a signed-64 bit value for offsets.
Assuming a file system supports it, pathconf(path, _PC_FILESIZEBITS) would be
the correct way to determine the maximum file size in bits. _PC_FILESIZEBITS
returns the minimum number of bits required to hold the file system's maximum
file size as a signed integer. The smallest value returned is 32.
This isn't directly related to the question, but I also found that in
addition to returning 64bit on _PC_FILESIZEBITS, if I try to do the same
for xattr:
* Even though ZFS has 64 bit limit on XATTR size, there would appear
to be a
* limit in SMB2 that the bit size returned has to be 18, or we will get an
* error from most XATTR calls (STATUS_ALLOTTED_SPACE_EXCEEDED).
*/
#ifndef AD_XATTR_SIZE_BITS
#define AD_XATTR_SIZE_BITS 18
.. just in case it would save someone having to discover the same.
Lund
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list (Filesystem-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/filesystem-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com