Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7304370b authored by Andreas Dilger's avatar Andreas Dilger Committed by Greg Kroah-Hartman
Browse files

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: default avatarAndreas 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: default avatarJohn L. Hammond <john.hammond@intel.com>
Reviewed-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4c43c27d
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -103,6 +103,7 @@ static struct ll_sb_info *ll_init_sbi(struct super_block *sb)
	sbi->ll_flags |= LL_SBI_CHECKSUM;
	sbi->ll_flags |= LL_SBI_CHECKSUM;


	sbi->ll_flags |= LL_SBI_LRU_RESIZE;
	sbi->ll_flags |= LL_SBI_LRU_RESIZE;
	sbi->ll_flags |= LL_SBI_LAZYSTATFS;


	for (i = 0; i <= LL_PROCESS_HIST_MAX; i++) {
	for (i = 0; i <= LL_PROCESS_HIST_MAX; i++) {
		spin_lock_init(&sbi->ll_rw_extents_info.pp_extents[i].
		spin_lock_init(&sbi->ll_rw_extents_info.pp_extents[i].
+3 −3
Original line number Original line Diff line number Diff line
@@ -344,9 +344,6 @@ int lov_prep_statfs_set(struct obd_device *obd, struct obd_info *oinfo,
			continue;
			continue;
		}
		}


		if (!lov->lov_tgts[i]->ltd_active)
			lov_check_and_wait_active(lov, i);

		/* skip targets that have been explicitly disabled by the
		/* skip targets that have been explicitly disabled by the
		 * administrator
		 * administrator
		 */
		 */
@@ -355,6 +352,9 @@ int lov_prep_statfs_set(struct obd_device *obd, struct obd_info *oinfo,
			continue;
			continue;
		}
		}


		if (!lov->lov_tgts[i]->ltd_active)
			lov_check_and_wait_active(lov, i);

		req = kzalloc(sizeof(*req), GFP_NOFS);
		req = kzalloc(sizeof(*req), GFP_NOFS);
		if (!req) {
		if (!req) {
			rc = -ENOMEM;
			rc = -ENOMEM;