All of lore.kernel.org
 help / color / mirror / Atom feed
From: Howard McLauchlan <linux@hmclauchlan.com>
To: linux-btrfs@vger.kernel.org
Cc: Chris Mason <clm@fb.com>, Josef Bacik <jbacik@fb.com>,
	David Sterba <dsterba@suse.com>,
	Filipe Manana <fdmanana@suse.com>,
	Omar Sandoval <osandov@osandov.com>,
	Howard McLauchlan <hmclauchlan@fb.com>
Subject: [RFC PATCH 5/6] btrfs-progs: add total data size, fallocate to dump
Date: Tue,  8 May 2018 22:11:36 -0400	[thread overview]
Message-ID: <20180509021137.8342-5-linux@hmclauchlan.com> (raw)
In-Reply-To: <20180509021137.8342-1-linux@hmclauchlan.com>

From: Howard McLauchlan <hmclauchlan@fb.com>

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

Signed-off-by: Howard McLauchlan <hmclauchlan@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


  parent reply	other threads:[~2018-05-09  2:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-09  2:11 [RFC PATCH 1/6] Btrfs-progs: send, bump stream version Howard McLauchlan
2018-05-09  2:11 ` [RFC PATCH 2/6] Btrfs-progs: send, implement total data size callback and progress report Howard McLauchlan
2018-05-09  2:11 ` [RFC PATCH 3/6] Btrfs-progs: send, implement fallocate command callback Howard McLauchlan
2018-05-09  2:11 ` [RFC PATCH 4/6] Btrfs-progs: add write and clone commands debug info to receive Howard McLauchlan
2018-05-09  2:11 ` Howard McLauchlan [this message]
2018-05-09  2:11 ` [RFC PATCH 6/6] btrfs-progs: add chattr support for send/receive Howard McLauchlan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180509021137.8342-5-linux@hmclauchlan.com \
    --to=linux@hmclauchlan.com \
    --cc=clm@fb.com \
    --cc=dsterba@suse.com \
    --cc=fdmanana@suse.com \
    --cc=hmclauchlan@fb.com \
    --cc=jbacik@fb.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=osandov@osandov.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.