On Tue, Jul 11, 2017 at 05:11:16PM +0800, Qu Wenruo wrote:
> Any comment?

Patches applied, sorry for the delay.

> 在 2017年06月13日 17:19, Qu Wenruo 写道:
> > This is the part 2 patchset to refactor btrfs_root usage to
> > btrfs_fs_info.
> >
> > The most obvious advantage is to make function calls a little shorter,
> > and less confused.
> > Function calls like btrfs_alloc_data_chunk() needs caller to pass a
> > btrfs_root parameter, while the parameter should always be
> > fs_info->extent_root, grab it inside that function is much more safer
> > than allowing user to pass in a random root.
> >
> > Another advantage is to make it easier to sync some headers with kernel.
> > In fact, when I'm not sure if I should convert one function, I normally
> > check kernel code to find the parameter of kernel equivalent.
> > So when we are going to sync (part of) the headers with kernel, it will
> > reduce the work.
> >
> > Part 2 focus on the exported functions mainly in disk-io.h and
> > volumes.h.
> > Now most tree blocks/extents read/write, device scan/read, chunk
> > allocation/initialization functions are all using fs_info.
> >
> > I'm quite sure there is a lot of remaining functions to be refactored,
> > but I prefer to do it step by step.

Yes, this would be better.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to