From: Josef Bacik <josef@redhat.com>
To: Daniel J Blueman <daniel.blueman@gmail.com>
Cc: Chris Mason <chris.mason@oracle.com>,
Linux BTRFS <linux-btrfs@vger.kernel.org>,
Josef Bacik <josef@redhat.com>
Subject: Re: [2.6.35-rc6 patch] direct I/O submission fixes
Date: Sun, 25 Jul 2010 10:42:24 -0400 [thread overview]
Message-ID: <20100725144224.GA21910@dhcp231-156.rdu.redhat.com> (raw)
In-Reply-To: <AANLkTinGy=mJjXJZ1YmmpHKsvL0E6O0kn2pSPBcQ5mcP@mail.gmail.com>
On Sat, Jul 24, 2010 at 12:01:59AM +0100, Daniel J Blueman wrote:
> Hi Chris,
>
> This fixes some issues relating to direct I/O submission, however a
> further patch will be needed to handle the case where allocation of
> 'dip' fails, which is always dereferenced when finding the ordered
> extent.
>
Hi,
There's an easier way to do this. This patch should fix the problem,
Signed-off-by: Josef Bacik <josef@redhat.com>
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 3232945..7259ef9 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -5815,7 +5815,7 @@ free_ordered:
if (write) {
struct btrfs_ordered_extent *ordered;
ordered = btrfs_lookup_ordered_extent(inode,
- dip->logical_offset);
+ file_offset);
if (!test_bit(BTRFS_ORDERED_PREALLOC, &ordered->flags) &&
!test_bit(BTRFS_ORDERED_NOCOW, &ordered->flags))
btrfs_free_reserved_extent(root, ordered->start,
prev parent reply other threads:[~2010-07-25 14:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-23 23:01 [2.6.35-rc6 patch] direct I/O submission fixes Daniel J Blueman
2010-07-25 14:42 ` Josef Bacik [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=20100725144224.GA21910@dhcp231-156.rdu.redhat.com \
--to=josef@redhat.com \
--cc=chris.mason@oracle.com \
--cc=daniel.blueman@gmail.com \
--cc=linux-btrfs@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).