Re: Determine if a file system supports files > 4GB
Re: Determine if a file system supports files > 4GB
- Subject: Re: Determine if a file system supports files > 4GB
- From: Phil Jordan <email@hidden>
- Date: Mon, 12 Aug 2013 22:22:44 +0200
On Mon, Aug 12, 2013 at 7:37 PM, Dragan Milić
<email@hidden> wrote:
I'm working through getattrlist/VOL_CAP_FMT_2TB_FILESIZE approach at the moment, but from what I can see, pathconf(path, _PC_FILESIZEBITS) has the same flaw as bSupports2TBFiles attribute. If, for example, I've got an FAT32 volume connected as an SMB network share, both pathconf(path, _PC_FILESIZEBITS) and bSupports2TBFiles report it supports big files, which is wrong. Maybe that cannot be determined properly and I conclude that from the errno value I get when copying using POSIX/BSD API. When copying to FAT32 volume connected as an external (Firewire/USB) disk, I get errno=EFBIG (as expected). When the same volume is connected as SMB network volume, copying ends up with errno=EINVAL.
Have you tried what happens on ftruncate() to the desired file size on such file systems? Granted, that might actually write 4GB of zeroes to the disk before you get a chance to fill it with real data, which might slow things down and unnecessarily stress the hardware as FAT32 also doesn't support sparse files.
phil
--
http://philjordan.eu/ - Phil Jordan, software development contractor
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden