>
> Yes, there is a problem here, I have replicated it locally. Thanks for
> the info, I don't have the cause yet, but hopefully it will not take
> too long to fix.
And the answer here is that nfs does not pay any attention to a filesystem
which provides a revalidate function (which xfs does). NFS is reporting
incorrect information from the linux inode on the server back to the
client. If you look at the file locally on the server then it is OK,
if you look at the file over nfs a few seconds later then it is also
OK, it is only the state returned on the reply to the write which is
incorrect (I looked at the protocol packets).
I know how to fix this, but it is not going to happen today.
Steve
>
> Steve
>
> > I am having a problem with exporting xfs over
> > NFS. I have two servers that are exhibiting the
> > same problem where a piece of code writing a sparse
> > file gives the wrong filesize.
> >
> > x86, smp, linux-2.4.5, Trond's NFS patches,
> > and linux-2.4.5-xfs-06112001.patch
> > alpha, uniprocessor, linux-2.4.6, Trond's NFS patches,
> > and linux-2.4.6-xfs-07052001.patch
> >
> > Both boxes are mounting luns from a fiber channel
> > storage device (both use Qlogic 2200, v4.27beta driver).
> >
> > The filesystems on the x86 are lvm partitions (both
> > xfs and ext2, striped). The filesystem on the alpha is not
> > lvm.
> >
> > The size of the file written by the code below should be 40500 bytes.
> > When this code is run on a xfs exported nfs filesystem, the filesize
> > is 40960. This happens to both x86 and alpha NFS fileservers
> > over NFSv3 (udp packets, rsize=wsize=8192). The code
> > runs correctly when run on the xfs filesystem directly. The code
> > run correctly to a ext2 exported nfs filesystem on the x86 box.
> >
> >
> > /*********************/
> > #include <stdlib.h>
> > #include <stdio.h>
> >
> > main (int argc, char **argv)
> > {
> > int x[588];
> > long sA;
> > FILE *f;
> > int i;
> > #define ByteCount 2352
> > #define SeekIncr (long) 3468
> > sA = 0;
> > f = fopen ("test40500", "w");
> > sA = 0;
> >
> > for (i=0; i < 12; i++)
> > {
> > (void) fseek (f, sA, SEEK_SET);
> > (void) fwrite (x, (size_t) ByteCount, (size_t) 1, f);
> > sA += (SeekIncr);
> > }
> > (void) fclose(f);
> > exit(0);
> > }
> > /**************************/
> >
> > Thanks,
> > Craig
> >
> > --
> > Craig Tierney (ctierney@xxxxxxxx)
> > phone: 303-497-3112
>
|