[PATCH] xfs_io: use fiemap -c param to query cow fork

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Brian Foster <bfoster@xxxxxxxxxx>
---
 io/fiemap.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/io/fiemap.c b/io/fiemap.c
index f89da06..9114af1 100644
--- a/io/fiemap.c
+++ b/io/fiemap.c
@@ -206,6 +206,10 @@ calc_print_format(
 	}
 }
 
+#ifndef FIEMAP_FLAG_COW
+#define FIEMAP_FLAG_COW		0x00000010
+#endif
+
 int
 fiemap_f(
 	int		argc,
@@ -231,11 +235,14 @@ fiemap_f(
 	__u64		last_logical = 0;
 	struct stat	st;
 
-	while ((c = getopt(argc, argv, "aln:v")) != EOF) {
+	while ((c = getopt(argc, argv, "acln:v")) != EOF) {
 		switch (c) {
 		case 'a':
 			fiemap_flags |= FIEMAP_FLAG_XATTR;
 			break;
+		case 'c':
+			fiemap_flags |= FIEMAP_FLAG_COW;
+			break;
 		case 'l':
 			lflag = 1;
 			break;
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux