Am Samstag, 11. Juli 2015, 10:40:29 schrieb erp...@gmail.com:
> On Sat, Jul 11, 2015 at 4:12 AM, Martin Steigerwald <mar...@lichtvoll.de> 
wrote:
> > Always do "sync" after a "btrfs fi defrag" and before measuring with
> > "filefrag". The kernel may not have written everything. I have seen this
> > repeatedly that the extent count drops further after a "sync", following
> > "btrfs fi defrag".
> 
> First of all, thank you for your help. This fixed the problem for
> defragging individual files.

Note however: Even without "sync" BTRFS will defragment the file. It may 
just take a while till the new extents are written. So there is no need to 
call "sync" after btrfs fi defrag.

Why are you trying to defragment anyway? What are you trying to achieve / 
solve?

> I'm now seeing that recursive defragging doesn't work the way I expect.
> Running
> 
> $ btrfs fi defrag -r /path/to
> 
> returns almost immediately and does not reduce the number of fragments
> in /path/to/file. However, running
> 
> $ btrfs fi defrag /path/to/file
> 
> does reduce the number of fragments.

Well, I have no idea about this one. I have the same behavior with

> >> btrfs --version: Btrfs v3.17

v4.0

Ciao,
-- 
Martin
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to