All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo@cn.fujitsu.com>
To: <dsterba@suse.cz>, <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH] btrfs: Return right extent when fiemap gives unaligned offset and len.
Date: Fri, 25 Jul 2014 09:29:05 +0800	[thread overview]
Message-ID: <53D1B2E1.60008@cn.fujitsu.com> (raw)
In-Reply-To: <20140724121721.GW1553@twin.jikos.cz>


-------- Original Message --------
Subject: Re: [PATCH] btrfs: Return right extent when fiemap gives 
unaligned offset and len.
From: David Sterba <dsterba@suse.cz>
To: Qu Wenruo <quwenruo@cn.fujitsu.com>
Date: 2014年07月24日 20:17
> On Fri, Jul 18, 2014 at 09:55:43AM +0800, Qu Wenruo wrote:
>> When page aligned start and len passed to extent_fiemap(), the result is
>> good, but when start and len is not aligned, e.g. start = 1 and len =
>> 4095 is passed to extent_fiemap(), it returns no extent.
>>
>> The problem is that start and len is all rounded down which causes the
>> problem.
> ALIGN rounds up, not down. So the wrong rounding will use incorrect start
> (4096) and finds no extents if there's eg. only one [0,4095].
Sorry for the wrong description in patch.
Should I reword the patch and send a v2 patch?

Thanks,
Qu
>
>> This patch will round down start and round up (start + len) to
>> return right extent.
>>
>> Reported-by: Chandan Rajendra <chandan@linux.vnet.ibm.com>
>> Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
> Reviewed-by: David Sterba <dsterba@suse.cz>


  reply	other threads:[~2014-07-25  1:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-18  1:55 [PATCH] btrfs: Return right extent when fiemap gives unaligned offset and len Qu Wenruo
2014-07-24 12:17 ` David Sterba
2014-07-25  1:29   ` Qu Wenruo [this message]
2014-07-29 12:30     ` David Sterba

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=53D1B2E1.60008@cn.fujitsu.com \
    --to=quwenruo@cn.fujitsu.com \
    --cc=dsterba@suse.cz \
    --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 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.