From: Howard McLauchlan <hmclauch...@fb.com>

Adding entries to dump for new commands (total data size, fallocate).

Signed-off-by: Howard McLauchlan <hmclauch...@fb.com>
---
 send-dump.c | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/send-dump.c b/send-dump.c
index 1591e0cc..c5a695a2 100644
--- a/send-dump.c
+++ b/send-dump.c
@@ -316,6 +316,21 @@ static int print_update_extent(const char *path, u64 
offset, u64 len,
                          offset, len);
 }
 
+static int print_total_data_size(u64 size, void *user)
+{
+       char path;
+
+       return PRINT_DUMP(user, &path, "total_data_size", "size=%llu", size);
+}
+
+static int print_fallocate(const char *path, u32 flags, u64 offset, u64 len,
+                          void *user)
+{
+       return PRINT_DUMP(user, path, "fallocate",
+                         "flags=%u offset=%llu len=%llu", flags, offset,
+                         len);
+}
+
 struct btrfs_send_ops btrfs_print_send_ops = {
        .subvol = print_subvol,
        .snapshot = print_snapshot,
@@ -337,5 +352,7 @@ struct btrfs_send_ops btrfs_print_send_ops = {
        .chmod = print_chmod,
        .chown = print_chown,
        .utimes = print_utimes,
-       .update_extent = print_update_extent
+       .update_extent = print_update_extent,
+       .total_data_size = print_total_data_size,
+       .fallocate = print_fallocate,
 };
-- 
2.17.0

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

Reply via email to