linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] btrfs fiemap related BUG fix.
@ 2018-05-07  8:42 robbieko
  2018-05-07  8:42 ` [PATCH v2 1/2] Btrfs: fiemap: pass correct bytenr when fm_extent_count is zero robbieko
  2018-05-07  8:42 ` [PATCH v2 2/2] Btrfs: fix fiemap extent SHARED flag error with range clone robbieko
  0 siblings, 2 replies; 4+ messages in thread
From: robbieko @ 2018-05-07  8:42 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Robbie Ko

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-05-09 16:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-07  8:42 [PATCH v2 0/2] btrfs fiemap related BUG fix robbieko
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

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).