aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ioctl.h
diff options
context:
space:
mode:
authorJosef Bacik <josef@redhat.com>2010-01-13 13:19:06 -0500
committerChris Mason <chris.mason@oracle.com>2010-03-15 11:00:14 -0400
commit1406e4327be3a533a2b18582f715ce2cfbcf6804 (patch)
tree40cafa639095b1a652cd013746394b7a77e52b69 /fs/btrfs/ioctl.h
parent2ac55d41b5d6bf49e76bc85db5431240617e2f8f (diff)
Btrfs: add a "df" ioctl for btrfs
df is a very loaded question in btrfs. This gives us a way to get the per-space usage information so we can tell exactly what is in use where. This will help us figure out ENOSPC problems, and help users better understand where their disk space is going. Signed-off-by: Josef Bacik <josef@redhat.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/ioctl.h')
-rw-r--r--fs/btrfs/ioctl.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/fs/btrfs/ioctl.h b/fs/btrfs/ioctl.h
index 2d64a65842f3..81eac0a59ea3 100644
--- a/fs/btrfs/ioctl.h
+++ b/fs/btrfs/ioctl.h
@@ -1,4 +1,3 @@
1
2/* 1/*
3 * Copyright (C) 2007 Oracle. All rights reserved. 2 * Copyright (C) 2007 Oracle. All rights reserved.
4 * 3 *
@@ -127,6 +126,17 @@ struct btrfs_ioctl_defrag_range_args {
127 __u32 unused[5]; 126 __u32 unused[5];
128}; 127};
129 128
129struct btrfs_ioctl_space_info {
130 u64 flags;
131 u64 total_bytes;
132 u64 used_bytes;
133};
134
135struct btrfs_ioctl_space_args {
136 u64 space_slots;
137 u64 total_spaces;
138 struct btrfs_ioctl_space_info spaces[0];
139};
130 140
131#define BTRFS_IOC_SNAP_CREATE _IOW(BTRFS_IOCTL_MAGIC, 1, \ 141#define BTRFS_IOC_SNAP_CREATE _IOW(BTRFS_IOCTL_MAGIC, 1, \
132 struct btrfs_ioctl_vol_args) 142 struct btrfs_ioctl_vol_args)
@@ -166,4 +176,6 @@ struct btrfs_ioctl_defrag_range_args {
166#define BTRFS_IOC_INO_LOOKUP _IOWR(BTRFS_IOCTL_MAGIC, 18, \ 176#define BTRFS_IOC_INO_LOOKUP _IOWR(BTRFS_IOCTL_MAGIC, 18, \
167 struct btrfs_ioctl_ino_lookup_args) 177 struct btrfs_ioctl_ino_lookup_args)
168#define BTRFS_IOC_DEFAULT_SUBVOL _IOW(BTRFS_IOCTL_MAGIC, 19, u64) 178#define BTRFS_IOC_DEFAULT_SUBVOL _IOW(BTRFS_IOCTL_MAGIC, 19, u64)
179#define BTRFS_IOC_SPACE_INFO _IOWR(BTRFS_IOCTL_MAGIC, 20, \
180 struct btrfs_ioctl_space_args)
169#endif 181#endif