From: Alexey Lyashkov Date: Thu, 22 Feb 2024 06:38:03 +0000 (+0300) Subject: LU-17573 lov: change default object size. X-Git-Tag: 2.15.6-RC1~20 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=refs%2Fchanges%2F00%2F56100%2F2;p=fs%2Flustre-release.git LU-17573 lov: change default object size. OST don't able to use indirects for long time, let's switch a object size to extent based. Lustre-commit: f315a3a594a78ecd47fcd74177fa73fb2efff59c Lustre-change: https://review.whamcloud.com/54137 Test-Parameters: trivial HPe-bug-id: LUS-11428 Signed-off-by: Alexey Lyashkov Signed-off-by: Eric Carbonneau Change-Id: I9759fc7122c41075ebc35d52ade342c37706b041 Reviewed-by: Alexander Zarochentsev Reviewed-by: Alexander Boyko Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56100 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/lov/lov_ea.c b/lustre/lov/lov_ea.c index beb0f63..2631660 100644 --- a/lustre/lov/lov_ea.c +++ b/lustre/lov/lov_ea.c @@ -51,12 +51,12 @@ lu_extent_le_to_cpu(struct lu_extent *dst, const struct lu_extent *src) /* * Find minimum stripe maxbytes value. For inactive or - * reconnecting targets use LUSTRE_EXT3_STRIPE_MAXBYTES. + * reconnecting targets use LUSTRE_EXT4_STRIPE_MAXBYTES. */ static loff_t lov_tgt_maxbytes(struct lov_tgt_desc *tgt) { struct obd_import *imp; - loff_t maxbytes = LUSTRE_EXT3_STRIPE_MAXBYTES; + loff_t maxbytes = LUSTRE_EXT4_STRIPE_MAXBYTES; if (!tgt->ltd_active) return maxbytes; @@ -281,12 +281,14 @@ lsme_unpack(struct lov_obd *lov, struct lov_mds_md *lmm, size_t buf_size, if (maxbytes) { if (min_stripe_maxbytes == 0) - min_stripe_maxbytes = LUSTRE_EXT3_STRIPE_MAXBYTES; + min_stripe_maxbytes = LUSTRE_EXT4_STRIPE_MAXBYTES; if (stripe_count == 0) - stripe_count = lov->desc.ld_tgt_count; + stripe_count = lsme->lsme_stripe_count <= 0 ? + lov->desc.ld_tgt_count : + lsme->lsme_stripe_count; - if (min_stripe_maxbytes <= LLONG_MAX / stripe_count) + if (min_stripe_maxbytes <= (LLONG_MAX / stripe_count)) lov_bytes = min_stripe_maxbytes * stripe_count; else lov_bytes = MAX_LFS_FILESIZE; diff --git a/lustre/lov/lov_internal.h b/lustre/lov/lov_internal.h index 9341d2e..33fb43e 100644 --- a/lustre/lov/lov_internal.h +++ b/lustre/lov/lov_internal.h @@ -36,9 +36,11 @@ #include /* If we are unable to get the maximum object size from the OST in - * ocd_maxbytes using OBD_CONNECT_MAXBYTES, then we fall back to using - * the old maximum object size from ext3. */ -#define LUSTRE_EXT3_STRIPE_MAXBYTES 0x1fffffff000ULL + * ocd_maxbytes using OBD_CONNECT_MAXBYTES or LSM component don't init, + * then we fall back to using the maximum object size from ldiskfs. + * Once indirect's blocks don't supported for ost now, ldiskfs + * extent limit used */ +#define LUSTRE_EXT4_STRIPE_MAXBYTES (((1ULL << 32) - 1) << 12) struct lov_stripe_md_entry { struct lu_extent lsme_extent; diff --git a/lustre/tests/sanity-hsm.sh b/lustre/tests/sanity-hsm.sh index daf7574..3d7122f 100755 --- a/lustre/tests/sanity-hsm.sh +++ b/lustre/tests/sanity-hsm.sh @@ -1578,7 +1578,7 @@ test_21() { local orig_size=$(stat -c "%s" $f) local orig_blocks=$(stat -c "%b" $f) - start_full_debug_logging +# start_full_debug_logging $LFS hsm_archive $f || error "could not archive file" wait_request_state $fid ARCHIVE SUCCEED @@ -1618,7 +1618,7 @@ test_21() { $LFS hsm_release $f || fail "second release should succeed" check_hsm_flags $f "0x0000000d" - stop_full_debug_logging +# stop_full_debug_logging } run_test 21 "Simple release tests"