Displaying 1 result from an estimated 1 matches for "btrfs_ioctl_compsize".
2010 Jul 26
6
[PATCH] Btrfs: compressed file size ioctl
...++++++++++++++++++++++
fs/btrfs/ioctl.h | 1 +
2 files changed, 104 insertions(+), 0 deletions(-)
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 9254b3d..d18401b 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -1750,6 +1750,107 @@ out_drop_write:
return ret;
}
+static long btrfs_ioctl_compsize(struct file *file, void __user *argp)
+{
+ /* This ioctl returns the compressed size of an inode on disk
+ * by counting the on-disk space used by all of its extents.
+ */
+ struct inode *inode = fdentry(file)->d_inode;
+ struct btrfs_root *root = BTRFS_I(inode)->root;
+ struct btrfs_path *...