inode.c (6e5a3d7538ad4e46a976862f593faf65750e37cc) | inode.c (8cb471e8f82506937fe5e2e9fb0bf90f6b1f1170) |
---|---|
1/* -*- mode: c; c-basic-offset: 8; -*- 2 * vim: noexpandtab sw=8 ts=8 sts=0: 3 * 4 * inode.c 5 * 6 * vfs' aops, fops, dops and iops 7 * 8 * Copyright (C) 2002, 2004 Oracle. All rights reserved. --- 648 unchanged lines hidden (view full) --- 657 di->i_flags &= cpu_to_le32(~(OCFS2_VALID_FL | OCFS2_ORPHANED_FL)); 658 659 status = ocfs2_journal_dirty(handle, di_bh); 660 if (status < 0) { 661 mlog_errno(status); 662 goto bail_commit; 663 } 664 | 1/* -*- mode: c; c-basic-offset: 8; -*- 2 * vim: noexpandtab sw=8 ts=8 sts=0: 3 * 4 * inode.c 5 * 6 * vfs' aops, fops, dops and iops 7 * 8 * Copyright (C) 2002, 2004 Oracle. All rights reserved. --- 648 unchanged lines hidden (view full) --- 657 di->i_flags &= cpu_to_le32(~(OCFS2_VALID_FL | OCFS2_ORPHANED_FL)); 658 659 status = ocfs2_journal_dirty(handle, di_bh); 660 if (status < 0) { 661 mlog_errno(status); 662 goto bail_commit; 663 } 664 |
665 ocfs2_remove_from_cache(inode, di_bh); | 665 ocfs2_remove_from_cache(INODE_CACHE(inode), di_bh); |
666 vfs_dq_free_inode(inode); 667 668 status = ocfs2_free_dinode(handle, inode_alloc_inode, 669 inode_alloc_bh, di); 670 if (status < 0) 671 mlog_errno(status); 672 673bail_commit: --- 433 unchanged lines hidden (view full) --- 1107 status = ocfs2_drop_inode_locks(inode); 1108 if (status < 0) 1109 mlog_errno(status); 1110 1111 ocfs2_lock_res_free(&oi->ip_rw_lockres); 1112 ocfs2_lock_res_free(&oi->ip_inode_lockres); 1113 ocfs2_lock_res_free(&oi->ip_open_lockres); 1114 | 666 vfs_dq_free_inode(inode); 667 668 status = ocfs2_free_dinode(handle, inode_alloc_inode, 669 inode_alloc_bh, di); 670 if (status < 0) 671 mlog_errno(status); 672 673bail_commit: --- 433 unchanged lines hidden (view full) --- 1107 status = ocfs2_drop_inode_locks(inode); 1108 if (status < 0) 1109 mlog_errno(status); 1110 1111 ocfs2_lock_res_free(&oi->ip_rw_lockres); 1112 ocfs2_lock_res_free(&oi->ip_inode_lockres); 1113 ocfs2_lock_res_free(&oi->ip_open_lockres); 1114 |
1115 ocfs2_metadata_cache_purge(inode); | 1115 ocfs2_metadata_cache_purge(INODE_CACHE(inode)); |
1116 | 1116 |
1117 mlog_bug_on_msg(oi->ip_metadata_cache.ci_num_cached, | 1117 mlog_bug_on_msg(INODE_CACHE(inode)->ci_num_cached, |
1118 "Clear inode of %llu, inode has %u cache items\n", | 1118 "Clear inode of %llu, inode has %u cache items\n", |
1119 (unsigned long long)oi->ip_blkno, oi->ip_metadata_cache.ci_num_cached); | 1119 (unsigned long long)oi->ip_blkno, 1120 INODE_CACHE(inode)->ci_num_cached); |
1120 | 1121 |
1121 mlog_bug_on_msg(!(oi->ip_metadata_cache.ci_flags & 1122 OCFS2_CACHE_FL_INLINE), | 1122 mlog_bug_on_msg(!(INODE_CACHE(inode)->ci_flags & OCFS2_CACHE_FL_INLINE), |
1123 "Clear inode of %llu, inode has a bad flag\n", 1124 (unsigned long long)oi->ip_blkno); 1125 1126 mlog_bug_on_msg(spin_is_locked(&oi->ip_lock), 1127 "Clear inode of %llu, inode is locked\n", 1128 (unsigned long long)oi->ip_blkno); 1129 1130 mlog_bug_on_msg(!mutex_trylock(&oi->ip_io_mutex), --- 245 unchanged lines hidden (view full) --- 1376} 1377 1378int ocfs2_read_inode_block_full(struct inode *inode, struct buffer_head **bh, 1379 int flags) 1380{ 1381 int rc; 1382 struct buffer_head *tmp = *bh; 1383 | 1123 "Clear inode of %llu, inode has a bad flag\n", 1124 (unsigned long long)oi->ip_blkno); 1125 1126 mlog_bug_on_msg(spin_is_locked(&oi->ip_lock), 1127 "Clear inode of %llu, inode is locked\n", 1128 (unsigned long long)oi->ip_blkno); 1129 1130 mlog_bug_on_msg(!mutex_trylock(&oi->ip_io_mutex), --- 245 unchanged lines hidden (view full) --- 1376} 1377 1378int ocfs2_read_inode_block_full(struct inode *inode, struct buffer_head **bh, 1379 int flags) 1380{ 1381 int rc; 1382 struct buffer_head *tmp = *bh; 1383 |
1384 rc = ocfs2_read_blocks(inode, OCFS2_I(inode)->ip_blkno, 1, &tmp, 1385 flags, ocfs2_validate_inode_block); | 1384 rc = ocfs2_read_blocks(INODE_CACHE(inode), OCFS2_I(inode)->ip_blkno, 1385 1, &tmp, flags, ocfs2_validate_inode_block); |
1386 1387 /* If ocfs2_read_blocks() got us a new bh, pass it up. */ 1388 if (!rc && !*bh) 1389 *bh = tmp; 1390 1391 return rc; 1392} 1393 --- 9 unchanged lines hidden (view full) --- 1403 1404static u64 ocfs2_inode_cache_owner(struct ocfs2_caching_info *ci) 1405{ 1406 struct ocfs2_inode_info *oi = cache_info_to_inode(ci); 1407 1408 return oi->ip_blkno; 1409} 1410 | 1386 1387 /* If ocfs2_read_blocks() got us a new bh, pass it up. */ 1388 if (!rc && !*bh) 1389 *bh = tmp; 1390 1391 return rc; 1392} 1393 --- 9 unchanged lines hidden (view full) --- 1403 1404static u64 ocfs2_inode_cache_owner(struct ocfs2_caching_info *ci) 1405{ 1406 struct ocfs2_inode_info *oi = cache_info_to_inode(ci); 1407 1408 return oi->ip_blkno; 1409} 1410 |
1411static struct super_block *ocfs2_inode_cache_get_super(struct ocfs2_caching_info *ci) 1412{ 1413 struct ocfs2_inode_info *oi = cache_info_to_inode(ci); 1414 1415 return oi->vfs_inode.i_sb; 1416} 1417 |
|
1411static void ocfs2_inode_cache_lock(struct ocfs2_caching_info *ci) 1412{ 1413 struct ocfs2_inode_info *oi = cache_info_to_inode(ci); 1414 1415 spin_lock(&oi->ip_lock); 1416} 1417 1418static void ocfs2_inode_cache_unlock(struct ocfs2_caching_info *ci) --- 14 unchanged lines hidden (view full) --- 1433{ 1434 struct ocfs2_inode_info *oi = cache_info_to_inode(ci); 1435 1436 mutex_unlock(&oi->ip_io_mutex); 1437} 1438 1439const struct ocfs2_caching_operations ocfs2_inode_caching_ops = { 1440 .co_owner = ocfs2_inode_cache_owner, | 1418static void ocfs2_inode_cache_lock(struct ocfs2_caching_info *ci) 1419{ 1420 struct ocfs2_inode_info *oi = cache_info_to_inode(ci); 1421 1422 spin_lock(&oi->ip_lock); 1423} 1424 1425static void ocfs2_inode_cache_unlock(struct ocfs2_caching_info *ci) --- 14 unchanged lines hidden (view full) --- 1440{ 1441 struct ocfs2_inode_info *oi = cache_info_to_inode(ci); 1442 1443 mutex_unlock(&oi->ip_io_mutex); 1444} 1445 1446const struct ocfs2_caching_operations ocfs2_inode_caching_ops = { 1447 .co_owner = ocfs2_inode_cache_owner, |
1448 .co_get_super = ocfs2_inode_cache_get_super, |
|
1441 .co_cache_lock = ocfs2_inode_cache_lock, 1442 .co_cache_unlock = ocfs2_inode_cache_unlock, 1443 .co_io_lock = ocfs2_inode_cache_io_lock, 1444 .co_io_unlock = ocfs2_inode_cache_io_unlock, 1445}; 1446 | 1449 .co_cache_lock = ocfs2_inode_cache_lock, 1450 .co_cache_unlock = ocfs2_inode_cache_unlock, 1451 .co_io_lock = ocfs2_inode_cache_io_lock, 1452 .co_io_unlock = ocfs2_inode_cache_io_unlock, 1453}; 1454 |