From: Greg Kroah-Hartman Date: Tue, 31 Dec 2013 05:16:02 +0000 (-0800) Subject: 3.10-stable patches X-Git-Tag: v3.4.76~77 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c6391deafacc145e592ea5a2a7e33c77ad56cc6a;p=thirdparty%2Fkernel%2Fstable-queue.git 3.10-stable patches added patches: ceph-cleanup-aborted-requests-when-re-sending-requests.patch ceph-wake-up-safe-waiters-when-unregistering-request.patch --- diff --git a/queue-3.10/ceph-cleanup-aborted-requests-when-re-sending-requests.patch b/queue-3.10/ceph-cleanup-aborted-requests-when-re-sending-requests.patch new file mode 100644 index 00000000000..5b893390d0f --- /dev/null +++ b/queue-3.10/ceph-cleanup-aborted-requests-when-re-sending-requests.patch @@ -0,0 +1,37 @@ +From eb1b8af33c2e42a9a57fc0a7588f4a7b255d2e79 Mon Sep 17 00:00:00 2001 +From: "Yan, Zheng" +Date: Thu, 26 Sep 2013 14:25:36 +0800 +Subject: ceph: cleanup aborted requests when re-sending requests. + +From: "Yan, Zheng" + +commit eb1b8af33c2e42a9a57fc0a7588f4a7b255d2e79 upstream. + +Aborted requests usually get cleared when the reply is received. +If MDS crashes, no reply will be received. So we need to cleanup +aborted requests when re-sending requests. + +Signed-off-by: Yan, Zheng +Reviewed-by: Greg Farnum +Signed-off-by: Sage Weil +Signed-off-by: Greg Kroah-Hartman + +--- + fs/ceph/mds_client.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +--- a/fs/ceph/mds_client.c ++++ b/fs/ceph/mds_client.c +@@ -1840,8 +1840,11 @@ static int __do_request(struct ceph_mds_ + int mds = -1; + int err = -EAGAIN; + +- if (req->r_err || req->r_got_result) ++ if (req->r_err || req->r_got_result) { ++ if (req->r_aborted) ++ __unregister_request(mdsc, req); + goto out; ++ } + + if (req->r_timeout && + time_after_eq(jiffies, req->r_started + req->r_timeout)) { diff --git a/queue-3.10/ceph-wake-up-safe-waiters-when-unregistering-request.patch b/queue-3.10/ceph-wake-up-safe-waiters-when-unregistering-request.patch new file mode 100644 index 00000000000..7858d2053f2 --- /dev/null +++ b/queue-3.10/ceph-wake-up-safe-waiters-when-unregistering-request.patch @@ -0,0 +1,39 @@ +From fc55d2c9448b34218ca58733a6f51fbede09575b Mon Sep 17 00:00:00 2001 +From: "Yan, Zheng" +Date: Thu, 31 Oct 2013 09:10:47 +0800 +Subject: ceph: wake up 'safe' waiters when unregistering request + +From: "Yan, Zheng" + +commit fc55d2c9448b34218ca58733a6f51fbede09575b upstream. + +We also need to wake up 'safe' waiters if error occurs or request +aborted. Otherwise sync(2)/fsync(2) may hang forever. + +Signed-off-by: Yan, Zheng +Signed-off-by: Sage Weil +Signed-off-by: Greg Kroah-Hartman + +--- + fs/ceph/mds_client.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/fs/ceph/mds_client.c ++++ b/fs/ceph/mds_client.c +@@ -639,6 +639,8 @@ static void __unregister_request(struct + req->r_unsafe_dir = NULL; + } + ++ complete_all(&req->r_safe_completion); ++ + ceph_mdsc_put_request(req); + } + +@@ -2154,7 +2156,6 @@ static void handle_reply(struct ceph_mds + if (head->safe) { + req->r_got_safe = true; + __unregister_request(mdsc, req); +- complete_all(&req->r_safe_completion); + + if (req->r_got_unsafe) { + /* diff --git a/queue-3.10/series b/queue-3.10/series index f351a020bbc..b4f10addfcc 100644 --- a/queue-3.10/series +++ b/queue-3.10/series @@ -1 +1,3 @@ usb-serial-fix-race-in-generic-write.patch +ceph-cleanup-aborted-requests-when-re-sending-requests.patch +ceph-wake-up-safe-waiters-when-unregistering-request.patch