}
run_test 101a "Test auto attach in mount namespace (simulated container)"
+test_102() {
+ grep -q io_uring_setup /proc/kallsyms ||
+ skip "Client OS does not support io_uring I/O engine"
+ io_uring_probe || skip "kernel does not support io_uring fully"
+
+ $LCTL get_param -n mdc.*.connect_flags | grep -q pcc_ro ||
+ skip "Server does not support PCC-RO"
+
+ which fio || skip_env "no fio installed"
+ fio --enghelp | grep -q io_uring ||
+ skip_env "fio does not support io_uring I/O engine"
+
+ local loopfile="$TMP/$tfile"
+ local mntpt="/mnt/pcc.$tdir"
+ local hsm_root="$mntpt/$tdir"
+ local file=$DIR/$tfile
+
+ setup_loopdev client $loopfile $mntpt 60
+ mkdir $hsm_root || error "mkdir $hsm_root failed"
+ setup_pcc_mapping client \
+ "projid={0}\ roid=$HSM_ARCHIVE_NUMBER\ pccro=1"
+ do_facet $SINGLEAGT $LCTL set_param llite.*.pcc_async_threshold=0
+
+ local ioengine="io_uring"
+ local numjobs=2
+ local size=10M
+
+ do_facet $SINGLEAGT fio --name=seqwrite --ioengine=$ioengine \
+ --bs=$PAGE_SIZE --direct=1 --numjobs=$numjobs \
+ --iodepth=64 --size=$size --filename=$file --rw=write ||
+ error "fio seqwrite $file failed"
+
+ # Read the file will trigger the buffered read from Lustre OSTs and
+ # write to PCC copy as @pcc_async_threshold is set with 0.
+ do_facet $SINGLEAGT fio --name=seqread --ioengine=$ioengine \
+ --bs=$PAGE_SIZE --direct=1 --numjobs=$numjobs \
+ --iodepth=64 --size=$size --filename=$file --rw=read ||
+ error "fio seqread $file failed"
+}
+run_test 102 "PCC-RO should not hange for io_uring I/O engine"
+
complete $SECONDS
check_and_cleanup_lustre
exit_status