vfs_btrfs: add snapshot create/delete calls
authorDavid Disseldorp <ddiss@samba.org>
Tue, 4 Sep 2012 13:29:58 +0000 (15:29 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 31 Mar 2015 16:40:25 +0000 (18:40 +0200)
commit9b5b46a0921aa86f6b7da77e5735b7386e67af05
treeb5e27ce97b6b29206a58f5f5fc57c38af06b23ce
parent9f95038f9b18084c91c0e12d48629f8c575e73ec
vfs_btrfs: add snapshot create/delete calls

The "btrfs: manipulate snapshots" smb.conf parameter is disabled by
default, to encourage use of, and pass requests through to, the
vfs_snapper module.
When enabled, issue BTRFS_IOC_SNAP_CREATE_V2 and BTRFS_IOC_SNAP_DESTROY
ioctls accordingly. The ioctls are issued as root, so rely on permission
checks in the calling FSRVP server process.

Base share paths must exist as btrfs subvolumes in order to
be supported for snapshot operations.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/modules/vfs_btrfs.c
source3/wscript