diff mbox series

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

Message ID 1642124283-10148-20-git-send-email-jsimmons@infradead.org (mailing list archive)
State New, archived
Headers show
Series lustre: update to OpenSFS Jan 13, 2022 | expand

Commit Message

James Simmons Jan. 14, 2022, 1:37 a.m. UTC
From: Lei Feng <flei@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@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/45874
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 include/uapi/linux/lustre/lustre_user.h | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)
diff mbox series

Patch

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 */