Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 1/4] btrfs-progs: map-logical: use sectorsize as default size
Date: Thu, 12 Aug 2021 13:35:05 +0800	[thread overview]
Message-ID: <20210812053508.175737-2-wqu@suse.com> (raw)
In-Reply-To: <20210812053508.175737-1-wqu@suse.com>

Originally btrfs-map-logical is utilizing function debug_read_block(),
which pretents to read an extent buffer from disk, thus it uses nodesize
as default mapping size.

But after commit eb81f8d263ce ("btrfs-progs: map-logical: Rework
map-logical logics") it no longer requires an extent buffer to do the
mapping.

Thus the default mapping size is no longer needed to be nodesize.

Thus change the default size to sectorsize.

Signed-off-by: Qu Wenruo <wqu@suse.com>
---
 btrfs-map-logical.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/btrfs-map-logical.c b/btrfs-map-logical.c
index b35677730374..eff0b89dbec6 100644
--- a/btrfs-map-logical.c
+++ b/btrfs-map-logical.c
@@ -288,7 +288,7 @@ int main(int argc, char **argv)
 	}
 
 	if (bytes == 0)
-		bytes = root->fs_info->nodesize;
+		bytes = root->fs_info->sectorsize;
 	cur_logical = logical;
 	cur_len = bytes;
 
-- 
2.32.0


  reply	other threads:[~2021-08-12  5:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-12  5:35 [PATCH 0/4] btrfs-progs: map-logical: remove the extent check Qu Wenruo
2021-08-12  5:35 ` Qu Wenruo [this message]
2021-08-12  5:35 ` [PATCH 2/4] btrfs-progs: map-logical: reject unaligned logical/bytes pair Qu Wenruo
2021-08-12  6:42   ` Nikolay Borisov
2021-08-12  5:35 ` [PATCH 3/4] btrfs-progs: map-logical: loosen the required trees to open the filesystem Qu Wenruo
2021-08-12  6:41   ` Nikolay Borisov
2021-08-12  5:35 ` [PATCH 4/4] btrfs-progs: map-logical: remove the extent item check Qu Wenruo

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=20210812053508.175737-2-wqu@suse.com \
    --to=wqu@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox