Re: readdir vs. getdirentriesattr

2015-01-11 Thread James Bucanek
Eric, I would just like to clarify: the new getattrlistbulk() function works on all filesystem. We don't have to check the volume's VOL_CAP_INT_READDIRATTR capability before calling it, correct? James Bucanek Eric Tamura <mailto:etam...@apple.com> December 10, 2014 at 5:57

Re: readdir vs. getdirentriesattr

2015-01-12 Thread James Bucanek
ROR, can be requested to detect error conditions for a specific directory entry. • The method for determining when enumeration is complete is different. You just keep calling getattrlistbulk() until 0 entries are returned. - Jim James Bucanek <mailto:subscri...@gloaming.com> January 11,

Testing the 2TB file size limit

2015-01-24 Thread James Bucanek
Quick question, I know I can check the VOL_CAP_FMT_2TB_FILESIZE volume capabilities bit to determine if files larger than 4GB are supported on a volume. Is there a reasonable test to determine if a filesystem supports files larger than 2TB? James __

API to determine status of System Integrity Protection?

2015-09-04 Thread James Bucanek
Greetings, Is there an API that can be queried to determine if System Integrity Protection is currently enabled on the system? Or, more specifically, is there a way to determine if the filesystem protections are being enforced? For example, is this status reported by sysctl() or statfs()? I

Re: API to determine status of System Integrity Protection?

2015-09-08 Thread James Bucanek
I'll assume by the raging silence that there is no such API. I've filed an enhancement request: rdar #22614669 James James Bucanek <mailto:subscri...@gloaming.com> September 4, 2015 at 1:47 PM Greetings, Is there an API that can be queried to determine if System Integrit

FSEventsCopyUUIDForDevice() occasionally changes value

2015-11-19 Thread James Bucanek
Greetings, I was doing some debugging today and I noticed that FSEventsCopyUUIDForDevice() occasionally returns a different value for a given device. The frequency varies, but the UUID seems to change about every week or so. This apparently has been going on for years. Is this expected behav

Re: FSEventsCopyUUIDForDevice() occasionally changes value

2015-11-20 Thread James Bucanek
Dominic Giampaolo November 20, 2015 at 5:09 AM It's expected if something causes fseventsd to lose track of events and thus reset its history. The main reasons fseventsd can lose track of events is if the system crashes or reboots unexpectedly. An event overrun or fsev

Re: FSEventStream and rename notifications

2016-03-06 Thread James Bucanek
tridiak March 5, 2016 at 9:14 PM I want a way to know a file what a file's new name is. Having event ID X (old name) & X+1 (new name) for file rename (& move) would be really useful. Is there another way to find out what a file's new name is? I am currently iter

Re: FSEventStream and rename notifications

2016-03-07 Thread James Bucanek
Jim Luther <mailto:luthe...@apple.com> March 7, 2016 at 9:01 AM On Mar 6, 2016, at 5:04 PM, James Bucanek <mailto:subscri...@gloaming.com>> wrote: A simpler approach would probably be to create a bookmark of the original file and make sure the bookmark data pref

Unravelling the mysteries of F_PREALLOCATE (on APFS and HFS+)

2017-12-13 Thread James Bucanek
if I punch a "hole" in a files with F_PUNCHHOLE, can I later use F_PREALLOCATE to re-allocate those blocks before I write into them? If so, how would one determine the offset of a hole when setting up fst_posmode, fst_offset, and fst_length? I'm just hoping there are fcntl() and/o

Re: Unravelling the mysteries of F_PREALLOCATE (on APFS and HFS+)

2017-12-14 Thread James Bucanek
Dominic Giampaolo December 14, 2017 at 9:17 AM Which brings me to my first (and biggest) question: F_PEOFPOSMODE allocates from the "physical" end of file. What is the physical end of file? Is is the current size of the file as reported by stat() in the st_size

Re: Unravelling the mysteries of F_PREALLOCATE (about holes)

2017-12-15 Thread James Bucanek
Changing the subject, because this is really a separate question... Dominic Giampaolo December 14, 2017 at 9:17 AM Finally, I've got some new questions as I explore using "holes" and sparse files. Specifically, if I punch a "hole" in a files with F_PUNCHHOLE, can I

So what does VOL_CAP_INT_USERACCESS actually mean?

2018-02-23 Thread James Bucanek
Hello, I have a (low priority) question about the VOL_CAP_INT_USERACCESS volume attribute. I often get the ATTR_CMN_USERACCESS value for files via getattrlist(). Today, while doing unrelated research, I stumbled across the description for VOL_CAP_INT_USERACCESS which says "If this bit is set

How to use mandatory file locking on afpfs volumes

2018-02-26 Thread James Bucanek
More annoying questions... How does one use "AFP-style mandatory file locking" in macOS (10.9...current)? I'm trying to implement file locking/coordination across various filesystems and servers. The man page for getattrlist() includes the following filesystem capability test: VOL_CAP_IN

Re: How to use mandatory file locking on afpfs volumes

2018-03-13 Thread James Bucanek
ADVLOCK=NO. The functionality of open(2) on that volume would appear to directly contradict that capability test. Can anyone explain this? Thanks! James James Bucanek <mailto:subscri...@gloaming.com> February 26, 2018 at 1:11 PM More annoying questions... How does one use "AFP-

Re: How to use mandatory file locking on afpfs volumes

2018-04-03 Thread James Bucanek
March 28, 2018 at 5:15 PM Were you testing this on two different machines simultaneously? The point of AFP locking is to protect the file contents from simultaneous access on different machines, not within the same machine. -Kevin James Bucanek <mailto:subscri...@gloaming.com> March 1

Re: How to use mandatory file locking on afpfs volumes

2018-04-03 Thread James Bucanek
Vivek Verma April 3, 2018 at 11:46 AM Advisory locking as defined by POSIX is bunch of sentences thrown together which make no sense when you actually try to use it in a real world application. AFP's locking protocol (https://developer.apple.com/lib

Some questions about firm links

2019-09-10 Thread James Bucanek via Filesystem-dev
links are opaque filesystem structures that user-land apps cannot plumb. This question is just idle curiosity; I don't currently have any real need to read firm links. Cheers, James Bucanek ___ Do not post admin requests to the list. They will be ig

Exploring APFS volume groups in Catalina

2019-09-10 Thread James Bucanek via Filesystem-dev
etter, more definitive, method for determining the relationship of a system/data volume pair? Thanks, James Bucanek ___ Do not post admin requests to the list. They will be ignored. Filesystem-dev mailing list (Filesystem-dev@lists.apple.com)