linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Roman Gushchin <guro@fb.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	Jan Kara <jack@suse.cz>, Dave Chinner <dchinner@redhat.com>,
	Murphy Zhou <jencce.kernel@gmail.com>,
	"Darrick J . Wong" <djwong@kernel.org>
Subject: Re: [PATCH] writeback, cgroup: do not reparent dax inodes
Date: Mon, 19 Jul 2021 19:13:26 +0100	[thread overview]
Message-ID: <YPXAxo6YzR8Mx/Bm@casper.infradead.org> (raw)
In-Reply-To: <20210719171350.3876830-1-guro@fb.com>

On Mon, Jul 19, 2021 at 10:13:50AM -0700, Roman Gushchin wrote:
> The inode switching code is not suited for dax inodes. An attempt
> to switch a dax inode to a parent writeback structure (as a part
> of a writeback cleanup procedure) results in a panic like this:
[...]
> The crash happens on an attempt to iterate over attached pagecache
> pages and check the dirty flag: a dax inode's xarray contains pfn's
> instead of generic struct page pointers.

I wondered why this happens for DAX and not for other kinds of non-page
entries in the inodes.  The answer is that it's a tagged iteration, and
shadow/swap entries are never tagged; only DAX entries get tagged.

Acked-by: Matthew Wilcox (Oracle) <willy@infradead.org>


  parent reply	other threads:[~2021-07-19 18:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-19 17:13 [PATCH] writeback, cgroup: do not reparent dax inodes Roman Gushchin
2021-07-19 18:04 ` Darrick J. Wong
2021-07-19 18:42   ` Roman Gushchin
2021-07-19 18:13 ` Matthew Wilcox [this message]
2021-07-19 18:42   ` Roman Gushchin

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=YPXAxo6YzR8Mx/Bm@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=dchinner@redhat.com \
    --cc=djwong@kernel.org \
    --cc=guro@fb.com \
    --cc=jack@suse.cz \
    --cc=jencce.kernel@gmail.com \
    --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 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).