Re: [PATCH] recursive defrag cleanup

2017-01-05 Thread Austin S. Hemmelgarn
On 2017-01-04 17:12, Janos Toth F. wrote: I separated these 9 camera storages into 9 subvolumes (so now I have 10 subvols in total in this filesystem with the "root" subvol). It's obviously way too early to talk about long term performance but now I can tell that recursive defrag does NOT descend

Re: [PATCH] recursive defrag cleanup

2017-01-04 Thread Janos Toth F.
I separated these 9 camera storages into 9 subvolumes (so now I have 10 subvols in total in this filesystem with the "root" subvol). It's obviously way too early to talk about long term performance but now I can tell that recursive defrag does NOT descend into "child" subvolumes (it does not pick u

Re: [PATCH] recursive defrag cleanup

2017-01-03 Thread Austin S. Hemmelgarn
On 2017-01-03 13:16, Janos Toth F. wrote: On Tue, Jan 3, 2017 at 5:01 PM, Austin S. Hemmelgarn wrote: I agree on this point. I actually hadn't known that it didn't recurse into sub-volumes, and that's a pretty significant caveat that should be documented (and ideally fixed, defrag doesn't need

Re: [PATCH] recursive defrag cleanup

2017-01-03 Thread Janos Toth F.
On Tue, Jan 3, 2017 at 5:01 PM, Austin S. Hemmelgarn wrote: > I agree on this point. I actually hadn't known that it didn't recurse into > sub-volumes, and that's a pretty significant caveat that should be > documented (and ideally fixed, defrag doesn't need to worry about > cross-subvolume stuff

Re: [PATCH] recursive defrag cleanup

2017-01-03 Thread Austin S. Hemmelgarn
On 2017-01-03 09:21, Janos Toth F. wrote: So, in order to defrag "everything" in the filesystem (which is possible to / potentially needs defrag) I need to run: 1: a recursive defrag starting from the root subvolume (to pick up all the files in all the possible subvolumes and directories) 2: a no

Re: [PATCH] recursive defrag cleanup

2017-01-03 Thread Janos Toth F.
So, in order to defrag "everything" in the filesystem (which is possible to / potentially needs defrag) I need to run: 1: a recursive defrag starting from the root subvolume (to pick up all the files in all the possible subvolumes and directories) 2: a non-recursive defrag on the root subvolume + (

Re: [PATCH] recursive defrag cleanup

2017-01-03 Thread Anand Jain
Thanks for the comments. We are in the midst of making defrag better. For now, -r option picks up files of the dir specified, there is no way to defrag all subvol tree with out scripting, something like this. If /mnt is mounted with subvolid=5 (default). for all s subvol in /mnt do

Re: [PATCH] recursive defrag cleanup

2016-12-28 Thread Janos Toth F.
I still find the defrag tool a little bit confusing from a user perspective: - Does the recursive defrag (-r) also defrag the specified directory's extent tree or should one run two separate commands for completeness (one with -r and one without -r)? - What's the target scope of the extent tree def

Re: [PATCH] recursive defrag cleanup

2016-12-19 Thread Anand Jain
On 12/13/16 01:19, David Sterba wrote: On Tue, Dec 06, 2016 at 12:39:37PM +0800, Anand Jain wrote: The command, btrfs fi defrag -v /btrfs does nothing, it won't defrag the files under /btrfs as user may expect. The command with recursive option btrfs fi defrag -vr /btrfs would defrag

Re: [PATCH] recursive defrag cleanup

2016-12-12 Thread David Sterba
On Tue, Dec 06, 2016 at 12:39:37PM +0800, Anand Jain wrote: > The command, >btrfs fi defrag -v /btrfs > does nothing, it won't defrag the files under /btrfs as user > may expect. The command with recursive option >btrfs fi defrag -vr /btrfs > would defrag all the files under /btrfs inclu

[PATCH] recursive defrag cleanup

2016-12-05 Thread Anand Jain
The command, btrfs fi defrag -v /btrfs does nothing, it won't defrag the files under /btrfs as user may expect. The command with recursive option btrfs fi defrag -vr /btrfs would defrag all the files under /btrfs including files in its sub directories. While attempting to fix this. The