linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Qu Wenruo <quwenruo@cn.fujitsu.com>
Cc: linux-btrfs@vger.kernel.org, kilobyte@angband.pl
Subject: Re: [PATCH] btrfs: Remove false alert when fiemap range is smaller than on-disk extent
Date: Tue, 27 Jun 2017 15:14:40 +0200	[thread overview]
Message-ID: <20170627131440.GW2866@suse.cz> (raw)
In-Reply-To: <20170622020121.8381-1-quwenruo@cn.fujitsu.com>

On Thu, Jun 22, 2017 at 10:01:21AM +0800, Qu Wenruo wrote:
> Commit 4751832da990 ("btrfs: fiemap: Cache and merge fiemap extent before
> submit it to user") introduced a warning to catch unemitted cached
> fiemap extent.
> 
> However such warning doesn't take the following case into consideration:
> 
> 0			4K			8K
> |<---- fiemap range --->|
> |<----------- On-disk extent ------------------>|
> 
> In this case, the whole 0~8K is cached, and since it's larger than
> fiemap range, it break the fiemap extent emit loop.
> This leaves the fiemap extent cached but not emitted, and caught by the
> final fiemap extent sanity check, causing kernel warning.
> 
> This patch removes the kernel warning and renames the sanity check to
> emit_last_fiemap_cache() since it's possible and valid to have cached
> fiemap extent.
> 
> Reported-by: David Sterba <dsterba@suse.cz>
> Reported-by: Adam Borowski <kilobyte@angband.pl>
> Fixes: 4751832da990 ("btrfs: fiemap: Cache and merge fiemap extent ...")
> Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>

Thanks, added to 4.13 queue.

      parent reply	other threads:[~2017-06-27 13:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-22  2:01 [PATCH] btrfs: Remove false alert when fiemap range is smaller than on-disk extent Qu Wenruo
2017-06-22  2:39 ` Adam Borowski
2017-06-27 13:14 ` David Sterba [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=20170627131440.GW2866@suse.cz \
    --to=dsterba@suse.cz \
    --cc=kilobyte@angband.pl \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quwenruo@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 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).