From: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Christoph Hellwig <hch@lst.de>, Eric Sandeen <sandeen@redhat.com>,
Josef Bacik <josef@redhat.com>,
linux-fsdevel@vger.kernel.org, Ric Wheeler <rwheeler@redhat.com>,
James Bottomley <jbottomley@parallels.com>,
Theodore Ts'o <tytso@mit.edu>
Subject: [RFC][PATCH 0/4] fsfreeze: new API
Date: Wed, 27 Jul 2011 16:30:06 +0900 [thread overview]
Message-ID: <1311751806.2549.83.camel@nausicaa> (raw)
In-Reply-To: <1311215535.2763.20.camel@nausicaa>
There are a few with issues with how freeze works in current kernels:
- Unmounting: It is possible to umount a frozen filesystem; the freeze
code holds an active reference to the superblock so it does not go away.
Since it is not possible to thaw by block device, thawing an unmounted
filesystem involves mounting it again and using the current vfs freeze
API.
- There is no check API: There is no easy way to know whether a
filesystem is frozen or not.
- Foolproofness: Quite often the freeze/thaw process is handled from a
daemon. In such cases we have to make really sure that the process does
not go away or is killed while the filesystem is frozen; there is no
check API so it is not always easy to figure out what is going on. With
the advent of virtualization things got even funnier; in some cases not
even the root user is aware of the existence of such daemon (usually a
guest agent that freezes the guests filesystems before taking a storage
snapshot).
I cooked some patches that add the long missing check ioctls and a new
freeze API, which should (modulo bugs) the current situation:
- Check ioctls
[1/4] fsfreeze: add vfs ioctl to check freeze state
Adds a vfs ioctl to check the freeze state.
[2/4] fsfreeze: add block device ioctl to check freeze state
Adds a block device ioctl to check the freeze state. This is
needed because it possible to umount frozen filesystems.
- New freeze API
[3/4] fsfreeze: add ioctl to create a fd for freeze control
Adds a new ioctl that freezes the indicated filesystem and
returns a file descriptor; as long as that file descriptor is
held open, the filesystem remains open.
[4/4] fsfreeze: add freeze fd ioctls
Adds new ioctls that operate on the file descriptor described in
the previous patch; these can be used to freeze/thaw the
filesystem and check the freeze state of the filesystem, thus
avoiding the need to get new file descriptors constantly.
next prev parent reply other threads:[~2011-07-27 7:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-21 2:32 [PATCH 0/2] fsfreeze: check ioctls Fernando Luis Vazquez Cao
2011-07-21 2:36 ` [PATCH 1/2] fsfreeze: add FIISFROZEN ioctl Fernando Luis Vazquez Cao
2011-07-21 2:41 ` [PATCH 2/2] fsfreeze: add BLKISFROZEN ioctl Fernando Luis Vazquez Cao
2011-07-27 7:30 ` Fernando Luis Vazquez Cao [this message]
2011-07-27 7:32 ` [PATCH 1/4] fsfreeze: add vfs ioctl to check freeze state Fernando Luis Vazquez Cao
2011-07-27 7:34 ` [PATCH 2/4] fsfreeze: add block device " Fernando Luis Vazquez Cao
2011-07-27 7:35 ` [PATCH 3/4] fsfreeze: add ioctl to create a fd for freeze control Fernando Luis Vazquez Cao
2011-07-27 7:36 ` [PATCH 4/4] fsfreeze: add freeze fd ioctls Fernando Luis Vazquez Cao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1311751806.2549.83.camel@nausicaa \
--to=fernando@oss.ntt.co.jp \
--cc=hch@lst.de \
--cc=jbottomley@parallels.com \
--cc=josef@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=rwheeler@redhat.com \
--cc=sandeen@redhat.com \
--cc=tytso@mit.edu \
--cc=viro@ZenIV.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox