Re: [PATCH] ceph: add possible_max_rank and make the code more readable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2019/12/4 19:57, xiubli@xxxxxxxxxx wrote:
[...]
diff --git a/fs/ceph/mdsmap.c b/fs/ceph/mdsmap.c
index a77e0ecb9a6b..889627817e52 100644
--- a/fs/ceph/mdsmap.c
+++ b/fs/ceph/mdsmap.c
@@ -14,22 +14,15 @@
  #include "super.h"
#define CEPH_MDS_IS_READY(i, ignore_laggy) \
-	(m->m_info[i].state > 0 && (ignore_laggy ? true : !m->m_info[i].laggy))
+	(m->m_info[i].state > 0 && ignore_laggy ? true : !m->m_info[i].laggy)
static int __mdsmap_get_random_mds(struct ceph_mdsmap *m, bool ignore_laggy)
  {
  	int n = 0;
  	int i, j;
- /*
-	 * special case for one mds, no matter it is laggy or
-	 * not we have no choice
-	 */
-	if (1 == m->m_num_mds && m->m_info[0].state > 0)
-		return 0;
-

I removed this because when possible_max_mds != m_num_mds and the validate MDS rank possible be 1 or a larger number.

This bug existed even without my previous mdsmap series.

All the other code are for enhancement.

BRs

[...]




[Index of Archives]     [CEPH Users]     [Ceph Large]     [Ceph Dev]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux