On Mon, May 22, 2006 at 12:27:25AM -0700, Matt R Hall wrote:
> Mr. Scott,
> Thank you for your rapid reply! I greatly appreciate your dedication
> to your work.

No problem.

> On 5/21/06, Nathan Scott <[EMAIL PROTECTED]> wrote:
> > Is there a filesystem mounted at /mnt?  (can you include your
> > /etc/mtab file please).
> This example was sanitized from a real-life configuration. Of course
> all of my filesystems are XFS, and there was one mounted onto the
> directory on which I called the command when the command was called.
> This shell session which should clear things up a bit more.

Ah, I understand the problem now.

> [EMAIL PROTECTED]:~$ cat /etc/mtab
> /dev/loop0 /fileshare xfs rw 0 0
> [EMAIL PROTECTED]:~$ sudo xfs_fsr /fileshare/
> /fileshare/: Directory defragmentation not supported
> [EMAIL PROTECTED]:~$ sudo xfs_fsr /fileshare
> /fileshare start inode=0

The problem is as follows:
- fsr does a stat on the path its given
- if its a blkdev or a directory, it does an /etc/fstab lookup to
see if this matches any of the known, mounted XFS filesystem.
- the matching algorithm does a string compare on the given name,
and this turns out to be critical here, to the /etc/fstab device/
mount-point and looks for an exact match only (fixing this will
fix the bug here)
- if it finds a mount point, it begins a full filesystem scan
- if it does not, and its a directory, it simply reports that it
doesn't know how to reorganinse a directory, and exits.

So, the root cause of the odd behaviour you see is the strcmp on
path names.  That should be doing a stat and a dev/ino comparison
as this is more accurate and not susceptible to differences in
the path (like your extra '/').

I'll get this fixed up tomorrow.

cheers.

-- 
Nathan


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to