From: Chris Mason <chris.mason@oracle.com>
To: "Yan, Zheng" <zheng.yan@oracle.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 04/12] Btrfs: Fix disk_i_size update corner case
Date: Wed, 16 Dec 2009 11:21:46 -0500 [thread overview]
Message-ID: <20091216162146.GA3322@think> (raw)
In-Reply-To: <4AFBD69D.60206@oracle.com>
On Thu, Nov 12, 2009 at 05:34:21PM +0800, Yan, Zheng wrote:
> There are some cases file extents are inserted without involving
> ordered struct. In these cases, we update disk_i_size directly,
> without checking pending ordered extent and DELALLOC bit. This
> patch extends btrfs_ordered_update_i_size() to handle these cases.
I'm hitting problems with this one in testing. I think the issue is
that the extent_mutex was protecting us from something like this:
proc1:
process end io for extent [0, 32768]
btrfs_ordered_update_i_size() -- update i_disk_size to 32768
proc2:
process end io for extent [32768, 55536]
btrfs_ordered_update_i_size() find the rbtree entry [0, 32768], exit
proc1:
remove extent [0, 32768] from rbtree
Because the first extent was still in the rbtree, we didn't update
i_size to the full 55536, even though the first extent was fully
processed. I think I've got this fixed by removing the extents from the
rbtree when we're in btrfs_ordered_update_i_size(). The current patch
does this only when an ordered extent was passed in.
-chris
prev parent reply other threads:[~2009-12-16 16:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-12 9:34 [PATCH 04/12] Btrfs: Fix disk_i_size update corner case Yan, Zheng
2009-12-16 16:21 ` Chris Mason [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=20091216162146.GA3322@think \
--to=chris.mason@oracle.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=zheng.yan@oracle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox