Comment 27 for bug 2044657

Revision history for this message
Rob N (robn) wrote : Re: zfs block cloning file system corruption

Hi all,

Patch for 0.8 (and others) available here: https://zfsonlinux.topicbox.com/groups/zfs-discuss/T12876116b8607cdb/lseek-glitch-dirty-dnode-patches-for-older-openzfs-zfs-on-linux

If you didn't want to take all of 2.2.2 or 2.1.14, specific patches for those series are:

https://github.com/robn/zfs/commits/dnode-dirty-data-2.2
https://github.com/robn/zfs/commits/dnode-dirty-data-2.1

Block cloning appears unrelated at this point, though there are multiple cloning-related fixes in 2.2.2, and more on master that (presumably) will land in 2.2.3.

Regarding cloning being "off by default" in 2.2.1, it will still appear "enabled" in the feature list because it is actually enabled in the disk structures. The new module option `zfs_bclone_enabled` is disabled (0) by default, and when disabled it rejects the syscalls that lead cloning to happen. So eg `cp --reflink=always` would return `ENOTSUPP`.