[lustre-devel] [PATCH 007/622] lustre: llite: limit smallest max_cached_mb value

James Simmons jsimmons at infradead.org
Thu Feb 27 13:07:55 PST 2020


From: James Nunez <jnunez at whamcloud.com>

Currently, ost-survey hangs due to calling
'lfs setstripe' in an old (positional) style and
setting max_cached_mb to zero.

In ll_max_cached_mb_seq_write(), the number of
pages requested is set to the max of pages requested
or PTLRPC_MAX_BRW_PAGES to allow the client to make
well formed RPCs.

WC-bug-id: https://jira.whamcloud.com/browse/LU-4768
Lustre-commit: 46bec835ac72 ("LU-4768 tests: Update ost-survey script")
Signed-off-by: James Nunez <jnunez at whamcloud.com>
Reviewed-on: http://review.whamcloud.com/11971
Reviewed-by: Nathaniel Clark <nclark at whamcloud.com>
Reviewed-by: Cliff White <cliff.white at intel.com>
Reviewed-by: Jian Yu <yujian at whamcloud.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong at gmail.com>
Reviewed-by: James Simmons <uja.ornl at yahoo.com>
Reviewed-by: Oleg Drokin <green at whamcloud.com>
Signed-off-by: James Simmons <jsimmons at infradead.org>
---
 fs/lustre/llite/lproc_llite.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/lustre/llite/lproc_llite.c b/fs/lustre/llite/lproc_llite.c
index e108326..5ac6689 100644
--- a/fs/lustre/llite/lproc_llite.c
+++ b/fs/lustre/llite/lproc_llite.c
@@ -527,6 +527,8 @@ static ssize_t ll_max_cached_mb_seq_write(struct file *file,
 		       totalram_pages() >> (20 - PAGE_SHIFT));
 		return -ERANGE;
 	}
+	/* Allow enough cache so clients can make well-formed RPCs */
+	pages_number = max_t(long, pages_number, PTLRPC_MAX_BRW_PAGES);
 
 	spin_lock(&sbi->ll_lock);
 	diff = pages_number - cache->ccc_lru_max;
-- 
1.8.3.1



More information about the lustre-devel mailing list