All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: David Sterba <dsterba@suse.com>
Subject: [PATCH 3/8] btrfs: send: use helpers to access root_item::ctransid
Date: Thu, 29 Oct 2020 13:01:26 +0100	[thread overview]
Message-ID: <14dd40acf1cc3fd82ae77f23033b7efa18e22e42.1603972767.git.dsterba@suse.com> (raw)
In-Reply-To: <cover.1603972767.git.dsterba@suse.com>

We have helpers to access the on-disk item members, use that for
root_item::ctransid instead of raw le64_to_cpu.

Signed-off-by: David Sterba <dsterba@suse.com>
---
 fs/btrfs/send.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index 340c76a12ce1..d719a2755a40 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -2410,7 +2410,7 @@ static int send_subvol_begin(struct send_ctx *sctx)
 			    sctx->send_root->root_item.uuid);
 
 	TLV_PUT_U64(sctx, BTRFS_SEND_A_CTRANSID,
-		    le64_to_cpu(sctx->send_root->root_item.ctransid));
+		    btrfs_root_ctransid(&sctx->send_root->root_item));
 	if (parent_root) {
 		if (!btrfs_is_empty_uuid(parent_root->root_item.received_uuid))
 			TLV_PUT_UUID(sctx, BTRFS_SEND_A_CLONE_UUID,
@@ -2419,7 +2419,7 @@ static int send_subvol_begin(struct send_ctx *sctx)
 			TLV_PUT_UUID(sctx, BTRFS_SEND_A_CLONE_UUID,
 				     parent_root->root_item.uuid);
 		TLV_PUT_U64(sctx, BTRFS_SEND_A_CLONE_CTRANSID,
-			    le64_to_cpu(sctx->parent_root->root_item.ctransid));
+			    btrfs_root_ctransid(&sctx->parent_root->root_item));
 	}
 
 	ret = send_cmd(sctx);
@@ -5101,7 +5101,7 @@ static int send_clone(struct send_ctx *sctx,
 		TLV_PUT_UUID(sctx, BTRFS_SEND_A_CLONE_UUID,
 			     clone_root->root->root_item.uuid);
 	TLV_PUT_U64(sctx, BTRFS_SEND_A_CLONE_CTRANSID,
-		    le64_to_cpu(clone_root->root->root_item.ctransid));
+		    btrfs_root_ctransid(&clone_root->root->root_item));
 	TLV_PUT_PATH(sctx, BTRFS_SEND_A_CLONE_PATH, p);
 	TLV_PUT_U64(sctx, BTRFS_SEND_A_CLONE_OFFSET,
 			clone_root->offset);
-- 
2.25.0


  parent reply	other threads:[~2020-10-29 12:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-29 12:01 [PATCH 0/8] Misc cleanups David Sterba
2020-10-29 12:01 ` [PATCH 1/8] btrfs: use the right number of levels for lockdep keysets David Sterba
2020-10-29 12:01 ` [PATCH 2/8] btrfs: generate lockdep keyset names at compile time David Sterba
2020-10-29 12:01 ` David Sterba [this message]
2020-10-29 12:01 ` [PATCH 4/8] btrfs: check-integrity: use proper helper to access btrfs_header David Sterba
2020-10-29 12:01 ` [PATCH 5/8] btrfs: use root_item helpers for limit and flags in btrfs_create_tree David Sterba
2020-10-29 12:01 ` [PATCH 6/8] btrfs: add set/get accessors for root_item::drop_level David Sterba
2020-10-29 12:01 ` [PATCH 7/8] btrfs: remove unnecessary casts in printk David Sterba
2020-10-29 12:01 ` [PATCH 8/8] btrfs: scrub: update message regarding read-only status David Sterba
2020-10-29 18:47 ` [PATCH 0/8] Misc cleanups Josef Bacik

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=14dd40acf1cc3fd82ae77f23033b7efa18e22e42.1603972767.git.dsterba@suse.com \
    --to=dsterba@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    /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.