Home Home > GIT Browse > SLE15-SP1
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuis Henriques <lhenriques@suse.com>2019-01-16 16:12:01 +0000
committerLuis Henriques <lhenriques@suse.com>2019-01-18 11:21:09 +0000
commita9c2b67ed6bd71ec8d88fc21aa972ed335493a5d (patch)
treede38176bae90bf27fad3a3f717bc7db6c0fceb9c
parent5d53ae48b6bcdfe8293a3a373fda70f244a0cfaf (diff)
ceph: don't request excl caps when mount is readonly
(bsc#1122215).
-rw-r--r--patches.suse/ceph-don-t-request-excl-caps-when-mount-is-readonly.patch36
-rw-r--r--series.conf1
2 files changed, 37 insertions, 0 deletions
diff --git a/patches.suse/ceph-don-t-request-excl-caps-when-mount-is-readonly.patch b/patches.suse/ceph-don-t-request-excl-caps-when-mount-is-readonly.patch
new file mode 100644
index 0000000000..582165a2f5
--- /dev/null
+++ b/patches.suse/ceph-don-t-request-excl-caps-when-mount-is-readonly.patch
@@ -0,0 +1,36 @@
+From: "Yan, Zheng" <zyan@redhat.com>
+Date: Wed, 5 Dec 2018 11:29:35 +0800
+Subject: ceph: don't request excl caps when mount is readonly
+Git-commit: 8a2ac3a8e9c04018e2bbff9d6ff038507e443e75
+Patch-mainline: v5.0-rc1
+References: bsc#1122215
+
+Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
+Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
+Acked-by: Luis Henriques <lhenriques@suse.com>
+---
+ fs/ceph/caps.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+--- a/fs/ceph/caps.c
++++ b/fs/ceph/caps.c
+@@ -1852,14 +1852,17 @@ retry_locked:
+ retain |= CEPH_CAP_ANY; /* be greedy */
+ } else if (S_ISDIR(inode->i_mode) &&
+ (issued & CEPH_CAP_FILE_SHARED) &&
+- __ceph_dir_is_complete(ci)) {
++ __ceph_dir_is_complete(ci)) {
+ /*
+ * If a directory is complete, we want to keep
+ * the exclusive cap. So that MDS does not end up
+ * revoking the shared cap on every create/unlink
+ * operation.
+ */
+- want = CEPH_CAP_ANY_SHARED | CEPH_CAP_FILE_EXCL;
++ if (IS_RDONLY(inode))
++ want = CEPH_CAP_ANY_SHARED;
++ else
++ want = CEPH_CAP_ANY_SHARED | CEPH_CAP_FILE_EXCL;
+ retain |= want;
+ } else {
+
diff --git a/series.conf b/series.conf
index 70389d9732..df016cc3d9 100644
--- a/series.conf
+++ b/series.conf
@@ -42499,6 +42499,7 @@
patches.suse/libceph-use-msg_sendpage_notlast-with-ceph_tcp_sendpage.patch
patches.suse/libceph-switch-more-to-bool-in-ceph_tcp_sendmsg.patch
patches.fixes/ceph-don-t-update-importing-cap-s-mseq-when-handing-cap-export.patch
+ patches.suse/ceph-don-t-request-excl-caps-when-mount-is-readonly.patch
patches.fixes/xfs-xfs_buf-drop-useless-LIST_HEAD.patch
patches.drivers/thermal-bcm2835-enable-hwmon-explicitly.patch
patches.fixes/0001-fbdev-fbmem-behave-better-with-small-rotated-display.patch