lfs setstripe $DIR1/$tfile -i 0 -c 1
cp $SAMPLE_FILE $DIR1/$tfile
cancel_lru_locks osc > /dev/null
- #define OBD_FAIL_ONCE|OBD_FAIL_LDLM_CREATE_RESOURCE 0x30a
+ #define CFS_FAIL_ONCE|OBD_FAIL_LDLM_CREATE_RESOURCE 0x30a
do_facet ost1 lctl set_param fail_loc=0x8000030a
ls -ls $DIR1/$tfile | awk '{ print $1,$6 }' > $DIR1/$tfile-1 & \
ls -ls $DIR2/$tfile | awk '{ print $1,$6 }' > $DIR2/$tfile-2
mkdir_on_mdt0 $DIR2/$tdir
pdo_lru_clear
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
mkdir $DIR1/$tdir/$tfile &
mkdir_on_mdt0 $DIR2/$tdir
pdo_lru_clear
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
touch $DIR1/$tdir/$tfile &
mkdir_on_mdt0 $DIR2/$tdir
pdo_lru_clear
touch $DIR1/$tdir/$tfile
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
link $DIR1/$tdir/$tfile $DIR1/$tdir/$tfile-0 &
mkdir_on_mdt0 $DIR2/$tdir
pdo_lru_clear
touch $DIR1/$tdir/$tfile
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
rm $DIR1/$tdir/$tfile &
mkdir_on_mdt0 $DIR2/$tdir
pdo_lru_clear
touch $DIR1/$tdir/$tfile
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
mv $DIR1/$tdir/$tfile $DIR1/$tdir/$tfile-0 &
# test 41: create blocking operations
test_41a() {
pdo_lru_clear
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
$MULTIOP $DIR1/$tfile oO_CREAT:O_RDWR:c &
test_41b() {
pdo_lru_clear
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
$MULTIOP $DIR1/$tfile oO_CREAT:O_RDWR:c &
test_41c() {
pdo_lru_clear
touch $DIR1/$tfile-2
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
$MULTIOP $DIR1/$tfile oO_CREAT:O_RDWR:c &
test_41d() {
pdo_lru_clear
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
$MULTIOP $DIR1/$tfile oO_CREAT:O_RDWR:c &
test_41e() {
pdo_lru_clear
touch $DIR1/$tfile-2
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
$MULTIOP $DIR1/$tfile oO_CREAT:O_RDWR:c &
test_41f() {
pdo_lru_clear
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
$MULTIOP $DIR1/$tfile oO_CREAT:O_RDWR:c &
test_41g() {
pdo_lru_clear
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
$MULTIOP $DIR1/$tfile oO_CREAT:O_RDWR:c &
test_41h() {
pdo_lru_clear
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
$MULTIOP $DIR1/$tfile oO_CREAT:O_RDWR:c &
skip "Need MDS version newer than 2.13.56"
local msg fail_loc
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_REINT_OPEN 0x169
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_REINT_OPEN2 0x16a
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_REINT_OPEN 0x169
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_REINT_OPEN2 0x16a
for fail_loc in "0x80000169" "0x8000016a"; do
echo "Begin 100 tests with fail_loc=$fail_loc"
printf "Progress: "
# test 42: unlink and blocking operations
test_42a() {
pdo_lru_clear
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
mkdir $DIR1/$tfile &
test_42b() {
pdo_lru_clear
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
mkdir $DIR1/$tfile &
test_42c() {
pdo_lru_clear
touch $DIR1/$tfile-2
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
mkdir $DIR1/$tfile &
test_42d() {
pdo_lru_clear
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
mkdir $DIR1/$tfile &
test_42e() {
pdo_lru_clear
touch $DIR1/$tfile-2
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
mkdir $DIR1/$tfile &
test_42f() {
pdo_lru_clear
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
mkdir $DIR1/$tfile &
test_42g() {
mkdir_on_mdt0 $DIR1/$tdir
pdo_lru_clear
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
mkdir $DIR1/$tdir/$tfile &
test_42h() {
pdo_lru_clear
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
mkdir $DIR1/$tfile &
test_43b() {
pdo_lru_clear
touch $DIR1/$tfile
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
rm $DIR1/$tfile &
pdo_lru_clear
touch $DIR1/$tfile
touch $DIR1/$tfile-2
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
rm $DIR1/$tfile &
test_43d() {
pdo_lru_clear
touch $DIR1/$tfile
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
rm $DIR1/$tfile &
pdo_lru_clear
touch $DIR1/$tfile
touch $DIR1/$tfile-2
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
rm $DIR1/$tfile &
test_43f() {
pdo_lru_clear
touch $DIR1/$tfile
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
rm $DIR1/$tfile &
test_43g() {
pdo_lru_clear
touch $DIR1/$tfile
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
rm $DIR1/$tfile &
test_43h() {
pdo_lru_clear
touch $DIR1/$tfile
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
rm $DIR1/$tfile &
[ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs" && return
pdo_lru_clear
touch $DIR1/$tfile
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
rm $DIR1/$tfile &
mkdir_on_mdt0 $DIR1/$tdir
for i in {1..100}; do
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_CREATE_RACE 0x167
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_CREATE_RACE 0x167
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000167 2>/dev/null ||
true"
skip "Need MDS version newer than 2.13.56"
local msg fail_loc
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_REINT_OPEN 0x169
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_REINT_OPEN2 0x16a
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_REINT_OPEN 0x169
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_REINT_OPEN2 0x16a
for fail_loc in "0x80000169" "0x8000016a"; do
echo "Begin 100 tests with fail_loc=$fail_loc"
printf "Progress: "
test_44a() {
pdo_lru_clear
touch $DIR1/$tfile-2
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK2 0x146
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK2 0x146
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000146 2>/dev/null || true"
mv $DIR1/$tfile-2 $DIR1/$tfile &
test_44b() {
pdo_lru_clear
touch $DIR1/$tfile-2
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK2 0x146
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK2 0x146
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000146 2>/dev/null || true"
mv $DIR1/$tfile-2 $DIR1/$tfile &
pdo_lru_clear
touch $DIR1/$tfile-2
touch $DIR1/$tfile-3
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK2 0x146
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK2 0x146
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000146 2>/dev/null || true"
mv $DIR1/$tfile-2 $DIR1/$tfile &
test_44d() {
pdo_lru_clear
touch $DIR1/$tfile-2
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK2 0x146
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK2 0x146
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000146 2>/dev/null || true"
mv $DIR1/$tfile-2 $DIR1/$tfile &
touch $DIR1/$tfile
touch $DIR1/$tfile-2
touch $DIR1/$tfile-3
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK2 0x146
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK2 0x146
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000146 2>/dev/null || true"
mv $DIR1/$tfile-2 $DIR1/$tfile &
pdo_lru_clear
touch $DIR1/$tfile-2
touch $DIR1/$tfile-3
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK2 0x146
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK2 0x146
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000146 2>/dev/null || true"
mv $DIR1/$tfile-2 $DIR1/$tfile &
test_44g() {
pdo_lru_clear
touch $DIR1/$tfile-2
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK2 0x146
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK2 0x146
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000146 2>/dev/null || true"
mv $DIR1/$tfile-2 $DIR1/$tfile &
test_44h() {
pdo_lru_clear
touch $DIR1/$tfile-2
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK2 0x146
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK2 0x146
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000146 2>/dev/null || true"
mv $DIR1/$tfile-2 $DIR1/$tfile &
[ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs" && return
pdo_lru_clear
touch $DIR1/$tfile-2
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK2 0x146
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK2 0x146
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000146 2>/dev/null || true"
mv $DIR1/$tfile-2 $DIR1/$tfile &
test_45b() {
pdo_lru_clear
touch $DIR1/$tfile
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
mv $DIR1/$tfile $DIR1/$tfile-2 &
pdo_lru_clear
touch $DIR1/$tfile
touch $DIR1/$tfile-3
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
mv $DIR1/$tfile $DIR1/$tfile-2 &
test_45d() {
pdo_lru_clear
touch $DIR1/$tfile
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
mv $DIR1/$tfile $DIR1/$tfile-2 &
pdo_lru_clear
touch $DIR1/$tfile
touch $DIR1/$tfile-3
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
mv $DIR1/$tfile $DIR1/$tfile-2 &
test_45f() {
pdo_lru_clear
touch $DIR1/$tfile
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
mv $DIR1/$tfile $DIR1/$tfile-2 &
test_45g() {
pdo_lru_clear
touch $DIR1/$tfile
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
mv $DIR1/$tfile $DIR1/$tfile-2 &
test_45h() {
pdo_lru_clear
touch $DIR1/$tfile
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
mv $DIR1/$tfile $DIR1/$tfile-2 &
[ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs" && return
pdo_lru_clear
touch $DIR1/$tfile
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
mv $DIR1/$tfile $DIR1/$tfile-2 &
skip "Need MDS version newer than 2.13.56"
local msg fail_loc
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_REINT_OPEN 0x169
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_REINT_OPEN2 0x16a
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_REINT_OPEN 0x169
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_REINT_OPEN2 0x16a
for fail_loc in "0x80000169" "0x8000016a"; do
echo "Begin 100 tests with fail_loc=$fail_loc"
printf "Progress: "
test_46a() {
pdo_lru_clear
touch $DIR1/$tfile-2
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
link $DIR1/$tfile-2 $DIR1/$tfile &
test_46b() {
pdo_lru_clear
touch $DIR1/$tfile-2
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
link $DIR1/$tfile-2 $DIR1/$tfile &
test_46c() {
pdo_lru_clear
touch $DIR1/$tfile-2
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
link $DIR1/$tfile-2 $DIR1/$tfile &
test_46d() {
pdo_lru_clear
touch $DIR1/$tfile-2
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
link $DIR1/$tfile-2 $DIR1/$tfile &
pdo_lru_clear
touch $DIR1/$tfile-2
touch $DIR1/$tfile-3
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
link $DIR1/$tfile-2 $DIR1/$tfile &
pdo_lru_clear
touch $DIR1/$tfile-2
touch $DIR1/$tfile-3
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
link $DIR1/$tfile-2 $DIR1/$tfile &
test_46g() {
pdo_lru_clear
touch $DIR1/$tfile-2
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
link $DIR1/$tfile-2 $DIR1/$tfile &
test_46h() {
pdo_lru_clear
touch $DIR1/$tfile-2
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
link $DIR1/$tfile-2 $DIR1/$tfile &
[ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs" && return
pdo_lru_clear
touch $DIR1/$tfile-2
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
link $DIR1/$tfile-2 $DIR1/$tfile &
# test 47: remote mkdir and blocking operations
test_47a() {
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
[ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs" && return
pdo_lru_clear
do_nodes $(comma_list $(mdts_nodes)) \
run_test 47a "pdirops: remote mkdir vs mkdir"
test_47b() {
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
[ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs" && return
pdo_lru_clear
do_nodes $(comma_list $(mdts_nodes)) \
[ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs" && return
pdo_lru_clear
touch $DIR1/$tfile-2
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
$LFS mkdir -i 1 $DIR1/$tfile &
test_47d() {
[ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs" && return
pdo_lru_clear
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
$LFS mkdir -i 1 $DIR1/$tfile &
[ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs" && return
pdo_lru_clear
touch $DIR1/$tfile-2
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
$LFS mkdir -i 1 $DIR1/$tfile &
test_47f() {
[ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs" && return
pdo_lru_clear
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
$LFS mkdir -i 1 $DIR1/$tfile &
sync
sync_all_data
pdo_lru_clear
-#define OBD_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
+#define CFS_FAIL_ONCE|OBD_FAIL_MDS_PDO_LOCK 0x145
do_nodes $(comma_list $(mdts_nodes)) \
"lctl set_param -n fail_loc=0x80000145 2>/dev/null || true"
$LFS mkdir -i 1 $DIR1/$tfile &
for i in {1..50}; do
log "Iteration $i"
-#define OBD_FAIL_ONCE|OBD_FAIL_LLITE_RACE_MOUNT 0x80001417
+#define CFS_FAIL_ONCE|OBD_FAIL_LLITE_RACE_MOUNT 0x80001417
$LCTL set_param -n fail_loc=0x80001417
mount_client $MOUNT & pid1=$!