diff options
Diffstat (limited to 'fs/ocfs2/dlmglue.c')
-rw-r--r-- | fs/ocfs2/dlmglue.c | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c index ecf58c6e2fa3..fa5e3bdc295d 100644 --- a/fs/ocfs2/dlmglue.c +++ b/fs/ocfs2/dlmglue.c | |||
@@ -224,7 +224,7 @@ static struct ocfs2_lock_res_ops ocfs2_inode_rw_lops = { | |||
224 | .flags = 0, | 224 | .flags = 0, |
225 | }; | 225 | }; |
226 | 226 | ||
227 | static struct ocfs2_lock_res_ops ocfs2_inode_meta_lops = { | 227 | static struct ocfs2_lock_res_ops ocfs2_inode_inode_lops = { |
228 | .get_osb = ocfs2_get_inode_osb, | 228 | .get_osb = ocfs2_get_inode_osb, |
229 | .check_downconvert = ocfs2_check_meta_downconvert, | 229 | .check_downconvert = ocfs2_check_meta_downconvert, |
230 | .set_lvb = ocfs2_set_meta_lvb, | 230 | .set_lvb = ocfs2_set_meta_lvb, |
@@ -306,7 +306,7 @@ static inline void ocfs2_recover_from_dlm_error(struct ocfs2_lock_res *lockres, | |||
306 | static int ocfs2_downconvert_thread(void *arg); | 306 | static int ocfs2_downconvert_thread(void *arg); |
307 | static void ocfs2_downconvert_on_unlock(struct ocfs2_super *osb, | 307 | static void ocfs2_downconvert_on_unlock(struct ocfs2_super *osb, |
308 | struct ocfs2_lock_res *lockres); | 308 | struct ocfs2_lock_res *lockres); |
309 | static int ocfs2_meta_lock_update(struct inode *inode, | 309 | static int ocfs2_inode_lock_update(struct inode *inode, |
310 | struct buffer_head **bh); | 310 | struct buffer_head **bh); |
311 | static void ocfs2_drop_osb_locks(struct ocfs2_super *osb); | 311 | static void ocfs2_drop_osb_locks(struct ocfs2_super *osb); |
312 | static inline int ocfs2_highest_compat_lock_level(int level); | 312 | static inline int ocfs2_highest_compat_lock_level(int level); |
@@ -396,7 +396,7 @@ void ocfs2_inode_lock_res_init(struct ocfs2_lock_res *res, | |||
396 | ops = &ocfs2_inode_rw_lops; | 396 | ops = &ocfs2_inode_rw_lops; |
397 | break; | 397 | break; |
398 | case OCFS2_LOCK_TYPE_META: | 398 | case OCFS2_LOCK_TYPE_META: |
399 | ops = &ocfs2_inode_meta_lops; | 399 | ops = &ocfs2_inode_inode_lops; |
400 | break; | 400 | break; |
401 | case OCFS2_LOCK_TYPE_OPEN: | 401 | case OCFS2_LOCK_TYPE_OPEN: |
402 | ops = &ocfs2_inode_open_lops; | 402 | ops = &ocfs2_inode_open_lops; |
@@ -1138,7 +1138,7 @@ int ocfs2_create_new_inode_locks(struct inode *inode) | |||
1138 | * We don't want to use LKM_LOCAL on a meta data lock as they | 1138 | * We don't want to use LKM_LOCAL on a meta data lock as they |
1139 | * don't use a generation in their lock names. | 1139 | * don't use a generation in their lock names. |
1140 | */ | 1140 | */ |
1141 | ret = ocfs2_create_new_lock(osb, &OCFS2_I(inode)->ip_meta_lockres, 1, 0); | 1141 | ret = ocfs2_create_new_lock(osb, &OCFS2_I(inode)->ip_inode_lockres, 1, 0); |
1142 | if (ret) { | 1142 | if (ret) { |
1143 | mlog_errno(ret); | 1143 | mlog_errno(ret); |
1144 | goto bail; | 1144 | goto bail; |
@@ -1346,11 +1346,11 @@ static u64 ocfs2_pack_timespec(struct timespec *spec) | |||
1346 | 1346 | ||
1347 | /* Call this with the lockres locked. I am reasonably sure we don't | 1347 | /* Call this with the lockres locked. I am reasonably sure we don't |
1348 | * need ip_lock in this function as anyone who would be changing those | 1348 | * need ip_lock in this function as anyone who would be changing those |
1349 | * values is supposed to be blocked in ocfs2_meta_lock right now. */ | 1349 | * values is supposed to be blocked in ocfs2_inode_lock right now. */ |
1350 | static void __ocfs2_stuff_meta_lvb(struct inode *inode) | 1350 | static void __ocfs2_stuff_meta_lvb(struct inode *inode) |
1351 | { | 1351 | { |
1352 | struct ocfs2_inode_info *oi = OCFS2_I(inode); | 1352 | struct ocfs2_inode_info *oi = OCFS2_I(inode); |
1353 | struct ocfs2_lock_res *lockres = &oi->ip_meta_lockres; | 1353 | struct ocfs2_lock_res *lockres = &oi->ip_inode_lockres; |
1354 | struct ocfs2_meta_lvb *lvb; | 1354 | struct ocfs2_meta_lvb *lvb; |
1355 | 1355 | ||
1356 | mlog_entry_void(); | 1356 | mlog_entry_void(); |
@@ -1400,7 +1400,7 @@ static void ocfs2_unpack_timespec(struct timespec *spec, | |||
1400 | static void ocfs2_refresh_inode_from_lvb(struct inode *inode) | 1400 | static void ocfs2_refresh_inode_from_lvb(struct inode *inode) |
1401 | { | 1401 | { |
1402 | struct ocfs2_inode_info *oi = OCFS2_I(inode); | 1402 | struct ocfs2_inode_info *oi = OCFS2_I(inode); |
1403 | struct ocfs2_lock_res *lockres = &oi->ip_meta_lockres; | 1403 | struct ocfs2_lock_res *lockres = &oi->ip_inode_lockres; |
1404 | struct ocfs2_meta_lvb *lvb; | 1404 | struct ocfs2_meta_lvb *lvb; |
1405 | 1405 | ||
1406 | mlog_entry_void(); | 1406 | mlog_entry_void(); |
@@ -1508,12 +1508,12 @@ static inline void ocfs2_complete_lock_res_refresh(struct ocfs2_lock_res *lockre | |||
1508 | } | 1508 | } |
1509 | 1509 | ||
1510 | /* may or may not return a bh if it went to disk. */ | 1510 | /* may or may not return a bh if it went to disk. */ |
1511 | static int ocfs2_meta_lock_update(struct inode *inode, | 1511 | static int ocfs2_inode_lock_update(struct inode *inode, |
1512 | struct buffer_head **bh) | 1512 | struct buffer_head **bh) |
1513 | { | 1513 | { |
1514 | int status = 0; | 1514 | int status = 0; |
1515 | struct ocfs2_inode_info *oi = OCFS2_I(inode); | 1515 | struct ocfs2_inode_info *oi = OCFS2_I(inode); |
1516 | struct ocfs2_lock_res *lockres = &oi->ip_meta_lockres; | 1516 | struct ocfs2_lock_res *lockres = &oi->ip_inode_lockres; |
1517 | struct ocfs2_dinode *fe; | 1517 | struct ocfs2_dinode *fe; |
1518 | struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); | 1518 | struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); |
1519 | 1519 | ||
@@ -1625,7 +1625,7 @@ static int ocfs2_assign_bh(struct inode *inode, | |||
1625 | * returns < 0 error if the callback will never be called, otherwise | 1625 | * returns < 0 error if the callback will never be called, otherwise |
1626 | * the result of the lock will be communicated via the callback. | 1626 | * the result of the lock will be communicated via the callback. |
1627 | */ | 1627 | */ |
1628 | int ocfs2_meta_lock_full(struct inode *inode, | 1628 | int ocfs2_inode_lock_full(struct inode *inode, |
1629 | struct buffer_head **ret_bh, | 1629 | struct buffer_head **ret_bh, |
1630 | int ex, | 1630 | int ex, |
1631 | int arg_flags) | 1631 | int arg_flags) |
@@ -1660,7 +1660,7 @@ int ocfs2_meta_lock_full(struct inode *inode, | |||
1660 | wait_event(osb->recovery_event, | 1660 | wait_event(osb->recovery_event, |
1661 | ocfs2_node_map_is_empty(osb, &osb->recovery_map)); | 1661 | ocfs2_node_map_is_empty(osb, &osb->recovery_map)); |
1662 | 1662 | ||
1663 | lockres = &OCFS2_I(inode)->ip_meta_lockres; | 1663 | lockres = &OCFS2_I(inode)->ip_inode_lockres; |
1664 | level = ex ? LKM_EXMODE : LKM_PRMODE; | 1664 | level = ex ? LKM_EXMODE : LKM_PRMODE; |
1665 | dlm_flags = 0; | 1665 | dlm_flags = 0; |
1666 | if (arg_flags & OCFS2_META_LOCK_NOQUEUE) | 1666 | if (arg_flags & OCFS2_META_LOCK_NOQUEUE) |
@@ -1699,11 +1699,11 @@ local: | |||
1699 | } | 1699 | } |
1700 | 1700 | ||
1701 | /* This is fun. The caller may want a bh back, or it may | 1701 | /* This is fun. The caller may want a bh back, or it may |
1702 | * not. ocfs2_meta_lock_update definitely wants one in, but | 1702 | * not. ocfs2_inode_lock_update definitely wants one in, but |
1703 | * may or may not read one, depending on what's in the | 1703 | * may or may not read one, depending on what's in the |
1704 | * LVB. The result of all of this is that we've *only* gone to | 1704 | * LVB. The result of all of this is that we've *only* gone to |
1705 | * disk if we have to, so the complexity is worthwhile. */ | 1705 | * disk if we have to, so the complexity is worthwhile. */ |
1706 | status = ocfs2_meta_lock_update(inode, &local_bh); | 1706 | status = ocfs2_inode_lock_update(inode, &local_bh); |
1707 | if (status < 0) { | 1707 | if (status < 0) { |
1708 | if (status != -ENOENT) | 1708 | if (status != -ENOENT) |
1709 | mlog_errno(status); | 1709 | mlog_errno(status); |
@@ -1725,7 +1725,7 @@ bail: | |||
1725 | *ret_bh = NULL; | 1725 | *ret_bh = NULL; |
1726 | } | 1726 | } |
1727 | if (acquired) | 1727 | if (acquired) |
1728 | ocfs2_meta_unlock(inode, ex); | 1728 | ocfs2_inode_unlock(inode, ex); |
1729 | } | 1729 | } |
1730 | 1730 | ||
1731 | if (local_bh) | 1731 | if (local_bh) |
@@ -1757,32 +1757,32 @@ bail: | |||
1757 | * ping locks back and forth, but that's a risk we're willing to take to avoid | 1757 | * ping locks back and forth, but that's a risk we're willing to take to avoid |
1758 | * the lock inversion simply. | 1758 | * the lock inversion simply. |
1759 | */ | 1759 | */ |
1760 | int ocfs2_meta_lock_with_page(struct inode *inode, | 1760 | int ocfs2_inode_lock_with_page(struct inode *inode, |
1761 | struct buffer_head **ret_bh, | 1761 | struct buffer_head **ret_bh, |
1762 | int ex, | 1762 | int ex, |
1763 | struct page *page) | 1763 | struct page *page) |
1764 | { | 1764 | { |
1765 | int ret; | 1765 | int ret; |
1766 | 1766 | ||
1767 | ret = ocfs2_meta_lock_full(inode, ret_bh, ex, OCFS2_LOCK_NONBLOCK); | 1767 | ret = ocfs2_inode_lock_full(inode, ret_bh, ex, OCFS2_LOCK_NONBLOCK); |
1768 | if (ret == -EAGAIN) { | 1768 | if (ret == -EAGAIN) { |
1769 | unlock_page(page); | 1769 | unlock_page(page); |
1770 | if (ocfs2_meta_lock(inode, ret_bh, ex) == 0) | 1770 | if (ocfs2_inode_lock(inode, ret_bh, ex) == 0) |
1771 | ocfs2_meta_unlock(inode, ex); | 1771 | ocfs2_inode_unlock(inode, ex); |
1772 | ret = AOP_TRUNCATED_PAGE; | 1772 | ret = AOP_TRUNCATED_PAGE; |
1773 | } | 1773 | } |
1774 | 1774 | ||
1775 | return ret; | 1775 | return ret; |
1776 | } | 1776 | } |
1777 | 1777 | ||
1778 | int ocfs2_meta_lock_atime(struct inode *inode, | 1778 | int ocfs2_inode_lock_atime(struct inode *inode, |
1779 | struct vfsmount *vfsmnt, | 1779 | struct vfsmount *vfsmnt, |
1780 | int *level) | 1780 | int *level) |
1781 | { | 1781 | { |
1782 | int ret; | 1782 | int ret; |
1783 | 1783 | ||
1784 | mlog_entry_void(); | 1784 | mlog_entry_void(); |
1785 | ret = ocfs2_meta_lock(inode, NULL, 0); | 1785 | ret = ocfs2_inode_lock(inode, NULL, 0); |
1786 | if (ret < 0) { | 1786 | if (ret < 0) { |
1787 | mlog_errno(ret); | 1787 | mlog_errno(ret); |
1788 | return ret; | 1788 | return ret; |
@@ -1795,8 +1795,8 @@ int ocfs2_meta_lock_atime(struct inode *inode, | |||
1795 | if (ocfs2_should_update_atime(inode, vfsmnt)) { | 1795 | if (ocfs2_should_update_atime(inode, vfsmnt)) { |
1796 | struct buffer_head *bh = NULL; | 1796 | struct buffer_head *bh = NULL; |
1797 | 1797 | ||
1798 | ocfs2_meta_unlock(inode, 0); | 1798 | ocfs2_inode_unlock(inode, 0); |
1799 | ret = ocfs2_meta_lock(inode, &bh, 1); | 1799 | ret = ocfs2_inode_lock(inode, &bh, 1); |
1800 | if (ret < 0) { | 1800 | if (ret < 0) { |
1801 | mlog_errno(ret); | 1801 | mlog_errno(ret); |
1802 | return ret; | 1802 | return ret; |
@@ -1813,11 +1813,11 @@ int ocfs2_meta_lock_atime(struct inode *inode, | |||
1813 | return ret; | 1813 | return ret; |
1814 | } | 1814 | } |
1815 | 1815 | ||
1816 | void ocfs2_meta_unlock(struct inode *inode, | 1816 | void ocfs2_inode_unlock(struct inode *inode, |
1817 | int ex) | 1817 | int ex) |
1818 | { | 1818 | { |
1819 | int level = ex ? LKM_EXMODE : LKM_PRMODE; | 1819 | int level = ex ? LKM_EXMODE : LKM_PRMODE; |
1820 | struct ocfs2_lock_res *lockres = &OCFS2_I(inode)->ip_meta_lockres; | 1820 | struct ocfs2_lock_res *lockres = &OCFS2_I(inode)->ip_inode_lockres; |
1821 | struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); | 1821 | struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); |
1822 | 1822 | ||
1823 | mlog_entry_void(); | 1823 | mlog_entry_void(); |
@@ -2495,7 +2495,7 @@ int ocfs2_drop_inode_locks(struct inode *inode) | |||
2495 | status = err; | 2495 | status = err; |
2496 | 2496 | ||
2497 | err = ocfs2_drop_lock(OCFS2_SB(inode->i_sb), | 2497 | err = ocfs2_drop_lock(OCFS2_SB(inode->i_sb), |
2498 | &OCFS2_I(inode)->ip_meta_lockres); | 2498 | &OCFS2_I(inode)->ip_inode_lockres); |
2499 | if (err < 0) | 2499 | if (err < 0) |
2500 | mlog_errno(err); | 2500 | mlog_errno(err); |
2501 | if (err < 0 && !status) | 2501 | if (err < 0 && !status) |