diff options
author | Joel Becker <joel.becker@oracle.com> | 2009-02-13 06:54:22 -0500 |
---|---|---|
committer | Joel Becker <joel.becker@oracle.com> | 2009-09-04 19:08:13 -0400 |
commit | 5e404e9ed1b05cafb044bd46792e50197df805ed (patch) | |
tree | e3146e03f8a0fc12307db0cbea900728a36ffaac /fs/ocfs2/alloc.c | |
parent | a1cf076ba93f9fdf3eb4195f9f43d1e7cb7550f2 (diff) |
ocfs2: Pass ocfs2_caching_info into ocfs_init_*_extent_tree().
With this commit, extent tree operations are divorced from inodes and
rely on ocfs2_caching_info. Phew!
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'fs/ocfs2/alloc.c')
-rw-r--r-- | fs/ocfs2/alloc.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index 4488685a7022..ab4d2b59b472 100644 --- a/fs/ocfs2/alloc.c +++ b/fs/ocfs2/alloc.c | |||
@@ -366,7 +366,7 @@ static struct ocfs2_extent_tree_operations ocfs2_dx_root_et_ops = { | |||
366 | }; | 366 | }; |
367 | 367 | ||
368 | static void __ocfs2_init_extent_tree(struct ocfs2_extent_tree *et, | 368 | static void __ocfs2_init_extent_tree(struct ocfs2_extent_tree *et, |
369 | struct inode *inode, | 369 | struct ocfs2_caching_info *ci, |
370 | struct buffer_head *bh, | 370 | struct buffer_head *bh, |
371 | ocfs2_journal_access_func access, | 371 | ocfs2_journal_access_func access, |
372 | void *obj, | 372 | void *obj, |
@@ -374,7 +374,7 @@ static void __ocfs2_init_extent_tree(struct ocfs2_extent_tree *et, | |||
374 | { | 374 | { |
375 | et->et_ops = ops; | 375 | et->et_ops = ops; |
376 | et->et_root_bh = bh; | 376 | et->et_root_bh = bh; |
377 | et->et_ci = INODE_CACHE(inode); | 377 | et->et_ci = ci; |
378 | et->et_root_journal_access = access; | 378 | et->et_root_journal_access = access; |
379 | if (!obj) | 379 | if (!obj) |
380 | obj = (void *)bh->b_data; | 380 | obj = (void *)bh->b_data; |
@@ -388,34 +388,34 @@ static void __ocfs2_init_extent_tree(struct ocfs2_extent_tree *et, | |||
388 | } | 388 | } |
389 | 389 | ||
390 | void ocfs2_init_dinode_extent_tree(struct ocfs2_extent_tree *et, | 390 | void ocfs2_init_dinode_extent_tree(struct ocfs2_extent_tree *et, |
391 | struct inode *inode, | 391 | struct ocfs2_caching_info *ci, |
392 | struct buffer_head *bh) | 392 | struct buffer_head *bh) |
393 | { | 393 | { |
394 | __ocfs2_init_extent_tree(et, inode, bh, ocfs2_journal_access_di, | 394 | __ocfs2_init_extent_tree(et, ci, bh, ocfs2_journal_access_di, |
395 | NULL, &ocfs2_dinode_et_ops); | 395 | NULL, &ocfs2_dinode_et_ops); |
396 | } | 396 | } |
397 | 397 | ||
398 | void ocfs2_init_xattr_tree_extent_tree(struct ocfs2_extent_tree *et, | 398 | void ocfs2_init_xattr_tree_extent_tree(struct ocfs2_extent_tree *et, |
399 | struct inode *inode, | 399 | struct ocfs2_caching_info *ci, |
400 | struct buffer_head *bh) | 400 | struct buffer_head *bh) |
401 | { | 401 | { |
402 | __ocfs2_init_extent_tree(et, inode, bh, ocfs2_journal_access_xb, | 402 | __ocfs2_init_extent_tree(et, ci, bh, ocfs2_journal_access_xb, |
403 | NULL, &ocfs2_xattr_tree_et_ops); | 403 | NULL, &ocfs2_xattr_tree_et_ops); |
404 | } | 404 | } |
405 | 405 | ||
406 | void ocfs2_init_xattr_value_extent_tree(struct ocfs2_extent_tree *et, | 406 | void ocfs2_init_xattr_value_extent_tree(struct ocfs2_extent_tree *et, |
407 | struct inode *inode, | 407 | struct ocfs2_caching_info *ci, |
408 | struct ocfs2_xattr_value_buf *vb) | 408 | struct ocfs2_xattr_value_buf *vb) |
409 | { | 409 | { |
410 | __ocfs2_init_extent_tree(et, inode, vb->vb_bh, vb->vb_access, vb, | 410 | __ocfs2_init_extent_tree(et, ci, vb->vb_bh, vb->vb_access, vb, |
411 | &ocfs2_xattr_value_et_ops); | 411 | &ocfs2_xattr_value_et_ops); |
412 | } | 412 | } |
413 | 413 | ||
414 | void ocfs2_init_dx_root_extent_tree(struct ocfs2_extent_tree *et, | 414 | void ocfs2_init_dx_root_extent_tree(struct ocfs2_extent_tree *et, |
415 | struct inode *inode, | 415 | struct ocfs2_caching_info *ci, |
416 | struct buffer_head *bh) | 416 | struct buffer_head *bh) |
417 | { | 417 | { |
418 | __ocfs2_init_extent_tree(et, inode, bh, ocfs2_journal_access_dr, | 418 | __ocfs2_init_extent_tree(et, ci, bh, ocfs2_journal_access_dr, |
419 | NULL, &ocfs2_dx_root_et_ops); | 419 | NULL, &ocfs2_dx_root_et_ops); |
420 | } | 420 | } |
421 | 421 | ||
@@ -7241,7 +7241,7 @@ int ocfs2_convert_inline_data_to_extents(struct inode *inode, | |||
7241 | * this proves to be false, we could always re-build | 7241 | * this proves to be false, we could always re-build |
7242 | * the in-inode data from our pages. | 7242 | * the in-inode data from our pages. |
7243 | */ | 7243 | */ |
7244 | ocfs2_init_dinode_extent_tree(&et, inode, di_bh); | 7244 | ocfs2_init_dinode_extent_tree(&et, INODE_CACHE(inode), di_bh); |
7245 | ret = ocfs2_insert_extent(handle, &et, 0, block, 1, 0, NULL); | 7245 | ret = ocfs2_insert_extent(handle, &et, 0, block, 1, 0, NULL); |
7246 | if (ret) { | 7246 | if (ret) { |
7247 | mlog_errno(ret); | 7247 | mlog_errno(ret); |