this bug only happens when inode quota limitation is very low(less than 12), so that inode quota unit is 1 at initialization. Now least quota qunit is 2,
instead of 1.
b=15758
i=andrew.perepechko
i=johann
tool, these objects can be retrieved and data can be salvaged
by using the object ID saved in the fid.
+Severity : minor
+Frequency : rare
+Bugzilla : 15758
+Description: this bug _only_ happens when inode quota limitation is very low
+ (less than 12), so that inode quota unit is 1 at initialization.
+Details : if remaining quota equates 1, it is a sign to demonstate that quota
+ is effective now. So least quota qunit should be 2.
+
-------------------------------------------------------------------------------
int rc2;
QDATA_DEBUG(qdata, "local %s.\n",
opc == QUOTA_DQACQ ? "DQACQ" : "DQREL");
+ QDATA_SET_CHANGE_QS(qdata);
rc = qctxt->lqc_handler(obd, qdata, opc);
rc2 = dqacq_completion(obd, qctxt, qdata, rc, opc);
RETURN(rc ? rc : rc2);
qctxt->lqc_switch_qs = 1; /* Change qunit size in default setting */
qctxt->lqc_cqs_boundary_factor = 4;
qctxt->lqc_cqs_least_bunit = PTLRPC_MAX_BRW_SIZE;
- qctxt->lqc_cqs_least_iunit = 1;
+ qctxt->lqc_cqs_least_iunit = 2;
qctxt->lqc_cqs_qs_factor = 2;
qctxt->lqc_atype = 0;
qctxt->lqc_status= 0;
QUSG(*usage, QDATA_IS_BLK(qdata)) < hlimit)
qdata->qd_count = (hlimit -
QUSG(*usage, QDATA_IS_BLK(qdata)))
- * QUOTABLOCK_SIZE;
+ * (QDATA_IS_BLK(qdata) ?
+ QUOTABLOCK_SIZE : 1);
else
GOTO(out, rc = -EDQUOT);
}
# file hard limit (normal use and out of quota)
test_2() {
for i in `seq 1 $cycle`; do
- # define ino_qunit is between 10 and 100
- ino_qunit=$(( $RANDOM % 90 + 10 ))
- ino_qtune=$(( $RANDOM % $ino_qunit ))
- # RANDOM's maxium is 32767
- i_limit=$(( $RANDOM % 990 + 10 ))
+ if [ $i -eq 1 ]; then
+ ino_qunit=52
+ ino_qtune=41
+ i_limit=11
+ else
+ # define ino_qunit is between 10 and 100
+ ino_qunit=$(( $RANDOM % 90 + 10 ))
+ ino_qtune=$(( $RANDOM % $ino_qunit ))
+ # RANDOM's maxium is 32767
+ i_limit=$(( $RANDOM % 990 + 10 ))
+ fi
+
set_file_tunesz $ino_qtune
set_file_unitsz $ino_qunit
echo "cycle: $i(total $cycle) iunit:$ino_qunit, itune:$ino_qtune, ilimit:$i_limit"
$SHOW_QUOTA_INFO
echo " Create file after timer goes off"
- $RUNAS touch ${TESTFILE}_after ${TESTFILE}_after1 && \
+ # the least of inode qunit is 2, so there are at most 3(qunit:2+qtune:1)
+ # inode quota left here
+ $RUNAS touch ${TESTFILE}_after ${TESTFILE}_after1 ${TESTFILE}_after2 || true
+ sync; sleep 1; sync
+ $RUNAS touch ${TESTFILE}_after3 && \
error "create after timer expired, but expect EDQUOT"
sync; sleep 1; sync