Linux Btrfs filesystem development
 help / color / mirror / Atom feed
* defragmenting non-files only
@ 2025-07-27 20:33 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2025-07-27 20:33 UTC (permalink / raw)
  To: linux-btrfs

I'm wondering how much fragmentation affects users with large
active Maildirs where files are frequently created and removed.

I'm avoiding a blanket `btrfs fi defrag -r` to reduce storage
wear for files which won't live long.

So some questions:

1. how to monitor fragmentation of subvolume/extent tree or
   anything else which filefrag(8) doesn't seem to report
   fragmentation for?

2. does `btrfs fi defrag $DIR' work only for that directory?
   In other words, can I `btrfs fi defrag $TOPLEVEL_DIR` and
   expect subdirectories to be defragmented?

   Or should I do:

	find $TOPLEVEL_DIR -type d -print0 | xargs -0 btrfs fi defrag
   ?

Thanks.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-07-27 20:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-27 20:33 defragmenting non-files only Eric Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox