Simplify copy-reflink code
Ralph Boehme
slow at samba.org
Tue Apr 2 07:49:57 UTC 2024
Hi David!
If you have the time, can you please take a look at
https://gitlab.com/samba-team/samba/-/merge_requests/3566 ?
I'm basically adding copy-reflink support to vfs_default alongside a new
option "filesystem reflinks" that sets FILE_SUPPORTS_BLOCK_REFCOUNTING
in the share capabilities if enabled..
This works on eg ZFS by just setting "filesystem reflinks = yes".
vfs_btrfs still sets FILE_SUPPORTS_BLOCK_REFCOUNTING if the module is
configured, so there's no behaviour change for btrfs. But for other
filesystems we have the choice of either setting
FILE_SUPPORTS_BLOCK_REFCOUNTING in the module or relying on the new option.
I had initially spotted a bug in vfs_btrfs and after fixing that [1], I
realized that requiring all VFS modules to explicitly code copy-reflink
support into them is not ideal and just moving it to vfs_default
simplifies the modules a lot. The branch still contains the commit and
its revert to demonstrate the problem.
tl;dr:
no change in behaviour, great simplification.
Thanks!
-slow
[1]
<https://gitlab.com/samba-team/samba/-/merge_requests/3566/diffs?commit_id=48d8b9c7ad528790b24de5b1ccbfd8b04a2622cf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20240402/e11edef0/OpenPGP_signature.sig>
More information about the samba-technical
mailing list