linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: damenly.su@gmail.com
To: linux-btrfs@vger.kernel.org
Cc: Damenly_Su@gmx.com
Subject: [PATCH 1/2] btrfs-progs: add comments of block group lookup functions
Date: Mon, 11 Nov 2019 16:42:25 +0800	[thread overview]
Message-ID: <20191111084226.475957-1-Damenly_Su@gmx.com> (raw)

From: Su Yue <Damenly_Su@gmx.com>

The progs side function btrfs_lookup_first_block_group() calls
find_first_extent_bit() to find block group which contains bytenr
or after the bytenr. This behavior differs from kernel code, so
add the comments.

Add the coments of btrfs_lookup_block_group() too, this one works
like kernel side.

Signed-off-by: Su Yue <Damenly_Su@gmx.com>
---
 extent-tree.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/extent-tree.c b/extent-tree.c
index d67e4098351f..f690ae999f37 100644
--- a/extent-tree.c
+++ b/extent-tree.c
@@ -164,6 +164,9 @@ err:
 	return 0;
 }
 
+/*
+ * Return the block group that contains or after bytenr
+ */
 struct btrfs_block_group_cache *btrfs_lookup_first_block_group(struct
 						       btrfs_fs_info *info,
 						       u64 bytenr)
@@ -193,6 +196,9 @@ struct btrfs_block_group_cache *btrfs_lookup_first_block_group(struct
 	return block_group;
 }
 
+/*
+ * Return the block group that contains the given bytenr
+ */
 struct btrfs_block_group_cache *btrfs_lookup_block_group(struct
 							 btrfs_fs_info *info,
 							 u64 bytenr)
-- 
2.23.0


             reply	other threads:[~2019-11-11  8:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-11  8:42 damenly.su [this message]
2019-11-11  8:42 ` [PATCH 2/2] btrfs-progs: check: call btrfs_lookup_block_group() instead in check_extent_type() damenly.su
2019-11-11  9:28 ` [PATCH 1/2] btrfs-progs: add comments of block group lookup functions Qu Wenruo
2019-11-11  9:49   ` Su Yue
2019-11-11 10:03     ` Qu Wenruo
2019-11-11 10:17       ` Su Yue
2019-11-15 16:17         ` David Sterba
2019-11-15 16:20 ` David Sterba

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=20191111084226.475957-1-Damenly_Su@gmx.com \
    --to=damenly.su@gmail.com \
    --cc=Damenly_Su@gmx.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;
as well as URLs for NNTP newsgroup(s).