aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Dilger <andreas.dilger@intel.com>2017-01-28 19:04:47 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-02-03 07:01:37 -0500
commit7304370b570751b199531a8963864b0dfdb74a35 (patch)
treef7f1e8a51586f040559531b74accf3799aed1440
parent4c43c27ddc461d8473cedd70f2549614641dfbc7 (diff)
staging: lustre: llite: handle inactive OSTs better in statfs
Change the order of checks for inactive OSCs in lov_prep_statfs_set() so that administratively disabled OSTs do not generate any output in "lfs df" at all, to avoid needlessly cluttering the output. Enable the lazystatfs mount option by default, so that "df" does not hang when an OST is temporarily offline. Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7759 Reviewed-on: http://review.whamcloud.com/19195 Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/lustre/lustre/llite/llite_lib.c1
-rw-r--r--drivers/staging/lustre/lustre/lov/lov_request.c6
2 files changed, 4 insertions, 3 deletions
diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c b/drivers/staging/lustre/lustre/llite/llite_lib.c
index 769b307b8334..0a87058bb691 100644
--- a/drivers/staging/lustre/lustre/llite/llite_lib.c
+++ b/drivers/staging/lustre/lustre/llite/llite_lib.c
@@ -103,6 +103,7 @@ static struct ll_sb_info *ll_init_sbi(struct super_block *sb)
103 sbi->ll_flags |= LL_SBI_CHECKSUM; 103 sbi->ll_flags |= LL_SBI_CHECKSUM;
104 104
105 sbi->ll_flags |= LL_SBI_LRU_RESIZE; 105 sbi->ll_flags |= LL_SBI_LRU_RESIZE;
106 sbi->ll_flags |= LL_SBI_LAZYSTATFS;
106 107
107 for (i = 0; i <= LL_PROCESS_HIST_MAX; i++) { 108 for (i = 0; i <= LL_PROCESS_HIST_MAX; i++) {
108 spin_lock_init(&sbi->ll_rw_extents_info.pp_extents[i]. 109 spin_lock_init(&sbi->ll_rw_extents_info.pp_extents[i].
diff --git a/drivers/staging/lustre/lustre/lov/lov_request.c b/drivers/staging/lustre/lustre/lov/lov_request.c
index d43cc88ae641..3a747913fb4f 100644
--- a/drivers/staging/lustre/lustre/lov/lov_request.c
+++ b/drivers/staging/lustre/lustre/lov/lov_request.c
@@ -344,9 +344,6 @@ int lov_prep_statfs_set(struct obd_device *obd, struct obd_info *oinfo,
344 continue; 344 continue;
345 } 345 }
346 346
347 if (!lov->lov_tgts[i]->ltd_active)
348 lov_check_and_wait_active(lov, i);
349
350 /* skip targets that have been explicitly disabled by the 347 /* skip targets that have been explicitly disabled by the
351 * administrator 348 * administrator
352 */ 349 */
@@ -355,6 +352,9 @@ int lov_prep_statfs_set(struct obd_device *obd, struct obd_info *oinfo,
355 continue; 352 continue;
356 } 353 }
357 354
355 if (!lov->lov_tgts[i]->ltd_active)
356 lov_check_and_wait_active(lov, i);
357
358 req = kzalloc(sizeof(*req), GFP_NOFS); 358 req = kzalloc(sizeof(*req), GFP_NOFS);
359 if (!req) { 359 if (!req) {
360 rc = -ENOMEM; 360 rc = -ENOMEM;