[lustre-devel] [PATCH 07/27] lustre: fid: reduce LUSTRE_DATA_SEQ_MAX_WIDTH
James Simmons
jsimmons at infradead.org
Mon Apr 17 06:47:03 PDT 2023
From: Li Dongyang <dongyangli at ddn.com>
Reduce LUSTRE_DATA_SEQ_MAX_WIDTH from ~4B to ~32M
to limit the number of objects under /O/[seq]/d[0..31]
dir on OSTs. This makes the directories stay optimial
for ldiskfs, to avoid going into the largedir/3-level
htree territory.
Check the seq->lcs_width which is a tunable set to
LUSTRE_DATA_SEQ_MAX_WIDTH by default, allow the value
up to IDIF_MAX_OID if a larger seq width is needed.
The seq will rollover when the seq width is exhausted,
the default is LUSTRE_DATA_SEQ_MAX_WIDTH.
For seq >= FID_SEQ_NORMAL objects, the upper limit of
seq width is OBIF_MAX_OID,
For IDIF/MDT0 objects, the upper limit is IDIF_MAX_OID.
The seq FID_SEQ_OST_MDT0 will change to a normal seq after the
rollover.
WC-bug-id: https://jira.whamcloud.com/browse/LU-11912
Lustre-commit: 0ecb2a167c56ffff8 ("LU-11912 ofd: reduce LUSTRE_DATA_SEQ_MAX_WIDTH")
Signed-off-by: Li Dongyang <dongyangli at ddn.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/38424
Reviewed-by: Andreas Dilger <adilger at whamcloud.com>
Reviewed-by: Sergey Cheremencev <scherementsev at ddn.com>
Reviewed-by: Oleg Drokin <green at whamcloud.com>
Signed-off-by: James Simmons <jsimmons at infradead.org>
---
fs/lustre/fid/lproc_fid.c | 2 +-
fs/lustre/include/lustre_fid.h | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/lustre/fid/lproc_fid.c b/fs/lustre/fid/lproc_fid.c
index 8f6a4a8..9ca2814 100644
--- a/fs/lustre/fid/lproc_fid.c
+++ b/fs/lustre/fid/lproc_fid.c
@@ -154,7 +154,7 @@ static ssize_t ldebugfs_fid_width_seq_write(struct file *file,
spin_lock(&seq->lcs_lock);
if (seq->lcs_type == LUSTRE_SEQ_DATA)
- max = LUSTRE_DATA_SEQ_MAX_WIDTH;
+ max = IDIF_MAX_OID;
else
max = LUSTRE_METADATA_SEQ_MAX_WIDTH;
diff --git a/fs/lustre/include/lustre_fid.h b/fs/lustre/include/lustre_fid.h
index 88a6061..5ebe362 100644
--- a/fs/lustre/include/lustre_fid.h
+++ b/fs/lustre/include/lustre_fid.h
@@ -173,9 +173,9 @@ enum {
LUSTRE_METADATA_SEQ_MAX_WIDTH = 0x0000000000020000ULL,
/*
- * This is how many data FIDs could be allocated in one sequence(4B - 1)
+ * This is how many data FIDs could be allocated in one sequence(32M - 1)
*/
- LUSTRE_DATA_SEQ_MAX_WIDTH = 0x00000000FFFFFFFFULL,
+ LUSTRE_DATA_SEQ_MAX_WIDTH = 0x0000000001FFFFFFULL,
/*
* How many sequences to allocate to a client at once.
--
1.8.3.1
More information about the lustre-devel
mailing list