Closed sbraz closed 1 year ago
This ugly line is to blame for that error message:
https://github.com/sahib/rmlint/blob/854af40f87b366837ad3851243c06fbfb634b153/lib/utilities.c#L591
Redirecting stderr to null would be the quick fix. rm_mounts_can_reflink is useful to avoid attempting reflinks on filesystems that obviously can't make them, especially when an rmlint run includes more than one fs type. Enumerating them eagerly is the easiest way to do that, but the way it works now isn't perfect. For instance, since Linux 5.5 you can do server-side copy on NFS filesystems, which means cp --reflink
will create a reflink if the backing filesystem supports it. The only reason rmlint --dedupe
does not work on NFS yet is that it expects FS_IOC_FIEMAP to be available.
Hi, I recently noticed that there are permission errors for mount points outside of the folders on which I run rmlint. It only seems to happen inside XFS filesystems.
I believe the problem happens somewhere around here: https://github.com/sahib/rmlint/blob/427791ca7c9ffa66b2c666b6b01874c5e165fae6/lib/utilities.c#L618
To reproduce:
This will output:
/mnt/xfs/target: Permission denied
. Strace showsopenat(AT_FDCWD, "/mnt/xfs/target", O_RDONLY) = -1 EACCES (Permission denied)
.Does rmlint really need to enumerate each mount point? The error is also present when
-x
is used.