Problems with xattr / v2.1.6 Monterey (Intel)

All your general support questions for OpenZFS on OS X.

Re: Problems with xattr / v2.1.6 Monterey (Intel)

Postby roemer » Sun Feb 26, 2023 12:21 am

lundman wrote:OK so is there a difference to hfs/apfs in the current behavior? Cos we could make sure to remove empty xattrs. What creates them?

Actually, I think we are doing well:
Regarding normal xattr, zfs matches HFS/ZFS.
Regarding com.apple.FinderInfo, zfs with mimic=apfs|off matches APFS, and with mimic=hfs matches HFS.
Regarding com.apple.ResourceFork, zfs seems to match apfs and zfs, with the exception that apfs/hfs do not list empty resource forks as xattr.

Example with APFS below; note how it gives no error message when writing a ResourceFork, but then I cannot list it as extended attribute, though accessing it using ..namedfork/rsrc seems to work:
Code: Select all
touch testfile-apfs
xattr -w com.apple.ResourceFork ""  testfile-apfs
ls -l@ testfile-apfs
-rw-r--r--  1 user  staff  0 26 Feb 19:05 testfile-apfs
xattr -lx testfile-apfs
       [no output, but also no error]
cat testfile-apfs/..namedfork/rsrc
       [no output, but also no error]
wc testfile-apfs/..namedfork/rsrc
       0       0       0 testfile-apfs/..namedfork/rsrc

With ZFS 2.1.6-99, a 0-length com.apple.ResourceFork xattr is explicitly listed, otherwise everything is the same as with APFS:
Code: Select all
touch testfile-zfs
xattr -w com.apple.ResourceFork '' testfile-zfs
ls -l@ testfile-zfs
-rw-r--r--@ 1 user  staff  0 26 Feb 19:06 testfile-zfs
   com.apple.ResourceFork   0
xattr -lx testfile-zfs
com.apple.ResourceFork:
00000000
cat testfile-zfs/..namedfork/rsrc
       [no output, but also no error]
wc testfile-zfs/..namedfork/rsrc
       0       0       0 testfile-zfs/..namedfork/rsrc

I originally tried only the xattr access and saw a difference in output; but looking at the full picture above including using ..namedfork/rsrc , I think this should be fine. I actually like that ZFS shows with xattr that there is an empty resource fork, while APFS seems to hide it...
roemer
 
Posts: 73
Joined: Sat Mar 15, 2014 2:32 pm

Re: Problems with xattr / v2.1.6 Monterey (Intel)

Postby lundman » Sun Feb 26, 2023 2:06 am

Awesome, thanks for going through all the testing. I'll work on a 1.2.7 release if the corruption gets fixed.
User avatar
lundman
 
Posts: 1337
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: Problems with xattr / v2.1.6 Monterey (Intel)

Postby roemer » Mon Feb 27, 2023 2:09 am

Great - many thanks for your fantastic work!
Very appreciated, and I am looking forward to the release version for Apple Silicon / Ventura ;)

By the way - now that the com.apple.mimic setting has some new meaning, would it make sense to document those in the zfsprops man page,
as well as in the "zfs get" and "zfs set" help texts?
roemer
 
Posts: 73
Joined: Sat Mar 15, 2014 2:32 pm

Re: Problems with xattr / v2.1.6 Monterey (Intel)

Postby o3x_prokyon » Sat Mar 11, 2023 11:28 am

Yes, thanks for your great work and testing roemer and lundman!!! Last week my new M2 Mac has arrived :-D! Are the problems with v2.1.6 also present on Apple Silicon? I guess they are, because the filesystem is the same... So I'm also looking forward to the official release of 2.1.7 for apple silicon/Ventura.
o3x_prokyon
 
Posts: 33
Joined: Thu Dec 01, 2022 1:17 pm

Previous

Return to General Help

Who is online

Users browsing this forum: No registered users and 34 guests

cron