b:13710
i: nikita, fanyong
DTO_ATTR_SET,
DTO_XATTR_SET,
DTO_LOG_REC, /* XXX temporary: dt layer knows nothing about llog. */
DTO_ATTR_SET,
DTO_XATTR_SET,
DTO_LOG_REC, /* XXX temporary: dt layer knows nothing about llog. */
+ DTO_WRITE_BASE,
+ DTO_WRITE_BLOCK,
#include "mdd_internal.h"
#include "mdd_internal.h"
+static int dto_txn_credits[DTO_NR];
+
int mdd_txn_start_cb(const struct lu_env *env, struct txn_param *param,
void *cookie)
{
int mdd_txn_start_cb(const struct lu_env *env, struct txn_param *param,
void *cookie)
{
+ struct mdd_device *mdd = cookie;
+ struct obd_device *obd = mdd2obd_dev(mdd);
+ /* Each transaction updates lov objids, the credits should be added for
+ * this */
+ int blk, shift = mdd->mdd_dt_conf.ddp_block_shift;
+ blk = ((obd->u.mds.mds_lov_desc.ld_tgt_count * sizeof(obd_id) +
+ (1 << shift) - 1) >> shift) + 1;
+
+ /* add lov objids credits */
+ param->tp_credits += blk * dto_txn_credits[DTO_WRITE_BLOCK] +
+ dto_txn_credits[DTO_WRITE_BASE];
+
-static int dto_txn_credits[DTO_NR];
void mdd_txn_param_build(const struct lu_env *env, struct mdd_device *mdd,
enum mdd_txn_op op)
{
void mdd_txn_param_build(const struct lu_env *env, struct mdd_device *mdd,
enum mdd_txn_op op)
{
spin_lock(&osd->od_osfs_lock);
/* cache 1 second */
if (cfs_time_before_64(osd->od_osfs_age, cfs_time_shift_64(-1))) {
spin_lock(&osd->od_osfs_lock);
/* cache 1 second */
if (cfs_time_before_64(osd->od_osfs_age, cfs_time_shift_64(-1))) {
- result = sb->s_op->statfs(sb, &osd->od_kstatfs);
+ result = ll_do_statfs(sb, &osd->od_kstatfs);
if (likely(result == 0)) /* N.B. statfs can't really fail */
osd->od_osfs_age = cfs_time_current_64();
}
if (likely(result == 0)) /* N.B. statfs can't really fail */
osd->od_osfs_age = cfs_time_current_64();
}
* also counted in. Do not know why?
*/
[DTO_XATTR_SET] = 16,
* also counted in. Do not know why?
*/
[DTO_XATTR_SET] = 16,
+ [DTO_LOG_REC] = 16,
+ /* creadits for inode change during write */
+ [DTO_WRITE_BASE] = 3,
+ /* credits for single block write */
+ [DTO_WRITE_BLOCK] = 12
};
static int osd_credit_get(const struct lu_env *env, struct dt_device *d,
};
static int osd_credit_get(const struct lu_env *env, struct dt_device *d,
# These tests don't apply to mountconf
MOUNTCONFSKIP="10 11 12 13 13b 14 15"
# These tests don't apply to mountconf
MOUNTCONFSKIP="10 11 12 13 13b 14 15"
-# bug number for skipped test: 13739 13710
-HEAD_EXCEPT=" 32a 32b 33"
+# bug number for skipped test: 13739
+HEAD_EXCEPT=" 32a 32b "
# bug number for skipped test: 13709 10510 12743
ALWAYS_EXCEPT=" $CONF_SANITY_EXCEPT $MOUNTCONFSKIP $HEAD_EXCEPT 22 23 36"
# bug number for skipped test: 13709 10510 12743
ALWAYS_EXCEPT=" $CONF_SANITY_EXCEPT $MOUNTCONFSKIP $HEAD_EXCEPT 22 23 36"