[zfs-devel] Quiescing the FS so that an external snapshot service can snapshot ...

Richard Sharpe realrichardsharpe at gmail.com
Tue Jul 14 12:03:26 EDT 2015


Hi folks,

On the project I am working on we think we need some way to stop all
writes (FS activity) so we can commit the ZIL and take a shapshot.

Attached is a patch that I came up with that seems to do the job (at
least with my simple test code ...)

The approach I have taken is to take the teardown lock(s) as a write
lock, but because this is taken and released across two USERLAND
IOCTLs we have to protect ourselves against hangs and crashes in that
userland process.

It has some deficiencies :-) However, it will probably do the job for us.

I am seeking feedback.

-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zfs-freeze-diff-1.patch
Type: text/x-patch
Size: 6904 bytes
Desc: not available
URL: <http://list.zfsonlinux.org/pipermail/zfs-devel/attachments/20150714/9ad4edbe/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_zfs_freeze.c
Type: text/x-csrc
Size: 1212 bytes
Desc: not available
URL: <http://list.zfsonlinux.org/pipermail/zfs-devel/attachments/20150714/9ad4edbe/attachment.c>


More information about the zfs-devel mailing list