• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Determine if a file system supports files > 4GB
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Determine if a file system supports files > 4GB


  • Subject: Re: Determine if a file system supports files > 4GB
  • From: Dragan Milić <email@hidden>
  • Date: Mon, 12 Aug 2013 19:37:55 +0200

On pon 12.08.2013., at 19.06, Jim Luther wrote:

> Not all file systems support pathconf(path, _PC_FILESIZEBITS) and not all support VOL_CAP_FMT_2TB_FILESIZE. That's why my code checks both.

I understand that. I plan to do pathconf(path, _PC_FILESIZEBITS) and if  the result is -1 to fall back to VOL_CAP_FMT_2TB_FILESIZE.

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.

What I actually want to do is to prevent copying of a big file onto a volume that doesn't support that size. I can always allow copying, but it's a bit ridiculous to make a user waiting for 4GB to be copied (which can take quite a while for remote and network volumes) just to end up with an error.

-- Dragan
 _______________________________________________
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


  • Follow-Ups:
    • Re: Determine if a file system supports files > 4GB
      • From: Phil Jordan <email@hidden>
References: 
 >Determine if a file system supports files > 4GB (From: Dragan Milić <email@hidden>)
 >Re: Determine if a file system supports files > 4GB (From: Jim Luther <email@hidden>)
 >Re: Determine if a file system supports files > 4GB (From: Dragan Milić <email@hidden>)
 >Re: Determine if a file system supports files > 4GB (From: Jim Luther <email@hidden>)

  • Prev by Date: Re: Determine if a file system supports files > 4GB
  • Next by Date: Re: Determine if a file system supports files > 4GB
  • Previous by thread: Re: Determine if a file system supports files > 4GB
  • Next by thread: Re: Determine if a file system supports files > 4GB
  • Index(es):
    • Date
    • Thread