All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Fengguang Wu <fengguang.wu@intel.com>
Cc: Jan Kara <jack@suse.cz>,
	linux-fsdevel@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [vfs:for-next] mnt_want_write: possible circular locking dependency detected
Date: Tue, 31 Jul 2012 10:41:21 +0100	[thread overview]
Message-ID: <20120731094121.GG6481@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20120731082943.GB14475@localhost>

On Tue, Jul 31, 2012 at 04:29:43PM +0800, Fengguang Wu wrote:
> Hi Jan,
> 
> I caught the following warning at this commit. Note that the head
> commit actually boots OK, so it may either be not 100% reproduciable,
> or get fixed somewhere in your patchset.

In the next commit, actually.  I'm still not sure about that one -
is "just ignore atime updates on frozen fs" the right approach?

AFAICS, the situation looks so:
	* most of the callers can't hold ->i_mutex
	* main exception is vfs_readdir(); it's not hard to pull that
file_accessed() outside of ->i_mutex there.  The same goes for one 
of the similar bits in coda.
	* another sucker in coda (coda_venus_readdir()) is essentially
a false positive - we are holding ->i_mutex on a directory inode
in coda, end up reading from a regular file on normal fs and update
its atime.  Hell knows; looks more like an annotation problem for me,
even though I'm not sure how to deal with it cleanly.
	* hugetlbfs_file_mmap() just needs file_accessed() moved one line
up.
	* xfs_file_splice_read() doesn't hold ->i_mutex, but it does
hold some XFS lock; might or might not be a problem
	* really ugly one - read request on /dev/loop update atime of
underlying file.  They might bloody well happen from pagefault path,
etc., potentially while doing write(2) into the same file and holding
->i_mutex on it.  Hell knows what's the rigth semantics here...

      reply	other threads:[~2012-07-31  9:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-31  8:29 [vfs:for-next] mnt_want_write: possible circular locking dependency detected Fengguang Wu
2012-07-31  9:41 ` Al Viro [this message]

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=20120731094121.GG6481@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=fengguang.wu@intel.com \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.