diff options
| author | Andrew Morton <akpm@digeo.com> | 2003-06-20 08:13:06 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2003-06-20 08:13:06 -0700 |
| commit | 244f36266d58f4c26d707fdbcff592209d56aa80 (patch) | |
| tree | c10a9aa05d24ed3dcb2f4462bd7edbb28937f26b /include/asm-generic | |
| parent | d717623aa373ea2b4c261c72ff6add6c2ade8234 (diff) | |
[PATCH] Add system calls statfs64 and fstatfs64
From: Peter Chubb <peter@chubb.wattle.id.au>
Add two new system calls, statfs64 and fstatfs64. This has been needed
sincew the 64-bit sector_t merge - the current structures will overflow.
- Use a common interface (vfs_statfs) with the rest of the kernel,
- convert to 32-bit at (f)statfs time.
- New field f_frsize gives underlying fragment size for the filesystem.
(Solaris has this, and the Open Group describe it).
- The old statfs syscalls will now return -EOVERFLOW if the device was
too large to be represented inthe old data structures.
The new system calls take a size_t argument, which is the size of the
structure to be filled in (as requested by Ben LaHaise), to `futureproof' the
interface.
Has been reviewed by the arch maintainers and by Ulrich Drepper.
Diffstat (limited to 'include/asm-generic')
| -rw-r--r-- | include/asm-generic/statfs.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/include/asm-generic/statfs.h b/include/asm-generic/statfs.h new file mode 100644 index 000000000000..fecaf8fd5c10 --- /dev/null +++ b/include/asm-generic/statfs.h @@ -0,0 +1,37 @@ +#ifndef _GENERIC_STATFS_H +#define _GENERIC_STATFS_H + +#ifndef __KERNEL_STRICT_NAMES +# include <linux/types.h> +typedef __kernel_fsid_t fsid_t; +#endif + +struct statfs { + __u32 f_type; + __u32 f_bsize; + __u32 f_blocks; + __u32 f_bfree; + __u32 f_bavail; + __u32 f_files; + __u32 f_ffree; + __kernel_fsid_t f_fsid; + __u32 f_namelen; + __u32 f_frsize; + __u32 f_spare[5]; +}; + +struct statfs64 { + __u32 f_type; + __u32 f_bsize; + __u64 f_blocks; + __u64 f_bfree; + __u64 f_bavail; + __u64 f_files; + __u64 f_ffree; + __kernel_fsid_t f_fsid; + __u32 f_namelen; + __u32 f_frsize; + __u32 f_spare[5]; +}; + +#endif |
