[Pkg-ceph-commits] [ceph-dkms] 01/02: patch for upstream bug 9341

Dmitry Smirnov onlyjob at moszumanska.debian.org
Thu Jan 1 02:49:39 UTC 2015


This is an automated email from the git hooks/post-receive script.

onlyjob pushed a commit to branch master
in repository ceph-dkms.

commit b93a985
Author: Dmitry Smirnov <onlyjob at member.fsf.org>
Date:   Thu Jan 1 02:48:25 2015

    patch for upstream bug 9341
---
 ...nused-inodes-before-reconnecting-to-recov.patch | 57 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 58 insertions(+)

diff --git a/debian/patches/9341-ceph-trim-unused-inodes-before-reconnecting-to-recov.patch b/debian/patches/9341-ceph-trim-unused-inodes-before-reconnecting-to-recov.patch
new file mode 100644
index 0000000..b48d7f4
--- /dev/null
+++ b/debian/patches/9341-ceph-trim-unused-inodes-before-reconnecting-to-recov.patch
@@ -0,0 +1,57 @@
+Bug-Ceph: http://tracker.ceph.com/issues/9341
+From 325c8f27f229f45404773c028812451039ccbe86 Mon Sep 17 00:00:00 2001
+From: "Yan, Zheng" <zyan at redhat.com>
+Date: Wed, 10 Sep 2014 16:56:23 +0800
+Subject: [PATCH] ceph: trim unused inodes before reconnecting to recovering MDS
+
+ So the recovering MDS does not need to fetch these ununsed inodes during
+ cache rejoin. This may reduce MDS recovery time.
+
+ Signed-off-by: Yan, Zheng <zyan at redhat.com>
+---
+ fs/ceph/mds_client.c | 23 +++++++++++++----------
+ 1 file changed, 13 insertions(+), 10 deletions(-)
+
+--- a/ceph/mds_client.c
++++ b/ceph/mds_client.c
+@@ -2679,18 +2679,8 @@
+ 	mutex_lock(&session->s_mutex);
+ 	session->s_state = CEPH_MDS_SESSION_RECONNECTING;
+ 	session->s_seq = 0;
+ 
+-	ceph_con_close(&session->s_con);
+-	ceph_con_open(&session->s_con,
+-		      CEPH_ENTITY_TYPE_MDS, mds,
+-		      ceph_mdsmap_get_addr(mdsc->mdsmap, mds));
+-
+-	/* replay unsafe requests */
+-	replay_unsafe_requests(mdsc, session);
+-
+-	down_read(&mdsc->snap_rwsem);
+-
+ 	dout("session %p state %s\n", session,
+ 	     session_state_name(session->s_state));
+ 
+ 	spin_lock(&session->s_gen_ttl_lock);
+@@ -2707,8 +2697,21 @@
+ 	/* drop old cap expires; we're about to reestablish that state */
+ 	discard_cap_releases(mdsc, session);
+ 	spin_unlock(&session->s_cap_lock);
+ 
++	/* trim unused caps to reduce MDS's cache rejoin time */
++	shrink_dcache_parent(mdsc->fsc->sb->s_root);
++
++	ceph_con_close(&session->s_con);
++	ceph_con_open(&session->s_con,
++		      CEPH_ENTITY_TYPE_MDS, mds,
++		      ceph_mdsmap_get_addr(mdsc->mdsmap, mds));
++
++	/* replay unsafe requests */
++	replay_unsafe_requests(mdsc, session);
++
++	down_read(&mdsc->snap_rwsem);
++
+ 	/* traverse this session's caps */
+ 	s_nr_caps = session->s_nr_caps;
+ 	err = ceph_pagelist_encode_32(pagelist, s_nr_caps);
+ 	if (err)
diff --git a/debian/patches/series b/debian/patches/series
index 24b393c..9e8cccd 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 out-of-tree.patch
 8226.patch
+9341-ceph-trim-unused-inodes-before-reconnecting-to-recov.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ceph/ceph-dkms.git



More information about the Pkg-ceph-commits mailing list