X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftarget%2Fout_lib.c;h=ee6eeb443a22afabeda9a7a45e7133f546121e99;hb=2ce6957b69370b0ce75725d1d91866bf55c07fa8;hp=d42187ff4c102469eb9d4f1652ee9326e0d0ab6f;hpb=4a1d58eb28e0a7645f52a3a90c29ce36f6dcf5bd;p=fs%2Flustre-release.git diff --git a/lustre/target/out_lib.c b/lustre/target/out_lib.c index d42187f..ee6eeb4 100644 --- a/lustre/target/out_lib.c +++ b/lustre/target/out_lib.c @@ -43,7 +43,7 @@ const char *update_op_str(__u16 opc) { - static const char *opc_str[] = { + static const char *const opc_str[] = { [OUT_START] = "start", [OUT_CREATE] = "create", [OUT_DESTROY] = "destroy", @@ -597,6 +597,10 @@ int out_create_add_exec(const struct lu_env *env, struct dt_object *obj, struct tx_arg *arg; int rc; + /* LU-13653: ignore quota for DNE directory creation */ + if (dof->dof_type == DFT_DIR) + th->th_ignore_quota = 1; + rc = dt_declare_create(env, obj, attr, NULL, dof, th); if (rc != 0) return rc; @@ -707,7 +711,7 @@ static int out_tx_write_exec(const struct lu_env *env, struct thandle *th, if (arg->reply != NULL) object_update_result_insert(arg->reply, NULL, 0, arg->index, - rc); + rc < 0 ? rc : 0); return rc > 0 ? 0 : rc; } @@ -750,7 +754,8 @@ static int out_tx_xattr_set_exec(const struct lu_env *env, dt_obd_name(th->th_dev), arg->u.xattr_set.buf.lb_buf, arg->u.xattr_set.name, arg->u.xattr_set.flags); - if (!lu_object_exists(&dt_obj->do_lu)) { + if (!lu_object_exists(&dt_obj->do_lu) || + OBD_FAIL_PRECHECK(OBD_FAIL_OUT_OBJECT_MISS)) { rc = -ENOENT; } else { struct linkea_data ldata = { 0 };