All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Chris Mason <chris.mason@fusionio.com>,
	Miao Xie <miaox@cn.fujitsu.com>,
	Josef Bacik <JBacik@fusionio.com>,
	"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH] Btrfs: fix dio write vs buffered read race V2
Date: Mon, 2 Jul 2012 02:19:53 -0400	[thread overview]
Message-ID: <20120702061953.GA20804@infradead.org> (raw)
In-Reply-To: <20120629130510.GY17638@shiny>

On Fri, Jun 29, 2012 at 09:05:10AM -0400, Chris Mason wrote:
> > It is better that update i_size in endio, I think. because during endio, we are sure that
> > the data is flushed into the disk successfully, and can update i_size at ease. and if the
> > error happens when flushing the data into the disk, we also needn't reset i_size.
> 
> I think the i_size update should happen sooner.  The rest of the
> filesystems work that way, and it will have fewer interaction problems
> with the VM.

FYI: XFS only updates i_size in the end_io handler.


      parent reply	other threads:[~2012-07-02  6:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-26 13:42 [PATCH] Btrfs: fix dio write vs buffered read race V2 Josef Bacik
2012-06-28  3:35 ` Miao Xie
2012-06-28 12:34   ` Josef Bacik
2012-06-29  2:18     ` Miao Xie
2012-06-29 13:05       ` Chris Mason
2012-07-01 10:24         ` Miao Xie
2012-07-02  6:19         ` Christoph Hellwig [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=20120702061953.GA20804@infradead.org \
    --to=hch@infradead.org \
    --cc=JBacik@fusionio.com \
    --cc=chris.mason@fusionio.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=miaox@cn.fujitsu.com \
    /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.