summaryrefslogtreecommitdiff
path: root/ioctl.h
diff options
context:
space:
mode:
authorJosef Bacik <josef@redhat.com>2010-01-13 18:21:23 +0000
committerChris Mason <chris.mason@oracle.com>2010-03-14 08:34:38 -0400
commitb72e4c4e1923b908b7242c7d6646391eb4043a93 (patch)
treefcda70fe7a8dd87a98623655f080f3c265bb3128 /ioctl.h
parent35401ac1902544637ac26634e139f04ae31c2cbf (diff)
Btrfs-progs: add btrfs filesystem df to print space info
This goes along with the new space info ioctl. This will spit out the space info all nice and pretty with the type, it's flags (DUP, RAID) and how much space is in that group and how much is in use. Signed-off-by: Josef Bacik <josef@redhat.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'ioctl.h')
-rw-r--r--ioctl.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/ioctl.h b/ioctl.h
index 97130989..0859caed 100644
--- a/ioctl.h
+++ b/ioctl.h
@@ -120,6 +120,18 @@ struct btrfs_ioctl_defrag_range_args {
__u32 unused[5];
};
+struct btrfs_ioctl_space_info {
+ __u64 flags;
+ __u64 total_bytes;
+ __u64 used_bytes;
+};
+
+struct btrfs_ioctl_space_args {
+ __u64 space_slots;
+ __u64 total_spaces;
+ struct btrfs_ioctl_space_info spaces[0];
+};
+
#define BTRFS_IOC_SNAP_CREATE _IOW(BTRFS_IOCTL_MAGIC, 1, \
struct btrfs_ioctl_vol_args)
#define BTRFS_IOC_DEFRAG _IOW(BTRFS_IOCTL_MAGIC, 2, \
@@ -155,4 +167,6 @@ struct btrfs_ioctl_defrag_range_args {
#define BTRFS_IOC_INO_LOOKUP _IOWR(BTRFS_IOCTL_MAGIC, 18, \
struct btrfs_ioctl_ino_lookup_args)
#define BTRFS_IOC_DEFAULT_SUBVOL _IOW(BTRFS_IOCTL_MAGIC, 19, u64)
+#define BTRFS_IOC_SPACE_INFO _IOWR(BTRFS_IOCTL_MAGIC, 20, \
+ struct btrfs_ioctl_space_args)
#endif