AFS: implement statfs

Implement the statfs() op for AFS.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cette révision appartient à :
David Howells
2007-05-10 22:22:20 -07:00
révisé par Linus Torvalds
Parent 0f300ca928
révision 45222b9e02
7 fichiers modifiés avec 426 ajouts et 15 suppressions

Voir le fichier

@@ -16,6 +16,9 @@
#define AFS_MAXCELLNAME 64 /* maximum length of a cell name */
#define AFS_MAXVOLNAME 64 /* maximum length of a volume name */
#define AFSNAMEMAX 256 /* maximum length of a filename plus NUL */
#define AFSPATHMAX 1024 /* maximum length of a pathname plus NUL */
#define AFSOPAQUEMAX 1024 /* maximum length of an opaque field */
typedef unsigned afs_volid_t;
typedef unsigned afs_vnodeid_t;
@@ -143,4 +146,24 @@ struct afs_volsync {
time_t creation; /* volume creation time */
};
/*
* AFS volume status record
*/
struct afs_volume_status {
u32 vid; /* volume ID */
u32 parent_id; /* parent volume ID */
u8 online; /* true if volume currently online and available */
u8 in_service; /* true if volume currently in service */
u8 blessed; /* same as in_service */
u8 needs_salvage; /* true if consistency checking required */
u32 type; /* volume type (afs_voltype_t) */
u32 min_quota; /* minimum space set aside (blocks) */
u32 max_quota; /* maximum space this volume may occupy (blocks) */
u32 blocks_in_use; /* space this volume currently occupies (blocks) */
u32 part_blocks_avail; /* space available in volume's partition */
u32 part_max_blocks; /* size of volume's partition */
};
#define AFS_BLOCK_SIZE 1024
#endif /* AFS_H */