linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 00/12] Refactor btrfs_inode VS inode in delayed-inode.c
@ 2017-01-10 18:35 Nikolay Borisov
  2017-01-10 18:35 ` [PATCH 01/12] btrfs: Make btrfs_ino take a struct btrfs_inode Nikolay Borisov
                   ` (12 more replies)
  0 siblings, 13 replies; 15+ messages in thread
From: Nikolay Borisov @ 2017-01-10 18:35 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Nikolay Borisov

Hello, 

After following the discussion in [1] I took a look at what's the 
state of VFS-related members being used in core BTRFS code. It turned 
out there are quite a few functions which operate on struct btrfs_inode, 
yet take struct inode. As a result they have to resort ot excessive 
usage of BTRFS_I, furthermore passing inode around doesn't help the 
poor reader inferring why inode might be passed to a particular function. 

In order to better separate core btrfs functionalities from those part,
which interface with the VFS I took a look around the code and this is 
the result. I'd like to solicit opinions whether people think this 
refactoring is useful, since I have gathered a list of a lot more
functions which might use a bit of inode VS btrfs_inode changes. Also, 
a lot of function take inode just because btrfs_ino was taking an inode.

The patches are self-explanatory, with the first one dealing with 
btrfs_ino being the bulk of it. This paves the way to restructuring 
a lot of functions. 

If the maintainers think this should be merged I'd rather resend it 
as a single patch so as not to pollute the git history. This 
version can be used for fine-grained discussion and feedback. 


[1] http://marc.info/?l=linux-btrfs&m=148388138221778

Nikolay Borisov (12):
  btrfs: Make btrfs_ino take a struct btrfs_inode
  btrfs: Make btrfs_get_delayed_node take btrfs_inode
  btrfs: Make btrfs_get_or_create_delayed_node take btrfs_inode
  btrfs: Make btrfs_delayed_inode_reserve_metadata take btrfs_inode
  btrfs: Make btrfs_insert_delayed_dir_index take btrfs_inode
  btrfs: Make btrfs_delete_delayed_dir_index take btrfs_inode
  btrfs: Make btrfs_delayed_delete_inode_ref take btrfs_inode
  btrfs: Make btrfs_kill_delayed_inode_items take btrfs_inode
  btrfs: Make btrfs_remove_delayed_node take btrfs_inode
  btrfs: Make btrfs_commit_inode_delayed_inode take btrfs_inode
  btrfs: Make btrfs_commit_inode_delayed_items take btrfs_inode
  btrfs: Make btrfs_inode_delayed_dir_index_count take btrfs_inode

 fs/btrfs/btrfs_inode.h      |  10 ++--
 fs/btrfs/compression.c      |   2 +-
 fs/btrfs/delayed-inode.c    |  54 +++++++++---------
 fs/btrfs/delayed-inode.h    |  16 +++---
 fs/btrfs/dir-item.c         |   4 +-
 fs/btrfs/export.c           |  10 ++--
 fs/btrfs/extent-tree.c      |  10 ++--
 fs/btrfs/extent_io.c        |  10 ++--
 fs/btrfs/file-item.c        |   4 +-
 fs/btrfs/file.c             |  12 ++--
 fs/btrfs/free-space-cache.c |   2 +-
 fs/btrfs/inode.c            | 134 ++++++++++++++++++++++----------------------
 fs/btrfs/ioctl.c            |  26 ++++-----
 fs/btrfs/props.c            |   4 +-
 fs/btrfs/relocation.c       |  16 +++---
 fs/btrfs/transaction.c      |   4 +-
 fs/btrfs/tree-log.c         |  46 +++++++--------
 fs/btrfs/xattr.c            |  10 ++--
 18 files changed, 186 insertions(+), 188 deletions(-)

-- 
2.7.4


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2017-01-11 18:11 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-10 18:35 [RFC PATCH 00/12] Refactor btrfs_inode VS inode in delayed-inode.c Nikolay Borisov
2017-01-10 18:35 ` [PATCH 01/12] btrfs: Make btrfs_ino take a struct btrfs_inode Nikolay Borisov
2017-01-10 18:35 ` [PATCH 02/12] btrfs: Make btrfs_get_delayed_node take btrfs_inode Nikolay Borisov
2017-01-10 18:35 ` [PATCH 03/12] btrfs: Make btrfs_get_or_create_delayed_node " Nikolay Borisov
2017-01-10 18:35 ` [PATCH 04/12] btrfs: Make btrfs_delayed_inode_reserve_metadata " Nikolay Borisov
2017-01-10 18:35 ` [PATCH 05/12] btrfs: Make btrfs_insert_delayed_dir_index " Nikolay Borisov
2017-01-10 18:35 ` [PATCH 06/12] btrfs: Make btrfs_delete_delayed_dir_index " Nikolay Borisov
2017-01-10 18:35 ` [PATCH 07/12] btrfs: Make btrfs_delayed_delete_inode_ref " Nikolay Borisov
2017-01-10 18:35 ` [PATCH 08/12] btrfs: Make btrfs_kill_delayed_inode_items " Nikolay Borisov
2017-01-10 18:35 ` [PATCH 09/12] btrfs: Make btrfs_remove_delayed_node " Nikolay Borisov
2017-01-10 18:35 ` [PATCH 10/12] btrfs: Make btrfs_commit_inode_delayed_inode " Nikolay Borisov
2017-01-10 18:35 ` [PATCH 11/12] btrfs: Make btrfs_commit_inode_delayed_items " Nikolay Borisov
2017-01-10 18:35 ` [PATCH 12/12] btrfs: Make btrfs_inode_delayed_dir_index_count " Nikolay Borisov
2017-01-11 16:51 ` [RFC PATCH 00/12] Refactor btrfs_inode VS inode in delayed-inode.c David Sterba
2017-01-11 18:11   ` Nikolay Borisov

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).