Description: Oops in read and write path when failing to allocate lock.
Details : Check if lock allocation failed and return error back.
+Severity : normal
+Bugzilla : 11679
+Description: lstripe command fails for valid OST index
+Details : The stripe offset is compared to lov->desc.ld_tgt_count
+ instead of lov->desc.ld_active_tgt_count.
+
--------------------------------------------------------------------------------
2007-08-10 Cluster File Systems, Inc. <info@clusterfs.com>
lum.lmm_stripe_size = LOV_MIN_STRIPE_SIZE;
}
- if ((lum.lmm_stripe_offset >= lov->desc.ld_active_tgt_count) &&
+ if ((lum.lmm_stripe_offset >= lov->desc.ld_tgt_count) &&
(lum.lmm_stripe_offset != (typeof(lum.lmm_stripe_offset))(-1))) {
- CDEBUG(D_IOCTL, "stripe offset %u > number of active OSTs %u\n",
- lum.lmm_stripe_offset, lov->desc.ld_active_tgt_count);
+ CDEBUG(D_IOCTL, "stripe offset %u > number of OSTs %u\n",
+ lum.lmm_stripe_offset, lov->desc.ld_tgt_count);
RETURN(-EINVAL);
}
stripe_count = lov_get_stripecnt(lov, lum.lmm_stripe_count);
}
run_test 65j "set default striping on root directory (bug 6367)="
+test_65k() { # bug11679
+ [ "$OSTCOUNT" -lt 2 ] && skip "too few OSTs" && return
+
+ echo "Check OST status: "
+ MDS_OSCS=`do_facet mds lctl dl | awk '/[oO][sS][cC].*md[ts]/ { print $4 }'`
+ for OSC in $MDS_OSCS; do
+ echo $OSC "is activate"
+ do_facet mds lctl --device %$OSC activate
+ done
+ mkdir -p $DIR/$tdir
+ for INACTIVE_OSC in $MDS_OSCS; do
+ echo $INACTIVE_OSC "is Deactivate:"
+ do_facet mds lctl --device %$INACTIVE_OSC deactivate
+ for STRIPE_OSC in $MDS_OSCS; do
+ STRIPE_OST=`osc_to_ost $STRIPE_OSC`
+ STRIPE_INDEX=`do_facet mds cat $LPROC/lov/*md*/target_obd |
+ grep $STRIPE_OST | awk -F: '{print $1}'`
+ echo "$SETSTRIPE $DIR/$tdir/${STRIPE_INDEX} 0 ${STRIPE_INDEX} 1"
+ do_facet mds $SETSTRIPE $DIR/$tdir/${STRIPE_INDEX} 0 ${STRIPE_INDEX} 1
+ RC=$?
+ [ $RC -ne 0 ] && error "setstripe should have succeeded"
+ done
+ rm -f $DIR/$tdir/*
+ echo $INACTIVE_OSC "is Activate."
+ do_facet mds lctl --device %$INACTIVE_OSC activate
+ done
+}
+run_test 65k "validate manual striping works properly with deactivated OSCs"
+
# bug 2543 - update blocks count on client
test_66() {
COUNT=${COUNT:-8}
(cd `dirname $1`; echo $PWD/`basename $1`)
}
+########################
+# helper functions
+
+osc_to_ost()
+{
+ osc=$1
+ ost=`echo $1 | awk -F_ '{print $3}'`
+ if [ -z $ost ]; then
+ ost=`echo $1 | sed 's/-osc.*//'`
+ fi
+ echo $ost
+}