Package: coreutils Version: 9.7-2 Severity: normal X-Debbugs-Cc: yannick.lepen...@live.fr
Dear Maintainer, On CephFS, creating a snapshot is done suchly: $ mkdir .snap/snapshot-name This creates a directory which contains a view of the current directory at the time the snapshot was created, and is therefore non-empty if the current directory was non-empty at that time. Its contents are immutable. Removing a snapshot is done suchly: $ rmdir .snap/snapshot-name This works fine even if .snap/snapshot-name is non-empty, as rmdir calls rmdir(2) directly without trying to be smart, and the Ceph filesystem understands what rmdir on a snapshot directory means: remove the snapshot. One would naturally expect rm -d to behave *exactly the same* as rmdir, but this isn't the case, because rm -d first does a getdents on the directory, observes it is non-empty, and refuses to perform the removal. I understand this is non-compliant behavior per XCU rm 2.a. and 4. and XSH remove(). Moreover other coreutils implementations (such as uutils or voreutils) do not exhibit this bug and correctly remove non-empty directories. Regards, Yannick Le Pennec -- System Information: Debian Release: trixie/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 6.12.22-amd64 (SMP w/12 CPU threads; PREEMPT) Kernel taint flags: TAINT_WARN Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages coreutils depends on: ii libacl1 2.3.2-2+b1 ii libattr1 1:2.5.2-3 ii libc6 2.41-7 ii libcap2 1:2.75-7 ii libgmp10 2:6.3.0+dfsg-3 ii libselinux1 3.8.1-1 ii libssl3t64 3.5.0-1 ii libsystemd0 257.5-2 coreutils recommends no packages. coreutils suggests no packages. -- no debconf information