path: root/btrfs.c
diff options
authorChris Mason <>2010-03-18 12:32:32 -0400
committerChris Mason <>2010-03-18 12:32:32 -0400
commit8f55b769c703c3f7cc8c94d165ea2587d4384ae9 (patch)
treef0e76f0e5fd59a65692236ce66b8f8724d055802 /btrfs.c
parentfb3a539c9224b9923acccc684bc1f2719d651004 (diff)
Add btrfs subvol find-new command
btrfs-subvol find-new <subvol> <id> will search through a given subvol and print out all the files with extents newer than a given id. Care must be taken to make sure any pending delalloc is on disk before running this because that won't show up in the output.
Diffstat (limited to 'btrfs.c')
1 files changed, 4 insertions, 0 deletions
diff --git a/btrfs.c b/btrfs.c
index f1a8806c..ab5e57fe 100644
--- a/btrfs.c
+++ b/btrfs.c
@@ -19,6 +19,7 @@
#include <stdlib.h>
#include <string.h>
+#include "kerncompat.h"
#include "btrfs_cmds.h"
#include "version.h"
@@ -60,6 +61,9 @@ static struct Command commands[] = {
{ do_subvol_list, 1, "subvolume list", "<path>\n"
"List the snapshot/subvolume of a filesystem."
+ { do_find_newer, 2, "subvolume find-new", "<path> <last_gen>\n"
+ "List the recently modified files in a filesystem."
+ },
{ do_defrag, -1,
"filesystem defragment", "[-vcf] [-s start] [-l len] [-t size] <file>|<dir> [<file>|<dir>...]\n"
"Defragment a file or a directory."