summaryrefslogtreecommitdiff
path: root/cmds-fi-du.h
diff options
context:
space:
mode:
authorMark Fasheh <mfasheh@suse.de>2016-01-20 13:49:26 -0800
committerDavid Sterba <dsterba@suse.com>2016-03-14 13:42:47 +0100
commita2e7ff1eae45ad77d80d31d8b793021364573a74 (patch)
tree3449d277507736b67768ef96c7b4f69f91162c03 /cmds-fi-du.h
parentb5e7979ad27146d8f225b3bc7866c1b17942b6a0 (diff)
btrfs-progs: filesystem: add 'du' command
'btrfs du' differs from regular du in that it will work to resolve which blocks are shared between files in its list. This gives the user a more accurate bytecount from which they can make decisions regarding management of their file space. We still print a total number of bytes counted (like regular du), but also print the number of bytes which were found to have been shared amongst the file set provided. From there it becomes trivial to calculate how much space is exclusively owned. Signed-off-by: Mark Fasheh <mfasheh@suse.de> [ rename files to reflect the filesystem command group, add GPL v2 file headers ] Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'cmds-fi-du.h')
-rw-r--r--cmds-fi-du.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/cmds-fi-du.h b/cmds-fi-du.h
new file mode 100644
index 00000000..86e8f24a
--- /dev/null
+++ b/cmds-fi-du.h
@@ -0,0 +1,23 @@
+/*
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public
+ * License v2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 021110-1307, USA.
+ */
+
+#ifndef __CMDS_FILESYSTEM_DU_H__
+#define __CMDS_FILESYSTEM_DU_H__
+
+extern const char * const cmd_filesystem_du_usage[];
+int cmd_filesystem_du(int argc, char **argv);
+
+#endif /* __CMDS_FILESYSTEM_DU_H__ */