diff options
| -rw-r--r-- | drivers/staging/lustre/lustre/llite/llite_internal.h | 3 | ||||
| -rw-r--r-- | drivers/staging/lustre/lustre/llite/llite_lib.c | 16 |
2 files changed, 19 insertions, 0 deletions
diff --git a/drivers/staging/lustre/lustre/llite/llite_internal.h b/drivers/staging/lustre/lustre/llite/llite_internal.h index e37ba1ffa574..2f46d475cd7d 100644 --- a/drivers/staging/lustre/lustre/llite/llite_internal.h +++ b/drivers/staging/lustre/lustre/llite/llite_internal.h | |||
| @@ -391,6 +391,8 @@ enum stats_track_type { | |||
| 391 | #define LL_SBI_USER_FID2PATH 0x40000 /* allow fid2path by unprivileged users */ | 391 | #define LL_SBI_USER_FID2PATH 0x40000 /* allow fid2path by unprivileged users */ |
| 392 | #define LL_SBI_XATTR_CACHE 0x80000 /* support for xattr cache */ | 392 | #define LL_SBI_XATTR_CACHE 0x80000 /* support for xattr cache */ |
| 393 | #define LL_SBI_NOROOTSQUASH 0x100000 /* do not apply root squash */ | 393 | #define LL_SBI_NOROOTSQUASH 0x100000 /* do not apply root squash */ |
| 394 | #define LL_SBI_ALWAYS_PING 0x200000 /* always ping even if server | ||
| 395 | * suppress_pings */ | ||
| 394 | 396 | ||
| 395 | #define LL_SBI_FLAGS { \ | 397 | #define LL_SBI_FLAGS { \ |
| 396 | "nolck", \ | 398 | "nolck", \ |
| @@ -414,6 +416,7 @@ enum stats_track_type { | |||
| 414 | "user_fid2path",\ | 416 | "user_fid2path",\ |
| 415 | "xattr_cache", \ | 417 | "xattr_cache", \ |
| 416 | "norootsquash", \ | 418 | "norootsquash", \ |
| 419 | "always_ping", \ | ||
| 417 | } | 420 | } |
| 418 | 421 | ||
| 419 | /* | 422 | /* |
diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c b/drivers/staging/lustre/lustre/llite/llite_lib.c index 2a51efa0b682..25f5aed97f63 100644 --- a/drivers/staging/lustre/lustre/llite/llite_lib.c +++ b/drivers/staging/lustre/lustre/llite/llite_lib.c | |||
| @@ -224,6 +224,10 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt, | |||
| 224 | /* real client */ | 224 | /* real client */ |
| 225 | data->ocd_connect_flags |= OBD_CONNECT_REAL; | 225 | data->ocd_connect_flags |= OBD_CONNECT_REAL; |
| 226 | 226 | ||
| 227 | /* always ping even if server suppress_pings */ | ||
| 228 | if (sbi->ll_flags & LL_SBI_ALWAYS_PING) | ||
| 229 | data->ocd_connect_flags &= ~OBD_CONNECT_PINGLESS; | ||
| 230 | |||
| 227 | data->ocd_brw_size = MD_MAX_BRW_SIZE; | 231 | data->ocd_brw_size = MD_MAX_BRW_SIZE; |
| 228 | 232 | ||
| 229 | err = obd_connect(NULL, &sbi->ll_md_exp, obd, &sbi->ll_sb_uuid, | 233 | err = obd_connect(NULL, &sbi->ll_md_exp, obd, &sbi->ll_sb_uuid, |
| @@ -373,6 +377,10 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt, | |||
| 373 | 377 | ||
| 374 | data->ocd_connect_flags |= OBD_CONNECT_LRU_RESIZE; | 378 | data->ocd_connect_flags |= OBD_CONNECT_LRU_RESIZE; |
| 375 | 379 | ||
| 380 | /* always ping even if server suppress_pings */ | ||
| 381 | if (sbi->ll_flags & LL_SBI_ALWAYS_PING) | ||
| 382 | data->ocd_connect_flags &= ~OBD_CONNECT_PINGLESS; | ||
| 383 | |||
| 376 | CDEBUG(D_RPCTRACE, "ocd_connect_flags: %#llx ocd_version: %d ocd_grant: %d\n", | 384 | CDEBUG(D_RPCTRACE, "ocd_connect_flags: %#llx ocd_version: %d ocd_grant: %d\n", |
| 377 | data->ocd_connect_flags, | 385 | data->ocd_connect_flags, |
| 378 | data->ocd_version, data->ocd_grant); | 386 | data->ocd_version, data->ocd_grant); |
| @@ -788,6 +796,11 @@ static int ll_options(char *options, int *flags) | |||
| 788 | *flags &= ~tmp; | 796 | *flags &= ~tmp; |
| 789 | goto next; | 797 | goto next; |
| 790 | } | 798 | } |
| 799 | tmp = ll_set_opt("always_ping", s1, LL_SBI_ALWAYS_PING); | ||
| 800 | if (tmp) { | ||
| 801 | *flags |= tmp; | ||
| 802 | goto next; | ||
| 803 | } | ||
| 791 | LCONSOLE_ERROR_MSG(0x152, "Unknown option '%s', won't mount.\n", | 804 | LCONSOLE_ERROR_MSG(0x152, "Unknown option '%s', won't mount.\n", |
| 792 | s1); | 805 | s1); |
| 793 | return -EINVAL; | 806 | return -EINVAL; |
| @@ -2361,6 +2374,9 @@ int ll_show_options(struct seq_file *seq, struct dentry *dentry) | |||
| 2361 | if (sbi->ll_flags & LL_SBI_USER_FID2PATH) | 2374 | if (sbi->ll_flags & LL_SBI_USER_FID2PATH) |
| 2362 | seq_puts(seq, ",user_fid2path"); | 2375 | seq_puts(seq, ",user_fid2path"); |
| 2363 | 2376 | ||
| 2377 | if (sbi->ll_flags & LL_SBI_ALWAYS_PING) | ||
| 2378 | seq_puts(seq, ",always_ping"); | ||
| 2379 | |||
| 2364 | return 0; | 2380 | return 0; |
| 2365 | } | 2381 | } |
| 2366 | 2382 | ||
