AFS: implement statfs
authorDavid Howells <dhowells@redhat.com>
Fri, 11 May 2007 05:22:20 +0000 (22:22 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 11 May 2007 15:29:32 +0000 (08:29 -0700)
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>
fs/afs/afs.h
fs/afs/afs_fs.h
fs/afs/dir.c
fs/afs/fsclient.c
fs/afs/internal.h
fs/afs/super.c
fs/afs/vnode.c

index 52d0752..2452579 100644 (file)
@@ -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 */
diff --cc fs/afs/afs_fs.h
Simple merge
diff --cc fs/afs/dir.c
Simple merge
Simple merge
Simple merge
diff --cc fs/afs/super.c
Simple merge
diff --cc fs/afs/vnode.c
Simple merge