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.
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
|