SCIENTIFIC-LINUX-USERS Archives

February 2005

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Shane Canon <[log in to unmask]>
Reply To:
Shane Canon <[log in to unmask]>
Date:
Thu, 3 Feb 2005 18:27:25 -0800
Content-Type:
multipart/mixed
Parts/Attachments:
text/plain (2689 bytes) , linux-2.4.21-nfs-overflow.patch (1044 bytes)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


This was on 2.4.21-27.0.2.  So the problem is still there.  Whether or
not this is a bug is in the eye of the beholder.  However, we would
prefer to get the block usage info out, even if the inode data is too large.

I've attached a patch that does this.  It still will return 0s for the
inode usage if the block usage causes an overflow, but this is less
important for us.

- --Shane



Connie Sieh wrote:
| Shane,
|
| I think this was fixed in the 2.4.21-27.xx kernel.  What version are you
| using?
|
| -Connie Sieh
|
| On Thu, 3 Feb 2005, Shane Canon wrote:
|
|
|
| Greetings,
|
| We discovered something interesting today and I thought I would share it
| with the list.  We noticed that doing a df from SL nodes on some of our
| NFS served directories would return back bogus info (1 block available 0
| ~ used).  Meanwhile, the same df run on some of our older RH72 based
| system returned sane values.  We've traced it down to the following code
| in the kernel (see below).  In our case, the blocks were under the
| overflow threshold but the number of files was not.  I will write a
| patch to work around this for us.  I will share it with the list after
| its done.
|
| --Shane
|
| sample output from two hosts...
|
| [root@pdsflx320 root]# df -h /auto/snfactry9
| Filesystem            Size  Used Avail Use% Mounted on
| pd0305.nersc.gov:/export/data2/snfactry
| ~                      1.1T  199G  960G  18% /auto/snfactry9
|
| [root@pc1601 nfs]# df -h /auto/snfactry9
| Filesystem            Size  Used Avail Use% Mounted on
| pd0305.nersc.gov:/export/data2/snfactry
| ~                         1     1     1   0% /auto/snfactry9
|
| from fs/nfs/incode.c in nfs_statfs
|
| ~       if (TOOBIG(((res.tbytes + blockres) >> blockbits)))
| ~                goto too_big;
| ~        if (TOOBIG(((res.fbytes + blockres) >> blockbits)))
| ~                goto too_big;
| ~        if (TOOBIG(((res.abytes + blockres) >> blockbits)))
| ~                goto too_big;
| ~        if (TOOBIG(res.tfiles) || TOOBIG(res.afiles))
| ~                goto too_big;
|
| ~        buf->f_blocks = (res.tbytes + blockres) >> blockbits;
| ~        buf->f_bfree = (res.fbytes + blockres) >> blockbits;
| ~        buf->f_bavail = (res.abytes + blockres) >> blockbits;
| ~        buf->f_files = res.tfiles;
| ~        buf->f_ffree = res.afiles;
| ~        return 0;
|
| ~ too_big:
| ~        dprintk("nfs_statfs: failed: EOVERFLOW\n");
| ~        buf->f_files = buf->f_ffree = -1;
|
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCAt2MZd/2zrI5CioRAngWAJ9B80244/VyVG97F5gldVbllPNGiwCgg3Ei
HYs4DCzpYN/JRZZWlgg1Hdo=
=/g2q
-----END PGP SIGNATURE-----


ATOM RSS1 RSS2