Re: [OPW kernel] [PATCH 3/3] btrfs_find_item expanded to include find_orphan_item functionality

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Nov 01, 2013 at 12:00:32AM -0700, Kelley Nielsen wrote:
> This is the third step in bootstrapping the btrfs_find_item interface.
> The function find_orphan_item, in orphan.c, is similar to the two
> functions already replaced by the new interface. It uses two parameters,
> which are already present in the interface, and is nearly identical to
> the function brought in in the previous patch.
> 
> The two calls to find_orphan_item have been replaced by calls to
> btrfs_find_item, with the defined object id and type that was used
> internally by find_orphan_item, a null path, and a null key. A test for
> a null path has been added to btrfs_find_item, and if it passes, a path
> is allocated and freed. Finally, find_orphan_item has been removed.

Again, use imperative voice, not passive voice.  Your commit message
should instruct the kernel to improve. :)

Replace the two calls to find_orphan_item ...

> Signed-off-by: Kelley Nielsen <kelleynnn@xxxxxxxxx>
> Suggested-by: Zach Brown <zab@xxxxxxxxxx>

One issue below.

>  fs/btrfs/ctree.c    | 18 +++++++++++++++---
>  fs/btrfs/disk-io.c  |  3 ++-
>  fs/btrfs/orphan.c   | 20 --------------------
>  fs/btrfs/tree-log.c |  3 ++-
>  4 files changed, 19 insertions(+), 25 deletions(-)
> 
> diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
> index 498b19d..83a5418 100644
> --- a/fs/btrfs/ctree.c
> +++ b/fs/btrfs/ctree.c
> @@ -2465,7 +2465,8 @@ static int key_search(struct extent_buffer *b, struct btrfs_key *key,
>  /* Proposed generic search function, meant to take the place of the
>  * various small search helper functions throughout the code and standardize
>  * the search interface. Right now, it only replaces the former __inode_info
> -* in backref.c, and the former btrfs_find_root_ref in root-tree.c.
> +* in backref.c, the former btrfs_find_root_ref in root-tree.c, and the
> +* former btrfs_find_orphan_item in orphan.c.

Hmmm.  I'd expected this comment to have disappeared by the end of the
patch series, once all the cases were handled.

- Josh Triplett
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux