linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers3@gmail.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-ext4@vger.kernel.org, Theodore Ts'o <tytso@mit.edu>,
	Andreas Dilger <adilger.kernel@dilger.ca>,
	Nick Alcock <nick.alcock@oracle.com>,
	Eric Biggers <ebiggers@google.com>,
	stable@vger.kernel.org
Subject: Re: [PATCH] ext4: evict inline data when writing to memory map
Date: Tue, 14 Mar 2017 16:32:39 -0700	[thread overview]
Message-ID: <20170314233239.GA127087@gmail.com> (raw)
In-Reply-To: <20170313233313.GA23580@infradead.org>

On Mon, Mar 13, 2017 at 04:33:13PM -0700, Christoph Hellwig wrote:
> >     mkfs.ext4 -O inline_data /dev/vdb
> >     mount /dev/vdb /mnt
> >     xfs_io -f /mnt/file \
> > 	-c 'pwrite 0 1' \
> > 	-c 'mmap -w 0 1m' \
> > 	-c 'mwrite 0 1' \
> > 	-c 'fsync'
> 
> Please add this test case to xfstests.

I'm working on this, and I discovered there's still a bug.  After the data is
written with mwrite, if the filesystem is then mount-cycled, the contents of the
file are the old contents rather than the new contents.

I believe this is caused by a bug in ext4_convert_inline_data().  Specifically,
the new block containing the evicted data is journalled using a buffer_head
associated with the block device.  This is wrong because it can overwrite data
that is later written through non-journalled writeback.

I'll look into this more when I have time, but in any case it appears this fix
isn't complete.

Eric

  reply	other threads:[~2017-03-14 23:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-13  0:47 [PATCH] ext4: evict inline data when writing to memory map Eric Biggers
2017-03-13  4:39 ` Andreas Dilger
2017-03-13 23:33 ` Christoph Hellwig
2017-03-14 23:32   ` Eric Biggers [this message]
2017-04-30  4:13     ` Theodore Ts'o
2017-05-01 22:10       ` Eric Biggers

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=20170314233239.GA127087@gmail.com \
    --to=ebiggers3@gmail.com \
    --cc=adilger.kernel@dilger.ca \
    --cc=ebiggers@google.com \
    --cc=hch@infradead.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=nick.alcock@oracle.com \
    --cc=stable@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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).