]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 31 Dec 2013 05:16:02 +0000 (21:16 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 31 Dec 2013 05:16:02 +0000 (21:16 -0800)
added patches:
ceph-cleanup-aborted-requests-when-re-sending-requests.patch
ceph-wake-up-safe-waiters-when-unregistering-request.patch

queue-3.10/ceph-cleanup-aborted-requests-when-re-sending-requests.patch [new file with mode: 0644]
queue-3.10/ceph-wake-up-safe-waiters-when-unregistering-request.patch [new file with mode: 0644]
queue-3.10/series

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 (file)
index 0000000..5b89339
--- /dev/null
@@ -0,0 +1,37 @@
+From eb1b8af33c2e42a9a57fc0a7588f4a7b255d2e79 Mon Sep 17 00:00:00 2001
+From: "Yan, Zheng" <zheng.z.yan@intel.com>
+Date: Thu, 26 Sep 2013 14:25:36 +0800
+Subject: ceph: cleanup aborted requests when re-sending requests.
+
+From: "Yan, Zheng" <zheng.z.yan@intel.com>
+
+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 <zheng.z.yan@intel.com>
+Reviewed-by: Greg Farnum <greg@inktank.com>
+Signed-off-by: Sage Weil <sage@inktank.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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 (file)
index 0000000..7858d20
--- /dev/null
@@ -0,0 +1,39 @@
+From fc55d2c9448b34218ca58733a6f51fbede09575b Mon Sep 17 00:00:00 2001
+From: "Yan, Zheng" <zheng.z.yan@intel.com>
+Date: Thu, 31 Oct 2013 09:10:47 +0800
+Subject: ceph: wake up 'safe' waiters when unregistering request
+
+From: "Yan, Zheng" <zheng.z.yan@intel.com>
+
+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 <zheng.z.yan@intel.com>
+Signed-off-by: Sage Weil <sage@inktank.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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) {
+                       /*
index f351a020bbc9a9e0449c330947b2c682ccab63f4..b4f10addfccaa5d0d65946ef46bcd964bb09c600 100644 (file)
@@ -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