To avoid changeing SEQ after replay_barrier, we
use force_new_seq when starting the test suites heavily
using replay_barrier, e.g. replay-single.
However when there are fewer OSTs, the default 16384
SEQ width could not last the entire test suite, SEQ
rollover could still happen randomly after replay_barrier.
To overcome this, change the default OSTSEQWIDTH to
65536, and divide by number of OSTs, so the SEQ width is
larger with fewer OSTs. For 8 OSTs, the SEQ width is 16384,
and make sure we don't go under it.
Use force_new_seq_all for the test suites using replay_barrier
on MDTs other than mds1.
Add force_new_seq_all for replay-ost-single, which is using
replay_barrier on OST. If SEQ rollover happens after that,
the SEQ range update on ofd is lost due to replay_barrier,
the next time when we try to allocate a new SEQ will end up
with an old one.
Use force_new_seq_all for the test cases(namely sanity-pfl/0b
0c 1c 16b sanity/27Cd) checking for number of stripes created
with overstriping, to make sure we have enough objects
in the precreate pool.
Test-Parameters: trivial ostcount=4 testlist=replay-single
Test-Parameters: ostcount=2 testlist=replay-single
Test-Parameters: mdtcount=2 testlist=conf-sanity env=ONLY=122a,ONLY_REPEAT=10
Test-Parameters: testlist=sanity,sanity-pfl
Test-Parameters: testlist=sanity-scrub,replay-single,obdfilter-survey,replay-ost-single,large-scale
Fixes:
0ecb2a167c ("LU-11912 ofd: reduce LUSTRE_DATA_SEQ_MAX_WIDTH")
Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Change-Id: Ic65111199f042405d6db8acb729b2cddf91138af
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50478
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
min(OBIF_MAX_OID, client_seq->lcs_width) :
min(IDIF_MAX_OID, client_seq->lcs_width);
- ofd_seq_last_oid_set(oseq, seq_width & ~0xffULL);
+ ofd_seq_last_oid_set(oseq, seq_width > 255 ?
+ seq_width - 255 : seq_width);
} else {
ofd_seq_last_oid_set(oseq, OFD_INIT_OBJID);
}
OSTDEVBASE=${OSTDEVBASE:-$TMP/${FSNAME}-ost}
OSTSIZE=${OSTSIZE:-400000}
OSTOPT=${OSTOPT:-}
-OSTSEQWIDTH=${OSTSEQWIDTH:-0x3fff}
+OSTSEQWIDTH=${OSTSEQWIDTH:-0x20000}
OST_FS_MKFS_OPTS=${OST_FS_MKFS_OPTS:-}
OST_MOUNT_OPTS=${OST_MOUNT_OPTS:-}
OST_MOUNT_FS_OPTS=${OST_MOUNT_FS_OPTS:-}
do_facet $SINGLEMDS "sync; sleep 10; sync; sleep 10; sync"
fi
-force_new_seq mds1
+force_new_seq_all
LU482_FAILED=$(mktemp -u $TMP/$TESTSUITE.lu482.XXXXXX)
test_0a() {
$LFS setstripe $TDIR -i 0 -c 1
$LFS getstripe $TDIR
+force_new_seq_all
+
test_0a() {
zconf_umount $(hostname) $MOUNT -f
# needs to run during initial client->OST connection
do_facet $SINGLEMDS sync
fi
-force_new_seq mds1
+force_new_seq_all
test_0() {
replay_barrier mds1
do_facet $SINGLEMDS sync
fi
-force_new_seq mds1
+force_new_seq_all
test_0a() { # was test_0
mkdir_on_mdt0 $DIR/$tdir || error "mkdir $DIR/$tdir failed"
skip "server does not support overstriping"
large_xattr_enabled || skip_env "no large xattr support"
- ost_set_temp_seq_width_all $DATA_SEQ_MAX_WIDTH
+ force_new_seq_all
local comp_file=$DIR/$tdir/$tfile
large_xattr_enabled || skip_env "no large xattr support"
- ost_set_temp_seq_width_all $DATA_SEQ_MAX_WIDTH
+ force_new_seq_all
local comp_file=$DIR/$tdir/$tfile
skip "server does not support overstriping"
large_xattr_enabled || skip_env "no large xattr support"
- ost_set_temp_seq_width_all $DATA_SEQ_MAX_WIDTH
+ force_new_seq_all
local comp_file=$DIR/$tdir/$tfile
local rw_len=$((3 * 1024 * 1024)) # 3M
skip_env "too many osts, skipping"
large_xattr_enabled || skip_env "ea_inode feature disabled"
+ force_new_seq_all
+
local file=$DIR/$tdir/$tfile
local dir=$DIR/$tdir/dir
local temp=$DIR/$tdir/template
[[ $OSTCOUNT -lt 2 ]] && skip_env "need > 1 OST"
large_xattr_enabled || skip_env "ea_inode feature disabled"
- ost_set_temp_seq_width_all $DATA_SEQ_MAX_WIDTH
+ force_new_seq_all
test_mkdir -p $DIR/$tdir
local setcount=$LOV_MAX_STRIPE_COUNT
if [ -f $TMP/test-lu482-trigger ]; then
RC=2
else
+ local seq_width=$(($OSTSEQWIDTH / $OSTCOUNT))
+ (( $seq_width >= 16384 )) || seq_width=16384
do_facet ${facet} \
"mkdir -p $mntpt; $MOUNT_CMD $opts $dm_dev $mntpt"
RC=${PIPESTATUS[0]}
if [[ ${facet} =~ ost ]]; then
do_facet ${facet} "$LCTL set_param \
- seq.cli-$(devicelabel $facet $dm_dev)-super.width=$OSTSEQWIDTH"
+ seq.cli-$(devicelabel $facet $dm_dev)-super.width=$seq_width"
fi
fi