xfs
[Top] [All Lists]

fsr_xfs.c patch

To: linux-xfs@xxxxxxxxxxx
Subject: fsr_xfs.c patch
From: William L Jones <jones@xxxxxxxxxxxxxxxxxx>
Date: Fri, 28 Jul 2000 16:03:00 -0500 (CDT)
Sender: owner-linux-xfs@xxxxxxxxxxx
The XFS_IOC_DIOINFO ioctl does not set enough values for fsr_xfs work properly.
In its current state it replace good file with zero filled files.  The following
patch works around the problem until direct I/O works under linux.

*** fsr_xfs.c.orig      Fri Jul 28 14:37:24 2000
--- fsr_xfs.c   Fri Jul 28 15:52:35 2000
***************
*** 957,968 ****
                close(tfd);
                return -1;
        }
- #endif
        if( (ioctl(tfd, XFS_IOC_DIOINFO, &dio)) < 0 ) {
                fsrprintf("could not get I/O info on tmp: %s\n", tname);
                close(tfd);
                return -1;
        }
        if (do_rt) {
                int rt_textsize = fsgeom.rtextsize * fsgeom.blocksize;
  
--- 957,972 ----
                close(tfd);
                return -1;
        }
        if( (ioctl(tfd, XFS_IOC_DIOINFO, &dio)) < 0 ) {
                fsrprintf("could not get I/O info on tmp: %s\n", tname);
                close(tfd);
                return -1;
        }
+ #else
+         /* Until direct I/O really works fake out XFS_IOC_DIOINFO call */
+         dio.d_miniosz =  dio.d_maxiosz = 4069*10;
+         dio.d_mem = 4096;
+ #endif
        if (do_rt) {
                int rt_textsize = fsgeom.rtextsize * fsgeom.blocksize;
  

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