linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] btrfs-progs: check improve 'checking extents' scalability
@ 2016-06-23 19:26 jeffm
  2016-06-23 19:26 ` [PATCH 1/3] btrfs-progs: check: add helpers for converting between structures jeffm
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: jeffm @ 2016-06-23 19:26 UTC (permalink / raw)
  To: linux-btrfs

From: Jeff Mahoney <jeffm@suse.com>

While running xfstests generic/291, which creates a single file populated
with reflinks to the same extent, I found that fsck had been running for
hours.  perf top lead me to find_data_backref as the culprit, and a litte
more digging made it clear: For every extent record we add, we iterate
the entire list first.  My test case had ~2M records.  That math doesn't
go well.

This patchset converts the extent_backref list to an rbtree.  The test
that used to run for more than 8 hours without completing now takes
less than 20 seconds.

-Jeff

---

Jeff Mahoney (3):
  btrfs-progs: check: add helpers for converting between structures
  btrfs-progs: check: supplement extent backref list with rbtree
  btrfs-progs: check: switch to iterating over the backref_tree

 cmds-check.c | 355 +++++++++++++++++++++++++++++++++++++++--------------------
 1 file changed, 237 insertions(+), 118 deletions(-)

-- 
2.7.1


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

end of thread, other threads:[~2016-07-04 12:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-23 19:26 [PATCH 0/3] btrfs-progs: check improve 'checking extents' scalability jeffm
2016-06-23 19:26 ` [PATCH 1/3] btrfs-progs: check: add helpers for converting between structures jeffm
2016-06-23 19:26 ` [PATCH 2/3] btrfs-progs: check: supplement extent backref list with rbtree jeffm
2016-06-23 19:26 ` [PATCH 3/3] btrfs-progs: check: switch to iterating over the backref_tree jeffm
2016-06-23 21:24 ` [PATCH 0/3] btrfs-progs: check improve 'checking extents' scalability Holger Hoffstätte
2016-06-23 21:38   ` Jeff Mahoney
2016-07-04 12:20 ` David Sterba

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