When I do a btrfs filesystem defragment -r /directory does it defragment really all files in this directory tree, even if it contains subvolumes? The man page does not mention subvolumes on this topic.
I have an older script (written by myself) which does a "btrfs filesystem defragment -r" on all subvolumes recursivly: btrfs filesystem defragment -r $m for s in $(btrfs subvolume list $m | awk '{ print $NF }'); do [[ "$s" =~ ^@ ]] && continue [[ $(btrfs subvolume show $m/$s) =~ Flags:.*readonly ]] && continue btrfs filesystem defragment -r $m/$s done I wonder why I have done it that way :-} -- Ullrich Horlacher Server und Virtualisierung Rechenzentrum TIK Universitaet Stuttgart E-Mail: horlac...@tik.uni-stuttgart.de Allmandring 30a Tel: ++49-711-68565868 70569 Stuttgart (Germany) WWW: http://www.tik.uni-stuttgart.de/ REF:<20170831070558.gb5...@rus.uni-stuttgart.de> -- 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