Whamcloud - gitweb
LU-6391 llite: Add client mount opt to ignore suppress_pings 27/14127/5
authorWally Wang <wang@cray.com>
Tue, 8 Sep 2015 16:56:48 +0000 (09:56 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 14 Mar 2016 02:39:46 +0000 (02:39 +0000)
When Lustre servers enable 'suppress_pings', all clients will stop
pinging. However, some clients may not have external mechanism
to notify Lustre servers for node death and therefore need to
preserve the Lustre ping.

This patch provides a mount option 'always_ping' so that the
client will not stop pinging even if the server has enabled
'suppress_pings'.

Signed-off-by: Wally Wang <wang@cray.com>
Change-Id: Ia7b45e8d2dbb53f02157ef2ab1d327d9483c2455
Reviewed-on: http://review.whamcloud.com/14127
Tested-by: Jenkins
Reviewed-by: Li Wei <wei.g.li@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Chris Horn <hornc@cray.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/doc/mount.lustre.8
lustre/llite/llite_internal.h
lustre/llite/llite_lib.c

index 210c0c8..027dc4e 100644 (file)
@@ -88,6 +88,9 @@ manual page.
 .BI noacl
 Disable Access Control List support.
 .TP
+.BI always_ping
+Force a client to keep pinging even if servers have enabled suppress_pings.
+.TP
 .BI verbose
 Enable mount/umount console messages.
 .TP
index ad5e417..7149327 100644 (file)
@@ -441,6 +441,8 @@ enum stats_track_type {
 #define LL_SBI_USER_FID2PATH  0x40000 /* allow fid2path by unprivileged users */
 #define LL_SBI_XATTR_CACHE    0x80000 /* support for xattr cache */
 #define LL_SBI_NOROOTSQUASH  0x100000 /* do not apply root squash */
+#define LL_SBI_ALWAYS_PING   0x200000 /* always ping even if server
+                                      * suppress_pings */
 
 #define LL_SBI_FLAGS {         \
        "nolck",        \
@@ -464,6 +466,7 @@ enum stats_track_type {
        "user_fid2path",\
        "xattr_cache",  \
        "norootsquash", \
+       "always_ping",  \
 }
 
 #define RCE_HASHES      32
index 097394a..7ecc93c 100644 (file)
@@ -252,6 +252,10 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt,
         if (sbi->ll_flags & LL_SBI_RMT_CLIENT)
                 data->ocd_connect_flags |= OBD_CONNECT_RMT_CLIENT_FORCE;
 
+       /* always ping even if server suppress_pings */
+       if (sbi->ll_flags & LL_SBI_ALWAYS_PING)
+               data->ocd_connect_flags &= ~OBD_CONNECT_PINGLESS;
+
        data->ocd_brw_size = MD_MAX_BRW_SIZE;
 
         err = obd_connect(NULL, &sbi->ll_md_exp, obd, &sbi->ll_sb_uuid, data, NULL);
@@ -425,6 +429,10 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt,
         if (sbi->ll_flags & LL_SBI_RMT_CLIENT)
                 data->ocd_connect_flags |= OBD_CONNECT_RMT_CLIENT_FORCE;
 
+       /* always ping even if server suppress_pings */
+       if (sbi->ll_flags & LL_SBI_ALWAYS_PING)
+               data->ocd_connect_flags &= ~OBD_CONNECT_PINGLESS;
+
         CDEBUG(D_RPCTRACE, "ocd_connect_flags: "LPX64" ocd_version: %d "
                "ocd_grant: %d\n", data->ocd_connect_flags,
                data->ocd_version, data->ocd_grant);
@@ -908,6 +916,11 @@ static int ll_options(char *options, int *flags)
                         *flags &= ~tmp;
                         goto next;
                 }
+               tmp = ll_set_opt("always_ping", s1, LL_SBI_ALWAYS_PING);
+               if (tmp) {
+                       *flags |= tmp;
+                       goto next;
+               }
                 LCONSOLE_ERROR_MSG(0x152, "Unknown option '%s', won't mount.\n",
                                    s1);
                 RETURN(-EINVAL);
@@ -2535,6 +2548,9 @@ int ll_show_options(struct seq_file *seq, struct vfsmount *vfs)
        if (sbi->ll_flags & LL_SBI_USER_FID2PATH)
                seq_puts(seq, ",user_fid2path");
 
+       if (sbi->ll_flags & LL_SBI_ALWAYS_PING)
+               seq_puts(seq, ",always_ping");
+
         RETURN(0);
 }