xfs
[Top] [All Lists]

ADD 797255 - fsr_xfs does not work when passed a file name

To: btg@xxxxxxx
Subject: ADD 797255 - fsr_xfs does not work when passed a file name
From: pv@xxxxxxxxxxxxxxxxxxxxxx (jones@xxxxxxxxxxxxxxxxxxxxxxxxxx)
Date: Tue, 25 Jul 2000 17:39:00 -0700 (PDT)
Cc: linux-xfs@xxxxxxxxxxx
Reply-to: sgi.bugs.xfs@xxxxxxxxxxxxxxxxx
Sender: owner-linux-xfs@xxxxxxxxxxx
 Submitter : lord                      Status : open                        
 Assigned Engineer : btg               Priority : 3                         
*Modified Date : 07/25/00             *Modified User : jones                
*Modified User Domain : tacc.cc.utexas.edu
*Description :
One of the command options on fsr_xfs is to defragment an
individual file. This does not work, it gets as far as the
open by handle code which fails because the file is not
a directory. The open by handle code needs a directory to
work from. fsr probably needs changing to use a different
file descriptor than the exact file we are attempting to
defragment.

==========================
ADDITIONAL INFORMATION (ADD)

.....


==========================
ADDITIONAL INFORMATION (ADD)
From: william l jones <jones@xxxxxxxxxxxxxxxxxx>
Date: Jul 25 2000 05:39:00PM
[pvnews version: 1.71]
==========================


Linux requires that the fd in the open_by_handle ioctl be a directory.

The following patch will fix BUG 797255:


*** fsr_xfs.c.orig      Tue Jul 25 18:34:36 2000
--- fsr_xfs.c   Tue Jul 25 18:37:14 2000
***************
*** 688,694 ****
        int     error;
        char    *tname;

!       fshandlep = jdm_getfshandle( fname );
        if (! fshandlep) {
                fsrprintf(
                  "unable to construct sys handle for %s: %s\n",
--- 688,694 ----
        int     error;
        char    *tname;

!       fshandlep = jdm_getfshandle(getparent (fname) );
        if (! fshandlep) {
                fsrprintf(
                  "unable to construct sys handle for %s: %s\n",

<Prev in Thread] Current Thread [Next in Thread>