Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Feb 2015 04:38:27 +0100
From:      Mateusz Guzik <mjguzik@gmail.com>
To:        andy zhang <zhangxia3@hotmail.com>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: About Filesystem freeze/thaw in freebsd
Message-ID:  <20150226033827.GA3799@dft-labs.eu>
In-Reply-To: <1424920944349-5992079.post@n5.nabble.com>
References:  <COL128-W74C2CE6B8243E74B26A286F62E0@phx.gbl> <54E1B90E.8050101@freebsd.org> <20150216095410.GH34251@kib.kiev.ua> <1424920944349-5992079.post@n5.nabble.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150226033827.GA3799>