ocfs2: Detach ocfs2 metadata I/O from struct inode
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 of 40 patches 0 repliesNew
4 of 40 patches are in this archive. The cover letter announces 40.
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 4/40 | ocfs2: move ip_last_trans to struct ocfs2_caching_info | +0 | 1 reply | |
| 5/40 | ocfs2: move ip_created_trans to struct ocfs2_caching_info | +0 | 1 reply | |
| 5/40 | ocfs2: move ip_created_trans to struct ocfs2_caching_info | +0 | 0 replies | |
| 6/40 | ocfs2: Pass struct ocfs2_caching_info to the journal functions. | +0 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [Ocfs2-devel] [PATCH 0/40] ocfs2: Detach ocfs2 metadata I/O from struct inode
Hi Joel,
I deem that 1-3 is the same as the patch you sent to me several days
ago. right? As I have reviewed them before, so didn't touch them this time.
For 4~7, read them and like them. Just small comments ;) For 8~40, since they are just replacing parameters. Just skim them.
anyway, They are cool and relieve me from my current work. Thank you very much.
For all the patches, Acked-by: Tao Ma <[email protected]>
Regards,
Tao
Quoted 127 lines · Joel Becker
The following series of patches attempts to detach metadata I/O from
struct inode. They are currently tied together pretty tightly.
Metadata reads happen via theocfs2_read_blocks()functions, writes via both jbd2 andocfs2_write_blocks().- Each inode has a cache of associated metadata blocks stored on its
ip_metadata_cachemember. The ocfs2_read/write_blocks() functions take a struct inode to access this member.- The journal mostly doesn't care about inodes. It does, however, need to set the transaction id on the inode so that dlmglue knows when an inode needs to checkpoint.
- All the metadata I/O paths use
ip_io_mutexto synchronize their actions against each other.The problem is that if someone wants to use our metadata I/O facilities, they have to have a struct inode. But not everything in ocfs2 is an inode (even if it seems that way sometimes). So we want to disconnect them.
It turns out that most of what goes on is about
ocfs2_caching_info. So if we move the last few relevant bits toocfs2_caching_info, we can then embedocfs2_caching_infointo another structure just as easily as we do inside struct inode. That's the theory, anyway.The first three patches move the cache code to
ocfs2_caching_infoentirely. The functions affecting the metadata cache, likeocfs2_set_buffer_uptodate(), etc, take a structocfs2_caching_infoinstead of a struct inode. That sort of thing. It's nice and easy.The next three patches move the journal transaction ids to struct
ocfs2_caching_info. When they are done, the ocfs2_journal_access*() functions take a stuctocfs2_caching_info, and the dlmglue checks theocfs2_caching_inforegarding checkpoints. So it only takes us six patches to isolateocfs2_caching_infoin the metadata I/O API.The remaining 34 patches slowly but surely move
alloc.cto the new API. Our btree code is heavily invested in the idea that all btrees are rooted, somehow, at an inode. Since we want to root a btree at a non-inode, we need to fix that. The good news, of course, is that theocfs2_extent_treeabstraction is already there to rescue us. We attach theocfs2_caching_infoto a particularocfs2_extent_tree, and we can then send thatocfs2_extent_treedown through the btree code. At the end of this series, the generic btree code doesn't reference struct inode at all.There are a lot of patches because this entire series is supposed to be isomorphic. No behavior is to change, just the flexibility of our API. Thus, each patch tries to be readily understandable. Thank you for your patience!
[View]
http://oss.oracle.com/git/?p=jlbec/linux-2.6.git;a=shortlog;h=cacheme
[Pull]git://oss.oracle.com/git/jlbec/linux-2.6.gitcachemeJoel Becker (40):
ocfs2: Make theocfs2_caching_infostructure self-contained.
ocfs2: Change metadata caching locks to an operations structure.
ocfs2: Take the inode out of the metadata read/write paths.
ocfs2: moveip_last_transto structocfs2_caching_info
ocfs2: moveip_created_transto structocfs2_caching_info
ocfs2: Pass structocfs2_caching_infoto the journal functions.
ocfs2: Store theocfs2_caching_infoonocfs2_extent_tree.
ocfs2: Passocfs2_caching_infotoocfs2_read_extent_block().
ocfs2:ocfs2_find_path()only needs the caching info
ocfs2:ocfs2_create_new_meta_bhs()doesn't need struct inode.
ocfs2: Passocfs2_extent_treetoocfs2_unlink_path()
ocfs2:ocfs2_complete_edge_insert()doesn't need struct inode at all.
ocfs2: Get inode out ofocfs2_rotate_subtree_root_right().
ocfs2: Passocfs2_extent_treetoocfs2_get_subtree_root()
ocfs2: Drop struct inode fromocfs2_extent_tree_operations.
ocfs2:ocfs2_rotate_tree_right()doesn't need struct inode.
ocfs2:ocfs2_update_edge_lengths()doesn't need struct inode.
ocfs2:ocfs2_rotate_subtree_left()doesn't need struct inode.
ocfs2:__ocfs2_rotate_tree_left()doesn't need struct inode.
ocfs2:ocfs2_rotate_tree_left()no longer needs struct inode.
ocfs2: ocfs2_merge_rec_left/right() no longer need struct inode.
ocfs2:ocfs2_try_to_merge_extent()doesn't need struct inode.
ocfs2:ocfs2_grow_branch()no longer needs struct inode.
ocfs2:ocfs2_append_rec_to_path()loses struct inode.
ocfs2:ocfs2_truncate_rec()doesn't need struct inode.
ocfs2: Make truncating the extent map anextent_tree_operation.
ocfs2:ocfs2_insert_at_leaf()doesn't need struct inode.
ocfs2: Giveocfs2_split_record()anextent_treeinstead of an inode.
ocfs2:ocfs2_do_insert_extent()andocfs2_insert_path()no longer need an
ocfs2:ocfs2_extent_contig()only requires the superblock.
ocfs2: Swap inode forextent_treeinocfs2_figure_merge_contig_type().
ocfs2: Remove inode fromocfs2_figure_extent_contig().
ocfs2:ocfs2_figure_insert_type()no longer needs struct inode.
ocfs2: Make extent map insertion anextent_tree_operation.
ocfs2:ocfs2_insert_extent()no longer needs struct inode.
ocfs2:ocfs2_add_clusters_in_btree()no longer needs struct inode.
ocfs2:ocfs2_remove_extent()no longer needs struct inode.
ocfs2:ocfs2_split_and_insert()no longer needs struct inode.
ocfs2:__ocfs2_mark_extent_written()doesn't need struct inode.
ocfs2: Passocfs2_caching_infointo ocfs_init_*_extent_tree().alloc.c | 896 ++++++++++++++++++++++++++++--------------------------- alloc.h | 33 -- aops.c | 10 buffer_head_io.c | 47 +- buffer_head_io.h | 8 dir.c | 38 +- dlmglue.c | 4 extent_map.c | 14 file.c | 21 - inode.c | 80 ++++ inode.h | 20 - journal.c | 53 +-- journal.h | 70 ++-- localalloc.c | 12 namei.c | 37 +- ocfs2.h | 38 ++ quota_global.c | 5 quota_local.c | 16 resize.c | 16 slot_map.c | 10 suballoc.c | 35 +- super.c | 5 uptodate.c | 265 +++++++++------- uptodate.h | 51 ++- xattr.c | 81 ++-- 25 files changed, 1056 insertions(+), 809 deletions(-)