All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sage Weil <sage@newdream.net>
To: linux-btrfs@vger.kernel.org
Cc: Yehuda Sadeh <yehuda@hq.newdream.net>
Subject: [PATCH 2/3] Btrfs: fix clone ioctl where range is adjacent to extent
Date: Tue, 19 Oct 2010 15:22:11 -0700	[thread overview]
Message-ID: <1287526932-28369-3-git-send-email-sage@newdream.net> (raw)
In-Reply-To: <1287526932-28369-1-git-send-email-sage@newdream.net>

From: Yehuda Sadeh <yehuda@hq.newdream.net>

We had an edge case issue where the requested range was just
following an existing extent. Instead of skipping to the next
extent, we used the previous one which lead to having zero
sized extents.

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
---
 fs/btrfs/ioctl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 3471b22..f4a3dde 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -1607,7 +1607,7 @@ static noinline long btrfs_ioctl_clone(struct file *file, unsigned long srcfd,
 			}
 			btrfs_release_path(root, path);
 
-			if (key.offset + datal < off ||
+			if (key.offset + datal <= off ||
 			    key.offset >= off+len)
 				goto next;
 
-- 
1.7.0.4


  parent reply	other threads:[~2010-10-19 22:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-19 22:22 [PATCH 0/3] clone ioctl fixes Sage Weil
2010-10-19 22:22 ` [PATCH 1/3] Btrfs: fix delalloc checks in clone ioctl Sage Weil
2010-10-19 22:22 ` Sage Weil [this message]
2010-10-19 22:22 ` [PATCH 3/3] Btrfs: fix lockdep warning on " Sage Weil

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=1287526932-28369-3-git-send-email-sage@newdream.net \
    --to=sage@newdream.net \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=yehuda@hq.newdream.net \
    /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.