[lustre-devel] [PATCH 19/24] lustre: uapi: set default max-inherit to 3

James Simmons jsimmons at infradead.org
Thu Jan 13 17:37:58 PST 2022


From: Lei Feng <flei at whamcloud.com>

Change LMV_INHERIT_DEFAULT from 0 to 3. So that the default stripe
policy of dir will not be inherited unlimited and reduce performance
unexpectly.

WC-bug-id: https://jira.whamcloud.com/browse/LU-15314
Lustre-commit: 956b4b1e0d9f18c6f ("LU-15314 utils: set default max-inherit to 3")
Signed-off-by: Lei Feng <flei at whamcloud.com>
Reviewed-on: https://review.whamcloud.com/45874
Reviewed-by: Andreas Dilger <adilger at whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao at whamcloud.com>
Reviewed-by: Oleg Drokin <green at whamcloud.com>
Signed-off-by: James Simmons <jsimmons at infradead.org>
---
 include/uapi/linux/lustre/lustre_user.h | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/include/uapi/linux/lustre/lustre_user.h b/include/uapi/linux/lustre/lustre_user.h
index 1e66930..3b53a5b 100644
--- a/include/uapi/linux/lustre/lustre_user.h
+++ b/include/uapi/linux/lustre/lustre_user.h
@@ -838,23 +838,25 @@ enum lmv_type {
  */
 enum {
 	/* for historical reason, 0 means unlimited inheritance */
-	LMV_INHERIT_UNLIMITED	= 0,
-	/* unlimited lum_max_inherit by default */
-	LMV_INHERIT_DEFAULT	= 0,
+	LMV_INHERIT_UNLIMITED		= 0,
+	/* unlimited lum_max_inherit by default for plain stripe (0 or 1) */
+	LMV_INHERIT_DEFAULT_PLAIN	= LMV_INHERIT_UNLIMITED,
 	/* not inherit any more */
-	LMV_INHERIT_END		= 1,
+	LMV_INHERIT_END			= 1,
+	/* for multiple stripes, the default lum_max_inherit is 3 */
+	LMV_INHERIT_DEFAULT_STRIPED	= 3,
 	/* max inherit depth */
-	LMV_INHERIT_MAX		= 250,
+	LMV_INHERIT_MAX			= 250,
 	/* [251, 254] are reserved */
 	/* not set, or when inherit depth goes beyond end,  */
-	LMV_INHERIT_NONE	= 255,
+	LMV_INHERIT_NONE		= 255,
 };
 
 enum {
 	/* not set, or when inherit_rr depth goes beyond end,  */
 	LMV_INHERIT_RR_NONE		= 0,
 	/* disable lum_max_inherit_rr by default */
-	LMV_INHERIT_RR_DEFAULT		= 0,
+	LMV_INHERIT_RR_DEFAULT		= LMV_INHERIT_RR_NONE,
 	/* not inherit any more */
 	LMV_INHERIT_RR_END		= 1,
 	/* default inherit_rr of ROOT */
-- 
1.8.3.1



More information about the lustre-devel mailing list