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 13:00:42 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (61 lines)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


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

iD8DBQFCApD6Zd/2zrI5CioRAqs/AJ9yo+S6XO1yDb7G3B/SfGMTjUjZiQCguSyW
Pdusw66FlePruPdQrO0kUVU=
=Vkmq
-----END PGP SIGNATURE-----

ATOM RSS1 RSS2