JUST ENDED
|

File Systems Q&A

Connect with Apple engineers in the File Systems Q&A on the Apple Developer Forums.

Post

Replies

Boosts

Views

Activity

How to shrink the working set without serving stale content (NSFileProviderReplicatedExtension)
Enlarging the working set is straightforward — every item returned from enumerateItems(for:startingAt:) becomes part of it. But how do we safely remove items? If we exclude a folder from working-set change enumeration, the system shows the user an obsolete version of that folder, because it never calls enumerateItems(for:startingAt:) for it again. (Note: It seems system does call enumerateItems(for:startingAt:) again for materialized folders after extension restart.) What's the intended way to evict items from the working set?
1
0
57
6h
Is enumerateChanges the only mechanism for refreshing materialized folders? (NSFileProviderReplicatedExtension)
On a folder's first visit, the system materializes it via enumerateItems(for:startingAt:). Subsequent visits don't re-enumerate; freshness seems to rely on enumerateChanges(for:from:) on the working set. However, after an extension restart, visiting an already-materialized folder triggers enumerateItems(for:startingAt:) again — even though working-set changes were already consumed. So is enumerateChanges(for:from:) not the sole channel for keeping materialized items fresh? Under what conditions does the system re-enumerate a materialized folder?
1
0
46
7h
Is FSBlockDeviceResource (and other FSResources) thread-safe?
Is FSBlockDeviceResource thread-safe, or do I need to ensure that it’s not written across multiple threads simultaneously? I see that FSBlockDeviceResource is not marked as Sendable in Swift. (This question could also apply to the other FSResources as well if it's simple to answer for them too, but it's just that for my specific use case I'm using FSBlockDeviceResource.)
1
0
44
7h
volumeSupportsPersistentIDsKey semantics
What does volumeSupportsPersistentIDsKey represent and guarantee on macOS? Is it specifically about persistent filesystem object IDs such as fileIdentifierKey / inode / systemFileNumber, or can it refer to other kinds of persistent IDs? For which common volume/filesystem cases would this property be false, and what should I fall back to as file identity in those cases? Thanks!
1
0
39
7h
When to use the new FSExtentType.readOnly?
Is it necessary to switch to the new FSExtentType.readOnly when implementing kernel offloaded IO if my entire volume is read-only and marked as such via requestedMountOptions? (My assumption is "no" since I'd think all writes to the resource at that point should be prevented anyway, but wanted to ask just in case.)
1
0
40
7h
Cloning files between a snapshot and the live volume
Is this functionality on the horizon or available in macOS 27? In lieu of snapshot reversioning, this would go a long way towards improving performance and logistics of restoring from a snapshot. For example, if I create a snapshot on a 2TB volume containing 1.5TB of data, then delete all of the files on that volume, it's logistically infeasible to restore that data back to the same volume without either snapshot reversioning or using clonefile() to recreate the file references on the live volume.
2
0
67
7h
Why is the Secure Erase option not available for SSD media?
There has been a lot of speculation/explanations offered over the years about why this functionality was removed from Disk Utility, but some of it is contradictory. I'd love to hear a definitive answer from the experts – what's the technical reason that Secure Erase is not offered for SSDs?
Replies
3
Boosts
0
Views
71
Activity
6h
How to shrink the working set without serving stale content (NSFileProviderReplicatedExtension)
Enlarging the working set is straightforward — every item returned from enumerateItems(for:startingAt:) becomes part of it. But how do we safely remove items? If we exclude a folder from working-set change enumeration, the system shows the user an obsolete version of that folder, because it never calls enumerateItems(for:startingAt:) for it again. (Note: It seems system does call enumerateItems(for:startingAt:) again for materialized folders after extension restart.) What's the intended way to evict items from the working set?
Replies
1
Boosts
0
Views
57
Activity
6h
Is enumerateChanges the only mechanism for refreshing materialized folders? (NSFileProviderReplicatedExtension)
On a folder's first visit, the system materializes it via enumerateItems(for:startingAt:). Subsequent visits don't re-enumerate; freshness seems to rely on enumerateChanges(for:from:) on the working set. However, after an extension restart, visiting an already-materialized folder triggers enumerateItems(for:startingAt:) again — even though working-set changes were already consumed. So is enumerateChanges(for:from:) not the sole channel for keeping materialized items fresh? Under what conditions does the system re-enumerate a materialized folder?
Replies
1
Boosts
0
Views
46
Activity
7h
Is FSBlockDeviceResource (and other FSResources) thread-safe?
Is FSBlockDeviceResource thread-safe, or do I need to ensure that it’s not written across multiple threads simultaneously? I see that FSBlockDeviceResource is not marked as Sendable in Swift. (This question could also apply to the other FSResources as well if it's simple to answer for them too, but it's just that for my specific use case I'm using FSBlockDeviceResource.)
Replies
1
Boosts
0
Views
44
Activity
7h
volumeSupportsPersistentIDsKey semantics
What does volumeSupportsPersistentIDsKey represent and guarantee on macOS? Is it specifically about persistent filesystem object IDs such as fileIdentifierKey / inode / systemFileNumber, or can it refer to other kinds of persistent IDs? For which common volume/filesystem cases would this property be false, and what should I fall back to as file identity in those cases? Thanks!
Replies
1
Boosts
0
Views
39
Activity
7h
When to use the new FSExtentType.readOnly?
Is it necessary to switch to the new FSExtentType.readOnly when implementing kernel offloaded IO if my entire volume is read-only and marked as such via requestedMountOptions? (My assumption is "no" since I'd think all writes to the resource at that point should be prevented anyway, but wanted to ask just in case.)
Replies
1
Boosts
0
Views
40
Activity
7h
Is enumerateChanges called only for the working set? (NSFileProviderReplicatedExtension)
In an NSFileProviderReplicatedExtension, is enumerateChanges(for:from:) ever called for enumerators other than .workingSet, or is it exclusively used for the working set?
Replies
1
Boosts
0
Views
46
Activity
7h
Cloning files between a snapshot and the live volume
Is this functionality on the horizon or available in macOS 27? In lieu of snapshot reversioning, this would go a long way towards improving performance and logistics of restoring from a snapshot. For example, if I create a snapshot on a 2TB volume containing 1.5TB of data, then delete all of the files on that volume, it's logistically infeasible to restore that data back to the same volume without either snapshot reversioning or using clonefile() to recreate the file references on the live volume.
Replies
2
Boosts
0
Views
67
Activity
7h