Re: Should "btrfs filesystem defrag -r" follow symlinks?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jun 14, 2020 at 03:22:34PM +0200, A L wrote:
> It is not clear from the man page at 
> https://btrfs.wiki.kernel.org/index.php/Manpage/btrfs-filesystem if 
> `btrfs filesystem defrag -r` should follow symbolic links or not. 
> Perhaps the man-page should mention which behaviour is default.
> 
> I did some basic tests and it seems that on my setup it does not follow 
> symlinks.

That's right, -r does not follow directory symlinks. I think it's a good
default as 'find' does not do that either. We're using the 'nftw'
library function with FTW_PHYS, help says "If set, do not follow
symbolic links.  (This is what you want.)"

> Perhaps improve defragment with an option to follow symlinks and/or 
> subvolumes should be added?

I'll clarify the manual page regarding the default behaviour. Mount
points are skipped but recursion goes to subvolumes.

Adding the options to choose the follow mode would be good, I'll open
issues for that. Thanks.



[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux