From: David Sterba <dsterba@suse.cz>
To: Nikolay Borisov <nborisov@suse.com>
Cc: Marcos Paulo de Souza <mpdesouza@suse.com>,
linux-btrfs@vger.kernel.org, dsterba@suse.com
Subject: Re: [PATCH 1/8] fs: btrfs: Introduce btrfs_for_each_slot
Date: Tue, 31 Aug 2021 13:03:33 +0200 [thread overview]
Message-ID: <20210831110333.GF3379@twin.jikos.cz> (raw)
In-Reply-To: <99e18442-6ed7-f968-46e2-3491dee7ec12@suse.com>
On Mon, Aug 30, 2021 at 03:37:03PM +0300, Nikolay Borisov wrote:
> On 26.08.21 г. 19:40, Marcos Paulo de Souza wrote:
> > +/* Search for a valid slot for the given path.
> > + * @root: The root node of the tree.
> > + * @key: Will contain a valid item if found.
> > + * @path: The start point to validate the slot.
> > + *
> > + * Return 0 if the item is valid, 1 if not found and < 0 if error.
> > + */
> > +int btrfs_valid_slot(struct btrfs_root *root, struct btrfs_key *key,
>
> nit: The name of this function is a bit misleading since it's not really
> a predicate, more like a function that returns the value and if it can't
> return the current value pointed to by path it gets the next leaf. I
> guess a more apt name would be "btrfs_get_next_valid_item" or some such.
Yeah the function name is confusing, like a predicate. The suggested
name sounds good to me.
next prev parent reply other threads:[~2021-08-31 11:06 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-26 16:40 [PATCHv2 0/8] btrfs: Create macro to iterate slots Marcos Paulo de Souza
2021-08-26 16:40 ` [PATCH 1/8] fs: btrfs: Introduce btrfs_for_each_slot Marcos Paulo de Souza
2021-08-30 12:37 ` Nikolay Borisov
2021-08-31 11:03 ` David Sterba [this message]
2021-08-31 11:06 ` David Sterba
2021-08-26 16:40 ` [PATCH 2/8] btrfs: block-group: use btrfs_for_each_slot in find_first_block_group Marcos Paulo de Souza
2021-08-26 16:40 ` [PATCH 3/8] btrfs: dev-replace: Use btrfs_for_each_slot in mark_block_group_to_copy Marcos Paulo de Souza
2021-08-26 16:40 ` [PATCH 4/8] btrfs: dir-item: use btrfs_for_each_slot in btrfs_search_dir_index_item Marcos Paulo de Souza
2021-08-26 16:40 ` [PATCH 5/8] btrfs: inode: use btrfs_for_each_slot in btrfs_read_readdir Marcos Paulo de Souza
2021-08-30 13:05 ` Nikolay Borisov
2021-08-31 11:10 ` David Sterba
2021-08-31 11:27 ` Nikolay Borisov
2021-08-26 16:40 ` [PATCH 6/8] btrfs: send: Use btrfs_for_each_slot macro Marcos Paulo de Souza
2021-08-30 13:53 ` Nikolay Borisov
2021-08-26 16:40 ` [PATCH 7/8] btrfs: volumes: use btrfs_for_each_slot in btrfs_read_chunk_tree Marcos Paulo de Souza
2021-08-26 16:40 ` [PATCH 8/8] btrfs: xattr: Use btrfs_for_each_slot macro in btrfs_listxattr Marcos Paulo de Souza
2021-08-26 18:06 ` [PATCHv2 0/8] btrfs: Create macro to iterate slots Marcos Paulo de Souza
2021-08-31 11:17 ` 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=20210831110333.GF3379@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=dsterba@suse.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=mpdesouza@suse.com \
--cc=nborisov@suse.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 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).