All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] btrfs: trim: Fix a bug certain range may not be trimmed properly
@ 2019-10-23  8:50 Qu Wenruo
  2019-10-23  8:50 ` [PATCH 1/2] btrfs: volumes: Return the mapped length for discard Qu Wenruo
  2019-10-23  8:50 ` [PATCH 2/2] btrfs: extent-tree: Ensure we trim ranges across block group boundary Qu Wenruo
  0 siblings, 2 replies; 7+ messages in thread
From: Qu Wenruo @ 2019-10-23  8:50 UTC (permalink / raw)
  To: linux-btrfs

There is a bug report about discard mount option not trimming some range
properly, and causing unexpected space usage for thin device.

It turns out to be that, if there are pinned extents across block group
boundary, we will only trim to the end of current block group, skipping
the remaining.

This patchset will fix it by ensuring btrfs_discard_extent() will
iterate the full range before exiting.

Meanwhile I'm still looking into how to craft such test case for btrfs,
so the test case may be late for several days.

Qu Wenruo (2):
  btrfs: volumes: Return the mapped length for discard
  btrfs: extent-tree: Ensure we trim ranges across block group boundary

 fs/btrfs/extent-tree.c | 40 ++++++++++++++++++++++++++++++----------
 fs/btrfs/volumes.c     |  8 +++++---
 2 files changed, 35 insertions(+), 13 deletions(-)

-- 
2.23.0


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

end of thread, other threads:[~2019-10-23  9:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-23  8:50 [PATCH 0/2] btrfs: trim: Fix a bug certain range may not be trimmed properly Qu Wenruo
2019-10-23  8:50 ` [PATCH 1/2] btrfs: volumes: Return the mapped length for discard Qu Wenruo
2019-10-23  9:47   ` Filipe Manana
2019-10-23  9:51     ` Qu Wenruo
2019-10-23  9:56       ` Filipe Manana
2019-10-23  8:50 ` [PATCH 2/2] btrfs: extent-tree: Ensure we trim ranges across block group boundary Qu Wenruo
2019-10-23  9:51   ` Filipe Manana

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.