About Filesystem freeze/thaw in freebsd
Mateusz Guzik
mjguzik at gmail.com
Thu Feb 26 03:38:33 UTC 2015
On Wed, Feb 25, 2015 at 08:22:24PM -0700, andy zhang wrote:
> Thanks, I have already tried "UFSSUSPEND/UFSRESUME ioctls on the
> /dev/ufssuspend", and I found it actually not work. In Linux, if I send
> freeze ioctl, all write operations will be blocked unless I send thaw ioctl.
> While for "UFSSUSPEND/UFSRESUME ioctls", it does not work in that way.
> that is:
> If I send UFSSUSPEND ioctl, I still can do write operations, like create
> files, etc.
>
> I am still looking that the code of ufssuspend, and if that really not
> works, i may implement that in my driver level. thanks for any advice.
>
Can you show your code?
If you inspect ffs_susp_ioctl, you will see it expects fsid as an
argument.
Unless stuff got horribly broken, you can also see that proper usage
results in setting MNTK_SUSPEND flag. Then if you inspect code creating
files, writing etc. you will see it checks for that flag.
--
Mateusz Guzik <mjguzik gmail.com>
More information about the freebsd-fs
mailing list