diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-06-13 14:21:50 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-06-13 14:21:50 -0400 |
commit | ffdb8f1bfbd9cef1394f5d3c4a774015d4ac0f97 (patch) | |
tree | 4c7b06a4df4e3fc18e63df33230080a419f7c606 /net | |
parent | 80dadf86d607bc5f25cc384ac590ef8b49ae523a (diff) | |
parent | 0c1f91f27140cf3b6e38dc4e892adac241c73a20 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
ceph: unwind canceled flock state
ceph: fix ENOENT logic in striped_read
ceph: fix short sync reads from the OSD
ceph: fix sync vs canceled write
ceph: use ihold when we already have an inode ref
Diffstat (limited to 'net')
-rw-r--r-- | net/ceph/osd_client.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c index 6ea2b892f44b..9cb627a4073a 100644 --- a/net/ceph/osd_client.c +++ b/net/ceph/osd_client.c | |||
@@ -1144,6 +1144,13 @@ static void handle_osds_timeout(struct work_struct *work) | |||
1144 | round_jiffies_relative(delay)); | 1144 | round_jiffies_relative(delay)); |
1145 | } | 1145 | } |
1146 | 1146 | ||
1147 | static void complete_request(struct ceph_osd_request *req) | ||
1148 | { | ||
1149 | if (req->r_safe_callback) | ||
1150 | req->r_safe_callback(req, NULL); | ||
1151 | complete_all(&req->r_safe_completion); /* fsync waiter */ | ||
1152 | } | ||
1153 | |||
1147 | /* | 1154 | /* |
1148 | * handle osd op reply. either call the callback if it is specified, | 1155 | * handle osd op reply. either call the callback if it is specified, |
1149 | * or do the completion to wake up the waiting thread. | 1156 | * or do the completion to wake up the waiting thread. |
@@ -1226,11 +1233,8 @@ static void handle_reply(struct ceph_osd_client *osdc, struct ceph_msg *msg, | |||
1226 | else | 1233 | else |
1227 | complete_all(&req->r_completion); | 1234 | complete_all(&req->r_completion); |
1228 | 1235 | ||
1229 | if (flags & CEPH_OSD_FLAG_ONDISK) { | 1236 | if (flags & CEPH_OSD_FLAG_ONDISK) |
1230 | if (req->r_safe_callback) | 1237 | complete_request(req); |
1231 | req->r_safe_callback(req, msg); | ||
1232 | complete_all(&req->r_safe_completion); /* fsync waiter */ | ||
1233 | } | ||
1234 | 1238 | ||
1235 | done: | 1239 | done: |
1236 | dout("req=%p req->r_linger=%d\n", req, req->r_linger); | 1240 | dout("req=%p req->r_linger=%d\n", req, req->r_linger); |
@@ -1732,6 +1736,7 @@ int ceph_osdc_wait_request(struct ceph_osd_client *osdc, | |||
1732 | __cancel_request(req); | 1736 | __cancel_request(req); |
1733 | __unregister_request(osdc, req); | 1737 | __unregister_request(osdc, req); |
1734 | mutex_unlock(&osdc->request_mutex); | 1738 | mutex_unlock(&osdc->request_mutex); |
1739 | complete_request(req); | ||
1735 | dout("wait_request tid %llu canceled/timed out\n", req->r_tid); | 1740 | dout("wait_request tid %llu canceled/timed out\n", req->r_tid); |
1736 | return rc; | 1741 | return rc; |
1737 | } | 1742 | } |