Linux-Fsdevel Archive on lore.kernel.org
 help / color / Atom feed
From: Brian Foster <bfoster@redhat.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 1/2] iomap: use page dirty state to seek data over unwritten extents
Date: Wed, 28 Oct 2020 07:31:23 -0400
Message-ID: <20201028113123.GA1610972@bfoster> (raw)
In-Reply-To: <20201027180731.GA32577@infradead.org>

On Tue, Oct 27, 2020 at 06:07:31PM +0000, Christoph Hellwig wrote:
> On Mon, Oct 19, 2020 at 12:55:01PM -0400, Brian Foster wrote:
> > On Thu, Oct 15, 2020 at 10:47:00AM +0100, Christoph Hellwig wrote:
> > > I don't think we can solve this properly.  Due to the racyness we can
> > > always err one side.  The beauty of treating all the uptodate pages
> > > as present data is that we err on the safe side, as applications
> > > expect holes to never have data, while "data" could always be zeroed.
> > > 
> > 
> > I don't think that's quite accurate. Nothing prevents a dirty page from
> > being written back and reclaimed between acquiring the (unwritten)
> > mapping and doing the pagecache scan, so it's possible to present valid
> > data (written to the kernel prior to a seek) as a hole with the current
> > code.
> 
> True.  I guess we need to go back and do another lookup to fully
> solve this problem.  That doesn't change my opinion that this patch
> makes the problem worse.
> 

Yeah. I think it's possible to at least have some internal consistency
(i.e. while we're under locks) if we check the page state first or
somehow or another jump back out of the iomap_apply() sequence to do so.
I hadn't thought about it a ton since the goal of these patches was to
address the post-eof zeroing problem vs. fix seek data/hole.

Brian


  reply index

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-12 14:03 [PATCH 0/2] iomap: zero dirty pages " Brian Foster
2020-10-12 14:03 ` [PATCH 1/2] iomap: use page dirty state to seek data " Brian Foster
2020-10-13 12:30   ` Brian Foster
2020-10-13 22:53   ` Dave Chinner
2020-10-14 12:59     ` Brian Foster
2020-10-14 22:37       ` Dave Chinner
2020-10-15  9:47   ` Christoph Hellwig
2020-10-19 16:55     ` Brian Foster
2020-10-27 18:07       ` Christoph Hellwig
2020-10-28 11:31         ` Brian Foster [this message]
2020-10-12 14:03 ` [PATCH 2/2] iomap: zero cached pages over unwritten extents on zero range Brian Foster
2020-10-15  9:49   ` Christoph Hellwig
2020-10-19 16:55     ` Brian Foster
2020-10-19 18:01       ` Brian Foster
2020-10-20 16:21         ` Brian Foster
2020-10-27 18:15           ` Christoph Hellwig
2020-10-28 11:31             ` Brian Foster
2020-10-23  1:02   ` [iomap] 11b5156248: xfstests.xfs.310.fail kernel test robot

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=20201028113123.GA1610972@bfoster \
    --to=bfoster@redhat.com \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-xfs@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

Linux-Fsdevel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-fsdevel/0 linux-fsdevel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-fsdevel linux-fsdevel/ https://lore.kernel.org/linux-fsdevel \
		linux-fsdevel@vger.kernel.org
	public-inbox-index linux-fsdevel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-fsdevel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git