diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-21 10:20:17 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-21 10:20:17 -0400 |
commit | 03e62303cf56e87337115f14842321043df2b4bb (patch) | |
tree | 3024495955beccddbae347d99613bcdd33801ee4 /fs/ocfs2/dlm/dlmmaster.c | |
parent | 33cf23b0a535475aead57707cb9f4fe135a93544 (diff) | |
parent | 18d3a98f3c1b0e27ce026afa4d1ef042f2903726 (diff) |
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2: (47 commits)
ocfs2: Silence a gcc warning.
ocfs2: Don't retry xattr set in case value extension fails.
ocfs2:dlm: avoid dlm->ast_lock lockres->spinlock dependency break
ocfs2: Reset xattr value size after xa_cleanup_value_truncate().
fs/ocfs2/dlm: Use kstrdup
fs/ocfs2/dlm: Drop memory allocation cast
Ocfs2: Optimize punching-hole code.
Ocfs2: Make ocfs2_find_cpos_for_left_leaf() public.
Ocfs2: Fix hole punching to correctly do CoW during cluster zeroing.
Ocfs2: Optimize ocfs2 truncate to use ocfs2_remove_btree_range() instead.
ocfs2: Block signals for mkdir/link/symlink/O_CREAT.
ocfs2: Wrap signal blocking in void functions.
ocfs2/dlm: Increase o2dlm lockres hash size
ocfs2: Make ocfs2_extend_trans() really extend.
ocfs2/trivial: Code cleanup for allocation reservation.
ocfs2: make ocfs2_adjust_resv_from_alloc simple.
ocfs2: Make nointr a default mount option
ocfs2/dlm: Make o2dlm domain join/leave messages KERN_NOTICE
o2net: log socket state changes
ocfs2: print node # when tcp fails
...
Diffstat (limited to 'fs/ocfs2/dlm/dlmmaster.c')
-rw-r--r-- | fs/ocfs2/dlm/dlmmaster.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c index 9289b4357d27..4a7506a4e314 100644 --- a/fs/ocfs2/dlm/dlmmaster.c +++ b/fs/ocfs2/dlm/dlmmaster.c | |||
@@ -617,13 +617,11 @@ struct dlm_lock_resource *dlm_new_lockres(struct dlm_ctxt *dlm, | |||
617 | { | 617 | { |
618 | struct dlm_lock_resource *res = NULL; | 618 | struct dlm_lock_resource *res = NULL; |
619 | 619 | ||
620 | res = (struct dlm_lock_resource *) | 620 | res = kmem_cache_zalloc(dlm_lockres_cache, GFP_NOFS); |
621 | kmem_cache_zalloc(dlm_lockres_cache, GFP_NOFS); | ||
622 | if (!res) | 621 | if (!res) |
623 | goto error; | 622 | goto error; |
624 | 623 | ||
625 | res->lockname.name = (char *) | 624 | res->lockname.name = kmem_cache_zalloc(dlm_lockname_cache, GFP_NOFS); |
626 | kmem_cache_zalloc(dlm_lockname_cache, GFP_NOFS); | ||
627 | if (!res->lockname.name) | 625 | if (!res->lockname.name) |
628 | goto error; | 626 | goto error; |
629 | 627 | ||
@@ -757,8 +755,7 @@ lookup: | |||
757 | spin_unlock(&dlm->spinlock); | 755 | spin_unlock(&dlm->spinlock); |
758 | mlog(0, "allocating a new resource\n"); | 756 | mlog(0, "allocating a new resource\n"); |
759 | /* nothing found and we need to allocate one. */ | 757 | /* nothing found and we need to allocate one. */ |
760 | alloc_mle = (struct dlm_master_list_entry *) | 758 | alloc_mle = kmem_cache_alloc(dlm_mle_cache, GFP_NOFS); |
761 | kmem_cache_alloc(dlm_mle_cache, GFP_NOFS); | ||
762 | if (!alloc_mle) | 759 | if (!alloc_mle) |
763 | goto leave; | 760 | goto leave; |
764 | res = dlm_new_lockres(dlm, lockid, namelen); | 761 | res = dlm_new_lockres(dlm, lockid, namelen); |
@@ -1542,8 +1539,7 @@ way_up_top: | |||
1542 | spin_unlock(&dlm->master_lock); | 1539 | spin_unlock(&dlm->master_lock); |
1543 | spin_unlock(&dlm->spinlock); | 1540 | spin_unlock(&dlm->spinlock); |
1544 | 1541 | ||
1545 | mle = (struct dlm_master_list_entry *) | 1542 | mle = kmem_cache_alloc(dlm_mle_cache, GFP_NOFS); |
1546 | kmem_cache_alloc(dlm_mle_cache, GFP_NOFS); | ||
1547 | if (!mle) { | 1543 | if (!mle) { |
1548 | response = DLM_MASTER_RESP_ERROR; | 1544 | response = DLM_MASTER_RESP_ERROR; |
1549 | mlog_errno(-ENOMEM); | 1545 | mlog_errno(-ENOMEM); |
@@ -1666,7 +1662,9 @@ again: | |||
1666 | tmpret = o2net_send_message(DLM_ASSERT_MASTER_MSG, dlm->key, | 1662 | tmpret = o2net_send_message(DLM_ASSERT_MASTER_MSG, dlm->key, |
1667 | &assert, sizeof(assert), to, &r); | 1663 | &assert, sizeof(assert), to, &r); |
1668 | if (tmpret < 0) { | 1664 | if (tmpret < 0) { |
1669 | mlog(0, "assert_master returned %d!\n", tmpret); | 1665 | mlog(ML_ERROR, "Error %d when sending message %u (key " |
1666 | "0x%x) to node %u\n", tmpret, | ||
1667 | DLM_ASSERT_MASTER_MSG, dlm->key, to); | ||
1670 | if (!dlm_is_host_down(tmpret)) { | 1668 | if (!dlm_is_host_down(tmpret)) { |
1671 | mlog(ML_ERROR, "unhandled error=%d!\n", tmpret); | 1669 | mlog(ML_ERROR, "unhandled error=%d!\n", tmpret); |
1672 | BUG(); | 1670 | BUG(); |
@@ -2205,7 +2203,9 @@ int dlm_drop_lockres_ref(struct dlm_ctxt *dlm, struct dlm_lock_resource *res) | |||
2205 | ret = o2net_send_message(DLM_DEREF_LOCKRES_MSG, dlm->key, | 2203 | ret = o2net_send_message(DLM_DEREF_LOCKRES_MSG, dlm->key, |
2206 | &deref, sizeof(deref), res->owner, &r); | 2204 | &deref, sizeof(deref), res->owner, &r); |
2207 | if (ret < 0) | 2205 | if (ret < 0) |
2208 | mlog_errno(ret); | 2206 | mlog(ML_ERROR, "Error %d when sending message %u (key 0x%x) to " |
2207 | "node %u\n", ret, DLM_DEREF_LOCKRES_MSG, dlm->key, | ||
2208 | res->owner); | ||
2209 | else if (r < 0) { | 2209 | else if (r < 0) { |
2210 | /* BAD. other node says I did not have a ref. */ | 2210 | /* BAD. other node says I did not have a ref. */ |
2211 | mlog(ML_ERROR,"while dropping ref on %s:%.*s " | 2211 | mlog(ML_ERROR,"while dropping ref on %s:%.*s " |
@@ -2452,8 +2452,7 @@ static int dlm_migrate_lockres(struct dlm_ctxt *dlm, | |||
2452 | goto leave; | 2452 | goto leave; |
2453 | } | 2453 | } |
2454 | 2454 | ||
2455 | mle = (struct dlm_master_list_entry *) kmem_cache_alloc(dlm_mle_cache, | 2455 | mle = kmem_cache_alloc(dlm_mle_cache, GFP_NOFS); |
2456 | GFP_NOFS); | ||
2457 | if (!mle) { | 2456 | if (!mle) { |
2458 | mlog_errno(ret); | 2457 | mlog_errno(ret); |
2459 | goto leave; | 2458 | goto leave; |
@@ -2975,7 +2974,9 @@ static int dlm_do_migrate_request(struct dlm_ctxt *dlm, | |||
2975 | &migrate, sizeof(migrate), nodenum, | 2974 | &migrate, sizeof(migrate), nodenum, |
2976 | &status); | 2975 | &status); |
2977 | if (ret < 0) { | 2976 | if (ret < 0) { |
2978 | mlog(0, "migrate_request returned %d!\n", ret); | 2977 | mlog(ML_ERROR, "Error %d when sending message %u (key " |
2978 | "0x%x) to node %u\n", ret, DLM_MIGRATE_REQUEST_MSG, | ||
2979 | dlm->key, nodenum); | ||
2979 | if (!dlm_is_host_down(ret)) { | 2980 | if (!dlm_is_host_down(ret)) { |
2980 | mlog(ML_ERROR, "unhandled error=%d!\n", ret); | 2981 | mlog(ML_ERROR, "unhandled error=%d!\n", ret); |
2981 | BUG(); | 2982 | BUG(); |
@@ -3033,8 +3034,7 @@ int dlm_migrate_request_handler(struct o2net_msg *msg, u32 len, void *data, | |||
3033 | hash = dlm_lockid_hash(name, namelen); | 3034 | hash = dlm_lockid_hash(name, namelen); |
3034 | 3035 | ||
3035 | /* preallocate.. if this fails, abort */ | 3036 | /* preallocate.. if this fails, abort */ |
3036 | mle = (struct dlm_master_list_entry *) kmem_cache_alloc(dlm_mle_cache, | 3037 | mle = kmem_cache_alloc(dlm_mle_cache, GFP_NOFS); |
3037 | GFP_NOFS); | ||
3038 | 3038 | ||
3039 | if (!mle) { | 3039 | if (!mle) { |
3040 | ret = -ENOMEM; | 3040 | ret = -ENOMEM; |