[lkml]   [2012]   [Jan]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: linux-next: build failure after merge of the vfs tree
On Wed 04-01-12 13:50:20, Dave Chinner wrote:
> On Wed, Jan 04, 2012 at 02:17:54AM +0000, Al Viro wrote:
> > I'm still not
> > sure about ->statfs(), BTW - any input on that would be welcome. Can
> > it end up blocked on a frozen fs until said fs is thawed?
> I don't see why this should ever happen - ->statfs has to work on
> read-only filesystems so shoul dnot be modifying state, and hence
> should never need to care about the frozen state of the superblock.
Well, I'm also not aware of a filesystem where ->statfs would wait on
frozen filesystem. Just note that e.g. for stat(2) frozen filesystem and
RO filesystem *are* different because of atime updates. So stat(2) can
block on frozen fs because of atime update while on RO filesystem it is
just fine.

> So from a ->statfs POV, a frozen filesystem should look just like a
> read-only filesystem. If frozen filesystems are holding locks that
> ->statfs can block on until the filesystem us thawed, then I'd
> consider that a bug in the filesystem freeze implementation....
In an ideal world yes. Practically, current freeze code has races
(vfs_check_frozen() is a totally racy check) which can leave processes
waiting for frozen fs with filesystem locks held. I believe we need
something like mnt_want_write()/mnt_drop_write() for freezing code in
->page_mkwrite() and ->write_begin/->write_end. I'm now looking into how
to do that in the best way.

> > to convert ustat(2) to "wait for thaw" semantics (should be interruptible,
> > BTW) or document that ->statfs() is not allowed to wait for thawing.
> > It's far too subtle to leave undocumented...
> The latter, IMO.

Jan Kara <>

 \ /
  Last update: 2012-01-04 19:03    [W:0.035 / U:13.072 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site