lkml.org 
[lkml]   [2011]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/5 resend] VFS: Fix s_umount thaw/write deadlock
On Wed 07-12-11 16:49:20, Matthew Wilcox wrote:
> On Thu, Dec 08, 2011 at 12:16:58AM +0100, Jan Kara wrote:
> > On Tue 06-12-11 06:35:44, Christoph Hellwig wrote:
> > > We make sure to not dirty any new inodes after the first phase of the
> > > freeze, so this should be a BUG_ON/WARN_ON.
> > This is not really true in presence of mmaped writes. To block mmaped
> > writes on a frozen filesystem, we need some synchronization between
> > page_mkwrite() and freezing code. Currently, to avoid any additional
> > locking overhead, we set page dirty and *then* check for filesystem being
> > frozen. Only this order can make sure either the page is written (and
> > write-protected) or the frozen check triggers and we wait... (see the
> > comment in block_page_mkwrite()). The nasty sideeffect of this is that
> > there can be dirty pages & inodes on a frozen filesystem. We are blocked in
> > the page fault of these pages so user cannot write any data to these pages
> > but still they are marked dirty.
>
> Can't we make the mmaps read-only during the freezing process?
But then application will get EFAULT instead of blocking? I don't think
that is acceptable (we'd see lots of applications dying ;).

Honza
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR


\
 
 \ /
  Last update: 2011-12-08 01:07    [W:0.045 / U:2.640 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site