Skip to content

Commit

Permalink
[PATCH] 2TB files: change type of kstatfs entries
Browse files Browse the repository at this point in the history
This fix was proposed by Trond Myklebust.  He says: The type "sector_t" is
heavily tied in to the block layer interface as an offset/handle to a block,
and is subject to a supposedly block-specific configuration option:
CONFIG_LBD.  Despite this, it is used in struct kstatfs to save a couple of
bytes on the stack whenever we call the filesystems' ->statfs().

So kstatfs's entries related to blocks are invalid on statfs64 for a network
filesystem which has more than 2^32-1 blocks when CONFIG_LBD is disabled.

- struct kstatfs
  Change the type of following entries from sector_t to u64.
  f_blocks
  f_bfree
  f_bavail
  f_files
  f_ffree

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Takashi Sato <sho@tnes.nec.co.jp>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Takashi Sato authored and Linus Torvalds committed Mar 26, 2006
1 parent 5515eff commit e2d53f9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions include/linux/statfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
struct kstatfs {
long f_type;
long f_bsize;
sector_t f_blocks;
sector_t f_bfree;
sector_t f_bavail;
sector_t f_files;
sector_t f_ffree;
u64 f_blocks;
u64 f_bfree;
u64 f_bavail;
u64 f_files;
u64 f_ffree;
__kernel_fsid_t f_fsid;
long f_namelen;
long f_frsize;
Expand Down

0 comments on commit e2d53f9

Please sign in to comment.