linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: robbieko <robbieko@synology.com>
To: linux-btrfs@vger.kernel.org
Cc: Robbie Ko <robbieko@synology.com>
Subject: [PATCH v2 0/2] btrfs fiemap related BUG fix.
Date: Mon,  7 May 2018 16:42:03 +0800	[thread overview]
Message-ID: <1525682525-1424-1-git-send-email-robbieko@synology.com> (raw)

From: Robbie Ko <robbieko@synology.com>

This patchset intends to fix btrfs fiemap related bug.

The fiemap has the following problems:

1) fiemap: pass correct bytenr when fm_extent_count is zero
 When user space wants to get the number of file extents,
 set fm_extent_count to 0 to run fiemap and then read fm_mapped_extents.

 In the above example, fiemap will return with fm_mapped_extents set to 4,
 but it should be 1 since there's only one entry in the output.

 Details can refer to "[PATCH v2 1/2] Btrfs: fiemap: pass correct bytenr
 when fm_extent_count is zero"

2) fiemap extent SHARED flag error with range clone
 Currently, only the first extent is checked for shared in extent_map.

 Here we will check each extent with extent map range, if one of them
 is shared, extent map is shared.

 Details can refer to "[PATCH v2 2/2] Btrfs: fix fiemap extent SHARED
 flag error with range clone."

Robbie Ko (2):
  Btrfs: fiemap: pass correct bytenr when fm_extent_count is zero
  Btrfs: fix fiemap extent SHARED flag error with range clone.

 fs/btrfs/extent_io.c | 150 ++++++++++++++++++++++++++++++++++++++++++++-------
 1 file changed, 132 insertions(+), 18 deletions(-)

-- 
1.9.1


             reply	other threads:[~2018-05-07  8:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-07  8:42 robbieko [this message]
2018-05-07  8:42 ` [PATCH v2 1/2] Btrfs: fiemap: pass correct bytenr when fm_extent_count is zero robbieko
2018-05-09 16:18   ` Nikolay Borisov
2018-05-07  8:42 ` [PATCH v2 2/2] Btrfs: fix fiemap extent SHARED flag error with range clone robbieko

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=1525682525-1424-1-git-send-email-robbieko@synology.com \
    --to=robbieko@synology.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).