Page 1 of 1

Preview cannot save changes to ZFS filesystem

PostPosted: Mon Mar 29, 2021 7:27 pm
by ecbaldwin
I tried opening a PDF file in Preview, rotating a page to the right, and then saving the file. It said "The document ... could not be saved." I looked for console message and could not find any related. While I'm a software developer, I don't develop for Macos; I'm more of an end-user.

I checked permissions. The file and the containing folder are owned and writable by my user.

$ ls -la
total 1059
drwxrwxr-x 3 carl staff 3 Mar 29 21:19 .
drwxr-xr-x 8 carl staff 8 Mar 29 20:16 ..
-rw-r--r-- 1 carl staff 398564 Mar 29 21:19 1099-B.pdf

I can export the modified PDF to my Desktop, open and edit it from there, and then drag it to the ZFS filesystem folder using Finder. From there, I can open it in Preview and see the changes.

Re: Preview cannot save changes to ZFS filesystem

PostPosted: Mon Mar 29, 2021 7:28 pm
by ecbaldwin
Here is some information about the filesystem that I've working with.

❯ pwd
/Volumes/zfs/documents/Money/Taxes/2020/Income/IBM ESPP
❯ zfs list
NAME USED AVAIL REFER MOUNTPOINT
zfs 2.31G 65.5G 2.04M /Volumes/zfs
zfs/carl 1.18G 65.5G 1.11G /Volumes/zfs/carl
zfs/documents 1.08G 65.5G 1012M /Volumes/zfs/documents
zfs/e 40.4M 65.5G 1.37M /Volumes/zfs/e
zfs/e/two-factor 39.1M 65.5G 38.8M /Volumes/zfs/e/two-factor
❮ zfs get all zfs/documents
NAME PROPERTY VALUE SOURCE
zfs/documents type filesystem -
zfs/documents creation Mon May 25 17:49 2020 -
zfs/documents used 1.08G -
zfs/documents available 65.5G -
zfs/documents referenced 1012M -
zfs/documents compressratio 1.00x -
zfs/documents mounted no -
zfs/documents quota none default
zfs/documents reservation none default
zfs/documents recordsize 128K default
zfs/documents mountpoint /Volumes/zfs/documents default
zfs/documents sharenfs off default
zfs/documents checksum on default
zfs/documents compression off default
zfs/documents atime on default
zfs/documents devices on default
zfs/documents exec on default
zfs/documents setuid on default
zfs/documents readonly off default
zfs/documents zoned off default
zfs/documents snapdir hidden default
zfs/documents aclmode discard default
zfs/documents aclinherit restricted default
zfs/documents createtxg 266292 -
zfs/documents canmount on default
zfs/documents xattr on default
zfs/documents copies 1 default
zfs/documents version 5 -
zfs/documents utf8only off -
zfs/documents normalization none -
zfs/documents casesensitivity sensitive -
zfs/documents vscan off default
zfs/documents nbmand off default
zfs/documents sharesmb off default
zfs/documents refquota none default
zfs/documents refreservation none default
zfs/documents guid 8427244727211100437 -
zfs/documents primarycache all default
zfs/documents secondarycache all default
zfs/documents usedbysnapshots 94.1M -
zfs/documents usedbydataset 1012M -
zfs/documents usedbychildren 0B -
zfs/documents usedbyrefreservation 0B -
zfs/documents logbias latency default
zfs/documents objsetid 363 -
zfs/documents dedup off default
zfs/documents mlslabel none default
zfs/documents sync standard default
zfs/documents dnodesize legacy default
zfs/documents refcompressratio 1.00x -
zfs/documents written 44.9M -
zfs/documents logicalused 1.07G -
zfs/documents logicalreferenced 1002M -
zfs/documents volmode default default
zfs/documents filesystem_limit none default
zfs/documents snapshot_limit none default
zfs/documents filesystem_count none default
zfs/documents snapshot_count none default
zfs/documents snapdev hidden default
zfs/documents acltype nfsv4 default
zfs/documents context none default
zfs/documents fscontext none default
zfs/documents defcontext none default
zfs/documents rootcontext none default
zfs/documents relatime off default
zfs/documents redundant_metadata all default
zfs/documents overlay on default
zfs/documents encryption off default
zfs/documents keylocation none default
zfs/documents keyformat none default
zfs/documents pbkdf2iters 0 default
zfs/documents special_small_blocks 0 default
zfs/documents com.apple.browse on default
zfs/documents com.apple.ignoreowner off default
zfs/documents com.apple.mimic hfs local
zfs/documents com.apple.devdisk poolonly default

Re: Preview cannot save changes to ZFS filesystem

PostPosted: Mon Mar 29, 2021 7:29 pm
by ecbaldwin
Meant to include this output also.

❯ zfs version
zfs-2.0.0-rc1_452_g964b2a6de7
zfs-kmod-zfs-2.0.0-rc1-452-g964b2a6de7

Re: Preview cannot save changes to ZFS filesystem

PostPosted: Mon Mar 29, 2021 7:29 pm
by ecbaldwin
macOS Big Sur version 11.2.3

Re: Preview cannot save changes to ZFS filesystem

PostPosted: Mon Mar 29, 2021 10:44 pm
by lundman
Preview is blackmagic really, or rather, the "safe save" with generational versions is.

Copied png to ZFS
Open in Preview
Rotate
Save

The Document "file.png" could not be saved. The file is locked.


.. debugging..

Re: Preview cannot save changes to ZFS filesystem

PostPosted: Tue Mar 30, 2021 12:23 am
by lundman
OK, The error I was experiencing was due to our listxattr showing "com.apple.system" when xattr=sa, which is not allowed.

We are close to a new build with many fixes, so please retest when we push that out.

Re: Preview cannot save changes to ZFS filesystem

PostPosted: Tue Mar 30, 2021 8:59 am
by ecbaldwin
You are doing great work! Much appreciated.

Re: Preview cannot save changes to ZFS filesystem

PostPosted: Tue Apr 06, 2021 7:22 pm
by ecbaldwin
I can confirm this is now working on rc2. Despite the rc1 in the output below, I downloaded and installed the package for rc2.

❯ zfs version
zfs-2.0.0-rc1_444_ge0b34dd9c7
zfs-kmod-zfs-2.0.0-rc1-444-ge0b34dd9c7

Re: Preview cannot save changes to ZFS filesystem

PostPosted: Tue Apr 06, 2021 7:33 pm
by lundman
Great thanks.. I clearly need to sort out the release procedure eh. I guess it only sets the version after autogen.

Re: Preview cannot save changes to ZFS filesystem

PostPosted: Mon Apr 10, 2023 2:11 pm
by ynn
this bug is still present for v 2.1.6