From: Nikolay Borisov <nborisov@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: Nikolay Borisov <nborisov@suse.com>
Subject: [PATCH 01/10] btrfs-progs: Drop ext_ref parameter from find_inode_ref
Date: Tue, 27 Mar 2018 10:19:23 +0300 [thread overview]
Message-ID: <1522135172-8276-2-git-send-email-nborisov@suse.com> (raw)
In-Reply-To: <1522135172-8276-1-git-send-email-nborisov@suse.com>
This is a boolean parameter which signals whether the fs has the
EXTENDED_IREF feature flag toggled or not. Since a reference to fs_info
can be obtained there is no need to pollute the interface.
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
---
check/mode-lowmem.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/check/mode-lowmem.c b/check/mode-lowmem.c
index dac3201b7d99..a8a2f76549a2 100644
--- a/check/mode-lowmem.c
+++ b/check/mode-lowmem.c
@@ -921,14 +921,13 @@ static int check_inode_extref(struct btrfs_root *root,
* @namelen: the length of name in the INODE_REF/INODE_EXTREF
* @index_ret: the index in the INODE_REF/INODE_EXTREF,
* value (64)-1 means do not check index
- * @ext_ref: the EXTENDED_IREF feature
*
* Return 0 if no error occurred.
* Return >0 for error bitmap
*/
static int find_inode_ref(struct btrfs_root *root, struct btrfs_key *key,
- char *name, int namelen, u64 *index_ret,
- unsigned int ext_ref)
+ char *name, int namelen, u64 *index_ret)
+
{
struct btrfs_path path;
struct btrfs_inode_ref *ref;
@@ -1001,8 +1000,9 @@ static int find_inode_ref(struct btrfs_root *root, struct btrfs_key *key,
}
extref:
+
/* Skip if not support EXTENDED_IREF feature */
- if (!ext_ref)
+ if (!btrfs_fs_incompat(root->fs_info, EXTENDED_IREF))
goto out;
btrfs_release_path(&path);
@@ -1311,8 +1311,7 @@ static int check_dir_item(struct btrfs_root *root, struct btrfs_key *di_key,
key.objectid = location.objectid;
key.type = BTRFS_INODE_REF_KEY;
key.offset = di_key->objectid;
- tmp_err |= find_inode_ref(root, &key, namebuf, len,
- &index, ext_ref);
+ tmp_err |= find_inode_ref(root, &key, namebuf, len, &index);
/* check relative INDEX/ITEM */
key.objectid = di_key->objectid;
@@ -4241,7 +4240,7 @@ static int check_fs_first_inode(struct btrfs_root *root, unsigned int ext_ref)
/* special index value */
index = 0;
- ret = find_inode_ref(root, &key, "..", strlen(".."), &index, ext_ref);
+ ret = find_inode_ref(root, &key, "..", strlen(".."), &index);
if (ret < 0)
goto out;
err |= ret;
--
2.7.4
next prev parent reply other threads:[~2018-03-27 7:19 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-27 7:19 [PATCH 00/10] Simplify function interfaces Nikolay Borisov
2018-03-27 7:19 ` Nikolay Borisov [this message]
2018-03-27 7:19 ` [PATCH 02/10] btrfs-progs: Drop ext_ref param from check_dir_item Nikolay Borisov
2018-03-27 7:19 ` [PATCH 03/10] btrfs-progs: Drop ext_ref argument from check_inode_item Nikolay Borisov
2018-03-27 7:19 ` [PATCH 04/10] btrfs-progs: Drop unused ext_ref parameter from process_one_leaf Nikolay Borisov
2018-03-27 7:19 ` [PATCH 05/10] btrfs-progs: Remove ext_ref param from check_fs_first_inode Nikolay Borisov
2018-03-27 7:19 ` [PATCH 06/10] btrfs-progs: Remove ext_ref param from walk_down_tree Nikolay Borisov
2018-03-27 7:19 ` [PATCH 07/10] btrfs-progs: Drop ext_ref param from check_fs_first_inode Nikolay Borisov
2018-03-27 7:19 ` [PATCH 08/10] btrfs-progs: Drop ext_ref arument from check_fs_root Nikolay Borisov
2018-03-27 7:19 ` [PATCH 09/10] btrfs-progs: Remove ext_ref local variable from check_fs_roots_lowmem Nikolay Borisov
2018-03-27 7:19 ` [PATCH 10/10] btrfs-progs: Make __btrfs_fs_incompat return bool Nikolay Borisov
2018-03-27 7:38 ` [PATCH 00/10] Simplify function interfaces Su Yue
2018-05-02 5:50 ` Nikolay Borisov
2018-05-09 11:34 ` 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=1522135172-8276-2-git-send-email-nborisov@suse.com \
--to=nborisov@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;
as well as URLs for NNTP newsgroup(s).