From: Dave Chinner <david@fromorbit.com>
To: Lukas Czerner <lczerner@redhat.com>
Cc: viro@ZenIV.linux.org.uk, bfields@fieldses.org,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [RFC][PATCH] fs: Prevent syncing frozen file system
Date: Fri, 10 Jul 2015 10:49:21 +1000 [thread overview]
Message-ID: <20150710004921.GJ3902@dastard> (raw)
In-Reply-To: <20150709234012.GI3902@dastard>
On Fri, Jul 10, 2015 at 09:40:12AM +1000, Dave Chinner wrote:
> On Thu, Jul 09, 2015 at 07:45:45PM +0200, Lukas Czerner wrote:
> > Currently we can end up in a deadlock because of broken
> > sb_start_write -> s_umount ordering.
> >
> > The race goes like this:
> >
> > - write the file
> > - unlink the file - final_iput will not be calles as file is opened
> > - freeze the file system
> > - Now simultaneously close the file and call sync (or syncfs on that
> > particular file system). Sync will get to wait_sb_inodes() where it will
> > grab the referece to the inode (__iget()) and later to call iput().
>
> This problem goes away with the sync scalability patchset that josef
> has been trying to get merged:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git superblock-scaling
>
> That patchset removes the full sb inodes list walk in
> wait_sb_inodes() and replaces it with a walk of inodes cleaned
> during the sync, which will be an empty list in the case of sync
> running on an empty filesystem. This commit does the work:
s/empty/frozen
-Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2015-07-10 0:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-09 17:45 [RFC][PATCH] fs: Prevent syncing frozen file system Lukas Czerner
2015-07-09 23:40 ` Dave Chinner
2015-07-10 0:49 ` Dave Chinner [this message]
2015-07-10 14:25 ` Jan Kara
2015-07-10 20:42 ` Lukáš Czerner
2015-07-13 8:47 ` Jan Kara
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=20150710004921.GJ3902@dastard \
--to=david@fromorbit.com \
--cc=bfields@fieldses.org \
--cc=lczerner@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).