We normally remove an unlinked node when its last user goes away and the node becomes inactive. However, we should not do that if the filesystem is mounted read-only including the case where it has its readonly property set. The node will remain on the unlinked queue, so it will not be leaked.
One particular scenario is when we receive an incremental stream into a mounted read-only filesystem and that stream contains an unlinked file (still on the unlinked queue). If that file is opened before the receive and some time later after the receive it becomes inactive we would remove it and, thus, modify the read-only filesystem. As a result, the filesystem would diverge from its source and further incremental receives would not be possible (without forcing a rollback). You can view, comment on, or merge this pull request online at: https://github.com/openzfs/openzfs/pull/464 -- Commit Summary -- * 0000 zfs_zinactive: do not remove the node if the filesystem is read-only -- File Changes -- M usr/src/uts/common/fs/zfs/zfs_znode.c (14) -- Patch Links -- https://github.com/openzfs/openzfs/pull/464.patch https://github.com/openzfs/openzfs/pull/464.diff -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/openzfs/openzfs/pull/464 ------------------------------------------ openzfs-developer Archives: https://openzfs.topicbox.com/groups/developer/discussions/Tf5d8079d50248fc8-M642bde7c5b4d84da6ba43de0 Powered by Topicbox: https://topicbox.com
