Description of problem: xfs_fsr seems to have a regression: [root@ahlinux2 ~]# df -t xfs Filesystem 1K-blocks Used Available Use% Mounted on /dev/mapper/vg_ahlinux2-lv_root 52403200 5304444 47098756 11% / /dev/mapper/vg_ahlinux2-lv_home 52403200 199332 52203868 1% /home [root@ahlinux2 ~]# awk '($3 == "xfs")' /etc/fstab /dev/mapper/vg_ahlinux2-lv_root / xfs defaults 1 1 /dev/mapper/vg_ahlinux2-lv_home /home xfs defaults 1 2 [root@ahlinux2 ~]# xfs_fsr -v / /: Directory defragmentation not supported This works for F14: root@ahlinux ~ # xfs_fsr -v / / start inode=0 ... Version-Release number of selected component (if applicable): xfsprogs-3.1.4-2.fc15.x86_64 Additional info: It is possible that this is due to the switch to use /proc/mounts, where the first entry for / is of type "rootfs" instead of "xfs".
The use of /proc/mounts being the culprit appears to be correct. The problem can be replicated on F14 by moving aside /etc/mtab and making mtab a symlink to /proc/mounts In other words, this will break on F15 even if xfs_fsr is reverted to use mtab instead of /proc/mounts, because F15 has mtab as a symlink to /proc/mounts. A change to getmntany() in xfs_fsr.c might be needed.
Ho hum, thanks for the report, that /proc/mounts change did break a few things. :) It looks like it's checking that "/" is of type "xfs" but when it finds: rootfs / rootfs rw 0 0 it says no way, that's a rootfs filesystem type, not xfs! But it never finds: /dev/sda2 / xfs rw,relatime,attr2,noquota 0 0 This patch to skip over the rootfs entry seems to fix it: diff --git a/fsr/xfs_fsr.c b/fsr/xfs_fsr.c index 40c2e6f..918e9b9 100644 --- a/fsr/xfs_fsr.c +++ b/fsr/xfs_fsr.c @@ -1648,6 +1648,8 @@ getmntany(FILE *fp, struct mntent *mp, struct mntent *mpref, struct stat64 *s) struct stat64 ms; while ((t = getmntent(fp))) { + if (strcmp(t->mnt_type, "rootfs") == 0) + continue; if (mpref->mnt_fsname) { /* device */ if (stat64(t->mnt_fsname, &ms) < 0) continue;
I've sent a patch to the xfs mailing list for this, thanks. -Eric
/proc/mounts sure did cause excitement - we're still waiting for a "df" without dupes. I can confirm that the fix works: [root@ahlinux2 .libs]# pwd /root/rpmbuild/BUILD/xfsprogs-3.1.4/fsr/.libs [root@ahlinux2 .libs]# ./xfs_fsr / / start inode=0 Thanks!
Well, hch didn't like my patch and he has a point, we should probably skip to the last entry matching the mountpoint, as we could have /dev/foo, /dev/bar, and /dev/baz all mounted on /mnt/quux that fix would solve the rootfs problem, too. One way or another we'll get it fixed upstream. -Eric
Patch suggestion sent upstream.
This message is a notice that Fedora 15 is now at end of life. Fedora has stopped maintaining and issuing updates for Fedora 15. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At this time, all open bugs with a Fedora 'version' of '15' have been closed as WONTFIX. (Please note: Our normal process is to give advanced warning of this occurring, but we forgot to do that. A thousand apologies.) Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, feel free to reopen this bug and simply change the 'version' to a later Fedora version. Bug Reporter: Thank you for reporting this issue and we are sorry that we were unable to fix it before Fedora 15 reached end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged to click on "Clone This Bug" (top right of this page) and open it against that version of Fedora. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
This actually is fixed upstream now, FWIW.