struct lu_buf *buf);
int (*moo_changelog)(const struct lu_env *env,
- enum changelog_rec_type type, int flags,
+ enum changelog_rec_type type,
+ enum changelog_rec_flags clf_flags,
struct md_device *m, const struct lu_fid *fid);
int (*moo_open)(const struct lu_env *env,
static inline int mo_changelog(const struct lu_env *env,
enum changelog_rec_type type,
- int flags, struct md_device *m,
- const struct lu_fid *fid)
+ enum changelog_rec_flags clf_flags,
+ struct md_device *m, const struct lu_fid *fid)
{
struct lu_fid rootfid;
struct md_object *root;
RETURN(PTR_ERR(root));
LASSERT(root->mo_ops->moo_changelog);
- rc = root->mo_ops->moo_changelog(env, type, flags, m, fid);
+ rc = root->mo_ops->moo_changelog(env, type, clf_flags, m, fid);
lu_object_put(env, &root->mo_lu);
return NULL;
}
-/* per-record flags */
+/* 12 bits of per-record data can be stored in the bottom of the flags */
#define CLF_FLAGSHIFT 12
-#define CLF_FLAGMASK ((1U << CLF_FLAGSHIFT) - 1)
-#define CLF_VERMASK (~CLF_FLAGMASK)
enum changelog_rec_flags {
CLF_VERSION = 0x1000,
CLF_RENAME = 0x2000,
CLF_JOBID = 0x4000,
CLF_EXTRA_FLAGS = 0x8000,
- CLF_SUPPORTED = CLF_VERSION | CLF_RENAME | CLF_JOBID | CLF_EXTRA_FLAGS
+ CLF_SUPPORTED = CLF_VERSION | CLF_RENAME | CLF_JOBID |
+ CLF_EXTRA_FLAGS,
+ CLF_FLAGMASK = (1U << CLF_FLAGSHIFT) - 1,
+ CLF_VERMASK = ~CLF_FLAGMASK,
};
CLF_HSM_EVENT_L);
}
-static inline void hsm_set_cl_event(int *flags, enum hsm_event he)
+static inline void hsm_set_cl_event(enum changelog_rec_flags *clf_flags,
+ enum hsm_event he)
{
- *flags |= (he << CLF_HSM_EVENT_L);
+ *clf_flags |= (he << CLF_HSM_EVENT_L);
}
-static inline __u16 hsm_get_cl_flags(int flags)
+static inline __u16 hsm_get_cl_flags(enum changelog_rec_flags clf_flags)
{
- return CLF_GET_BITS(flags, CLF_HSM_FLAG_H, CLF_HSM_FLAG_L);
+ return CLF_GET_BITS(clf_flags, CLF_HSM_FLAG_H, CLF_HSM_FLAG_L);
}
-static inline void hsm_set_cl_flags(int *flags, int bits)
+static inline void hsm_set_cl_flags(enum changelog_rec_flags *clf_flags,
+ unsigned int bits)
{
- *flags |= (bits << CLF_HSM_FLAG_L);
+ *clf_flags |= (bits << CLF_HSM_FLAG_L);
}
-static inline int hsm_get_cl_error(int flags)
+static inline int hsm_get_cl_error(enum changelog_rec_flags clf_flags)
{
- return CLF_GET_BITS(flags, CLF_HSM_ERR_H, CLF_HSM_ERR_L);
+ return CLF_GET_BITS(clf_flags, CLF_HSM_ERR_H, CLF_HSM_ERR_L);
}
-static inline void hsm_set_cl_error(int *flags, int error)
+static inline void hsm_set_cl_error(enum changelog_rec_flags *clf_flags,
+ unsigned int error)
{
- *flags |= (error << CLF_HSM_ERR_L);
+ *clf_flags |= (error << CLF_HSM_ERR_L);
}
enum changelog_rec_extra_flags {
__u32 padding;
};
-/* Changelog extra extension to include OPEN mode. */
+/* Changelog extra extension to include low 32 bits of MDS_OPEN_* flags. */
struct changelog_ext_openmode {
__u32 cr_openflags;
};
const struct lu_name *sname)
{
const struct lu_ucred *uc = lu_ucred(env);
- enum changelog_rec_flags crf = CLF_EXTRA_FLAGS;
+ enum changelog_rec_flags clf_flags = CLF_EXTRA_FLAGS;
enum changelog_rec_extra_flags crfe = CLFE_UIDGID | CLFE_NID;
if (sname != NULL)
- crf |= CLF_RENAME;
+ clf_flags |= CLF_RENAME;
if (uc != NULL && uc->uc_jobid[0] != '\0')
- crf |= CLF_JOBID;
+ clf_flags |= CLF_JOBID;
return llog_data_len(LLOG_CHANGELOG_HDR_SZ +
- changelog_rec_offset(crf, crfe) +
+ changelog_rec_offset(clf_flags, crfe) +
(tname != NULL ? tname->ln_namelen : 0) +
(sname != NULL ? 1 + sname->ln_namelen : 0));
}
clnid->cr_nid = nid;
}
-void mdd_changelog_rec_extra_omode(struct changelog_rec *rec, int flags)
+void mdd_changelog_rec_extra_omode(struct changelog_rec *rec, u32 flags)
{
struct changelog_ext_openmode *omd = changelog_rec_openmode(rec);
- omd->cr_openflags = (__u32)flags;
+ omd->cr_openflags = flags;
}
void mdd_changelog_rec_extra_xattr(struct changelog_rec *rec,
const char *xattr_name)
{
- struct changelog_ext_xattr *xattr = changelog_rec_xattr(rec);
+ struct changelog_ext_xattr *xattr = changelog_rec_xattr(rec);
strlcpy(xattr->cr_xattr, xattr_name, sizeof(xattr->cr_xattr));
}
int mdd_changelog_ns_store(const struct lu_env *env,
struct mdd_device *mdd,
enum changelog_rec_type type,
- enum changelog_rec_flags crf,
+ enum changelog_rec_flags clf_flags,
struct mdd_object *target,
const struct lu_fid *tpfid,
const struct lu_fid *sfid,
RETURN(-ENOMEM);
rec = buf->lb_buf;
- crf &= CLF_FLAGMASK;
- crf |= CLF_EXTRA_FLAGS;
+ clf_flags &= CLF_FLAGMASK;
+ clf_flags |= CLF_EXTRA_FLAGS;
if (uc) {
if (uc->uc_jobid[0] != '\0')
- crf |= CLF_JOBID;
+ clf_flags |= CLF_JOBID;
xflags |= CLFE_UIDGID;
xflags |= CLFE_NID;
}
if (sname != NULL)
- crf |= CLF_RENAME;
+ clf_flags |= CLF_RENAME;
else
- crf |= CLF_VERSION;
+ clf_flags |= CLF_VERSION;
- rec->cr.cr_flags = crf;
+ rec->cr.cr_flags = clf_flags;
- if (crf & CLF_EXTRA_FLAGS) {
+ if (clf_flags & CLF_EXTRA_FLAGS) {
mdd_changelog_rec_ext_extra_flags(&rec->cr, xflags);
if (xflags & CLFE_UIDGID)
mdd_changelog_rec_extra_uidgid(&rec->cr,
rec->cr.cr_namelen = tname->ln_namelen;
memcpy(changelog_rec_name(&rec->cr), tname->ln_name, tname->ln_namelen);
- if (crf & CLF_RENAME)
+ if (clf_flags & CLF_RENAME)
mdd_changelog_rec_ext_rename(&rec->cr, sfid, spfid, sname);
- if (crf & CLF_JOBID)
+ if (clf_flags & CLF_JOBID)
mdd_changelog_rec_ext_jobid(&rec->cr, uc->uc_jobid);
if (likely(target != NULL)) {
__u64 uid, __u64 gid);
void mdd_changelog_rec_extra_nid(struct changelog_rec *rec,
lnet_nid_t nid);
-void mdd_changelog_rec_extra_omode(struct changelog_rec *rec, int flags);
+void mdd_changelog_rec_extra_omode(struct changelog_rec *rec, u32 flags);
void mdd_changelog_rec_extra_xattr(struct changelog_rec *rec,
const char *xattr_name);
int mdd_changelog_store(const struct lu_env *env, struct mdd_device *mdd,
struct llog_changelog_rec *rec, struct thandle *th);
int mdd_changelog_data_store(const struct lu_env *env, struct mdd_device *mdd,
- enum changelog_rec_type type, int flags,
+ enum changelog_rec_type type,
+ enum changelog_rec_flags clf_flags,
struct mdd_object *mdd_obj,
struct thandle *handle);
int mdd_changelog_ns_store(const struct lu_env *env, struct mdd_device *mdd,
enum changelog_rec_type type,
- enum changelog_rec_flags crf,
+ enum changelog_rec_flags clf_flags,
struct mdd_object *target,
const struct lu_fid *tpfid,
const struct lu_fid *sfid,
int mdd_changelog_data_store_xattr(const struct lu_env *env,
struct mdd_device *mdd,
enum changelog_rec_type type,
- int flags, struct mdd_object *mdd_obj,
+ enum changelog_rec_flags clf_flags,
+ struct mdd_object *mdd_obj,
const char *xattr_name,
struct thandle *handle);
static int mdd_changelog_data_store_by_fid(const struct lu_env *env,
struct mdd_device *mdd,
enum changelog_rec_type type,
- int flags, const struct lu_fid *fid,
+ enum changelog_rec_flags clf_flags,
+ const struct lu_fid *fid,
const char *xattr_name,
struct thandle *handle);
__u32 gid = mou->mou_uidgid & ((1UL << 32) - 1);
ENTRY;
-
tmp = mdd_obj_user_find(mdd_obj, uid, gid, mou->mou_open_flags);
if (tmp != NULL)
RETURN(-EEXIST);
static int mdd_changelog_data_store_by_fid(const struct lu_env *env,
struct mdd_device *mdd,
enum changelog_rec_type type,
- int flags, const struct lu_fid *fid,
+ enum changelog_rec_flags clf_flags,
+ const struct lu_fid *fid,
const char *xattr_name,
struct thandle *handle)
{
const struct lu_ucred *uc = lu_ucred(env);
+ enum changelog_rec_extra_flags xflags = CLFE_INVALID;
struct llog_changelog_rec *rec;
struct lu_buf *buf;
int reclen;
- int xflags = CLFE_INVALID;
int rc;
- flags = (flags & CLF_FLAGMASK) | CLF_VERSION | CLF_EXTRA_FLAGS;
+ clf_flags = (clf_flags & CLF_FLAGMASK) | CLF_VERSION | CLF_EXTRA_FLAGS;
if (uc) {
if (uc->uc_jobid[0] != '\0')
- flags |= CLF_JOBID;
+ clf_flags |= CLF_JOBID;
xflags |= CLFE_UIDGID;
xflags |= CLFE_NID;
}
xflags |= CLFE_XATTR;
reclen = llog_data_len(LLOG_CHANGELOG_HDR_SZ +
- changelog_rec_offset(flags & CLF_SUPPORTED,
+ changelog_rec_offset(clf_flags & CLF_SUPPORTED,
xflags & CLFE_SUPPORTED));
buf = lu_buf_check_and_alloc(&mdd_env_info(env)->mti_big_buf, reclen);
if (buf->lb_buf == NULL)
rec = buf->lb_buf;
rec->cr_hdr.lrh_len = reclen;
- rec->cr.cr_flags = flags;
+ rec->cr.cr_flags = clf_flags;
rec->cr.cr_type = (__u32)type;
rec->cr.cr_tfid = *fid;
rec->cr.cr_namelen = 0;
- if (flags & CLF_JOBID)
+ if (clf_flags & CLF_JOBID)
mdd_changelog_rec_ext_jobid(&rec->cr, uc->uc_jobid);
- if (flags & CLF_EXTRA_FLAGS) {
+ if (clf_flags & CLF_EXTRA_FLAGS) {
mdd_changelog_rec_ext_extra_flags(&rec->cr, xflags);
if (xflags & CLFE_UIDGID)
mdd_changelog_rec_extra_uidgid(&rec->cr,
if (xflags & CLFE_NID)
mdd_changelog_rec_extra_nid(&rec->cr, uc->uc_nid);
if (xflags & CLFE_OPEN)
- mdd_changelog_rec_extra_omode(&rec->cr, flags);
+ mdd_changelog_rec_extra_omode(&rec->cr, clf_flags);
if (xflags & CLFE_XATTR) {
if (xattr_name == NULL)
RETURN(-EINVAL);
* \param handle - transaction handle
*/
int mdd_changelog_data_store(const struct lu_env *env, struct mdd_device *mdd,
- enum changelog_rec_type type, int flags,
+ enum changelog_rec_type type,
+ enum changelog_rec_flags clf_flags,
struct mdd_object *mdd_obj, struct thandle *handle)
{
int rc;
RETURN(0);
}
- rc = mdd_changelog_data_store_by_fid(env, mdd, type, flags,
+ rc = mdd_changelog_data_store_by_fid(env, mdd, type, clf_flags,
mdo2fid(mdd_obj), NULL, handle);
if (rc == 0)
mdd_obj->mod_cltime = ktime_get();
int mdd_changelog_data_store_xattr(const struct lu_env *env,
struct mdd_device *mdd,
enum changelog_rec_type type,
- int flags, struct mdd_object *mdd_obj,
+ enum changelog_rec_flags clf_flags,
+ struct mdd_object *mdd_obj,
const char *xattr_name,
struct thandle *handle)
{
- int rc;
+ int rc;
LASSERT(mdd_obj != NULL);
LASSERT(handle != NULL);
RETURN(0);
}
- rc = mdd_changelog_data_store_by_fid(env, mdd, type, flags,
+ rc = mdd_changelog_data_store_by_fid(env, mdd, type, clf_flags,
mdo2fid(mdd_obj), xattr_name,
handle);
if (rc == 0)
RETURN(rc);
}
+/* only the bottom CLF_FLAGSHIFT bits of @flags are stored in the record,
+ * except for open flags have a dedicated record to store 32 bits of flags */
static int mdd_changelog(const struct lu_env *env, enum changelog_rec_type type,
- int flags, struct md_device *m, const struct lu_fid *fid)
+ enum changelog_rec_flags clf_flags,
+ struct md_device *m, const struct lu_fid *fid)
{
struct thandle *handle;
struct mdd_device *mdd = lu2mdd_dev(&m->md_lu_dev);
if (rc)
GOTO(stop, rc);
- rc = mdd_changelog_data_store_by_fid(env, mdd, type, flags,
+ rc = mdd_changelog_data_store_by_fid(env, mdd, type, clf_flags,
fid, NULL, handle);
stop:
/* The record type is the lowest non-masked set bit */
type = __ffs(bits);
- /* FYI we only store the first CLF_FLAGMASK bits of la_valid */
- return mdd_changelog_data_store(env, mdd, type, (int)valid,
+ /* XXX: we only store the low CLF_FLAGMASK bits of la_valid */
+ return mdd_changelog_data_store(env, mdd, type, valid,
md2mdd_obj(obj), handle);
}
static int mdd_hsm_update_locked(const struct lu_env *env,
struct md_object *obj,
const struct lu_buf *buf,
- struct thandle *handle, int *cl_flags)
+ struct thandle *handle,
+ enum changelog_rec_flags *clf_flags)
{
struct mdd_thread_info *info = mdd_env_info(env);
- struct mdd_object *mdd_obj = md2mdd_obj(obj);
- struct lu_buf *current_buf;
- struct md_hsm *current_mh;
- struct md_hsm *new_mh;
- int rc;
- ENTRY;
+ struct mdd_object *mdd_obj = md2mdd_obj(obj);
+ struct lu_buf *current_buf;
+ struct md_hsm *current_mh;
+ struct md_hsm *new_mh;
+ int rc;
+ ENTRY;
OBD_ALLOC_PTR(current_mh);
if (current_mh == NULL)
RETURN(-ENOMEM);
/* Flags differ, set flags for the changelog that will be added */
if (current_mh->mh_flags != new_mh->mh_flags) {
- hsm_set_cl_event(cl_flags, HE_STATE);
+ hsm_set_cl_event(clf_flags, HE_STATE);
if (new_mh->mh_flags & HS_DIRTY)
- hsm_set_cl_flags(cl_flags, CLF_HSM_DIRTY);
+ hsm_set_cl_flags(clf_flags, CLF_HSM_DIRTY);
}
OBD_FREE_PTR(new_mh);
const struct lu_buf *buf, const char *name,
int fl)
{
- struct mdd_object *mdd_obj = md2mdd_obj(obj);
- struct lu_attr *attr = MDD_ENV_VAR(env, cattr);
- struct mdd_device *mdd = mdo2mdd(obj);
- struct thandle *handle;
+ struct mdd_object *mdd_obj = md2mdd_obj(obj);
+ struct lu_attr *attr = MDD_ENV_VAR(env, cattr);
+ struct mdd_device *mdd = mdo2mdd(obj);
+ struct thandle *handle;
enum changelog_rec_type cl_type;
- int cl_flags = 0;
- int rc;
+ enum changelog_rec_flags clf_flags = 0;
+ int rc;
ENTRY;
rc = mdd_la_get(env, mdd_obj, attr);
mdd_write_lock(env, mdd_obj, MOR_TGT_CHILD);
if (strcmp(XATTR_NAME_HSM, name) == 0) {
- rc = mdd_hsm_update_locked(env, obj, buf, handle, &cl_flags);
+ rc = mdd_hsm_update_locked(env, obj, buf, handle, &clf_flags);
if (rc) {
mdd_write_unlock(env, mdd_obj);
GOTO(stop, rc);
if (cl_type < 0)
GOTO(stop, rc = 0);
- rc = mdd_changelog_data_store_xattr(env, mdd, cl_type, cl_flags,
+ rc = mdd_changelog_data_store_xattr(env, mdd, cl_type, clf_flags,
mdd_obj, name, handle);
EXIT;
struct thandle *handle)
{
struct hsm_attrs *attrs;
- __u32 hsm_flags;
- int flags = 0;
+ enum hsm_states hsm_flags;
+ enum changelog_rec_flags clf_flags = 0;
int rc;
ENTRY;
RETURN(0);
/* Add a changelog record for release. */
- hsm_set_cl_event(&flags, HE_RELEASE);
+ hsm_set_cl_event(&clf_flags, HE_RELEASE);
rc = mdd_changelog_data_store(env, mdo2mdd(&o->mod_obj), CL_HSM,
- flags, o, handle);
+ clf_flags, o, handle);
RETURN(rc);
}
}
}
+ /* FYI, only the bottom 32 bits of open_flags are recorded */
mdd_changelog(env, type, open_flags, md_dev, mdo2fid(mdd_obj));
EXIT;
GOTO(stop, rc);
}
+ /* FYI, only the bottom 32 bits of open_flags are recorded */
mdd_changelog_data_store(env, mdd, CL_CLOSE, open_flags,
- mdd_obj, handle);
+ mdd_obj, handle);
}
stop:
struct cdt_agent_req *car;
time64_t now = ktime_get_real_seconds();
time64_t last;
- int cl_flags;
+ enum changelog_rec_flags clf_flags;
int rc;
if (!hsd->hsd_housekeeping)
}
/* Emit a changelog record for the failed action.*/
- cl_flags = 0;
- hsm_set_cl_error(&cl_flags, ECANCELED);
+ clf_flags = 0;
+ hsm_set_cl_error(&clf_flags, ECANCELED);
switch (hai->hai_action) {
case HSMA_ARCHIVE:
- hsm_set_cl_event(&cl_flags, HE_ARCHIVE);
+ hsm_set_cl_event(&clf_flags, HE_ARCHIVE);
break;
case HSMA_RESTORE:
- hsm_set_cl_event(&cl_flags, HE_RESTORE);
+ hsm_set_cl_event(&clf_flags, HE_RESTORE);
break;
case HSMA_REMOVE:
- hsm_set_cl_event(&cl_flags, HE_REMOVE);
+ hsm_set_cl_event(&clf_flags, HE_REMOVE);
break;
case HSMA_CANCEL:
- hsm_set_cl_event(&cl_flags, HE_CANCEL);
+ hsm_set_cl_event(&clf_flags, HE_CANCEL);
break;
default:
/* Unknown record type, skip changelog. */
- cl_flags = 0;
+ clf_flags = 0;
break;
}
- if (cl_flags != 0)
- mo_changelog(env, CL_HSM, cl_flags, mdt->mdt_child,
+ if (clf_flags != 0)
+ mo_changelog(env, CL_HSM, clf_flags, mdt->mdt_child,
&hai->hai_fid);
if (hai->hai_action == HSMA_RESTORE)
const struct cdt_agent_req *car,
enum agent_req_status *status)
{
- const struct lu_env *env = mti->mti_env;
- struct mdt_device *mdt = mti->mti_mdt;
- struct coordinator *cdt = &mdt->mdt_coordinator;
- struct mdt_object *obj = NULL;
- int cl_flags = 0, rc = 0;
- struct md_hsm mh;
- bool is_mh_changed;
- bool need_changelog = true;
- ENTRY;
+ const struct lu_env *env = mti->mti_env;
+ struct mdt_device *mdt = mti->mti_mdt;
+ struct coordinator *cdt = &mdt->mdt_coordinator;
+ struct mdt_object *obj = NULL;
+ enum changelog_rec_flags clf_flags = 0;
+ struct md_hsm mh;
+ bool is_mh_changed;
+ bool need_changelog = true;
+ int rc = 0;
+ ENTRY;
/* default is to retry */
*status = ARS_WAITING;
mdt_obd_name(mdt),
pgs->hpk_cookie, PFID(&pgs->hpk_fid),
pgs->hpk_errval);
- hsm_set_cl_error(&cl_flags,
- CLF_HSM_ERROVERFLOW);
+ hsm_set_cl_error(&clf_flags, CLF_HSM_ERROVERFLOW);
rc = -EINVAL;
} else {
- hsm_set_cl_error(&cl_flags, pgs->hpk_errval);
+ hsm_set_cl_error(&clf_flags, pgs->hpk_errval);
}
switch (car->car_hai->hai_action) {
case HSMA_ARCHIVE:
- hsm_set_cl_event(&cl_flags, HE_ARCHIVE);
+ hsm_set_cl_event(&clf_flags, HE_ARCHIVE);
break;
case HSMA_RESTORE:
- hsm_set_cl_event(&cl_flags, HE_RESTORE);
+ hsm_set_cl_event(&clf_flags, HE_RESTORE);
break;
case HSMA_REMOVE:
- hsm_set_cl_event(&cl_flags, HE_REMOVE);
+ hsm_set_cl_event(&clf_flags, HE_REMOVE);
break;
case HSMA_CANCEL:
- hsm_set_cl_event(&cl_flags, HE_CANCEL);
+ hsm_set_cl_event(&clf_flags, HE_CANCEL);
CERROR("%s: Failed request %#llx on "DFID
" cannot be a CANCEL\n",
mdt_obd_name(mdt),
*status = ARS_SUCCEED;
switch (car->car_hai->hai_action) {
case HSMA_ARCHIVE:
- hsm_set_cl_event(&cl_flags, HE_ARCHIVE);
+ hsm_set_cl_event(&clf_flags, HE_ARCHIVE);
/* set ARCHIVE keep EXIST and clear LOST and
* DIRTY */
mh.mh_arch_ver = pgs->hpk_data_version;
is_mh_changed = true;
break;
case HSMA_RESTORE:
- hsm_set_cl_event(&cl_flags, HE_RESTORE);
+ hsm_set_cl_event(&clf_flags, HE_RESTORE);
/* do not clear RELEASED and DIRTY here
* this will occur in hsm_swap_layouts()
is_mh_changed = true;
break;
case HSMA_REMOVE:
- hsm_set_cl_event(&cl_flags, HE_REMOVE);
+ hsm_set_cl_event(&clf_flags, HE_REMOVE);
/* clear ARCHIVED EXISTS and LOST */
mh.mh_flags &= ~(HS_ARCHIVED | HS_EXISTS | HS_LOST);
is_mh_changed = true;
break;
case HSMA_CANCEL:
- hsm_set_cl_event(&cl_flags, HE_CANCEL);
+ hsm_set_cl_event(&clf_flags, HE_CANCEL);
CERROR("%s: Successful request %#llx on "DFID" cannot be a CANCEL\n",
mdt_obd_name(mdt),
pgs->hpk_cookie,
* filled
*/
if (rc == 0 && !IS_ERR(obj))
- hsm_set_cl_flags(&cl_flags,
+ hsm_set_cl_flags(&clf_flags,
mh.mh_flags & HS_DIRTY ? CLF_HSM_DIRTY : 0);
/* unlock is done later, after layout lock management */
/* restore special case, need to create ChangeLog record
* before to give back layout lock to avoid concurrent
* file updater to post out of order ChangeLog */
- mo_changelog(env, CL_HSM, cl_flags, mdt->mdt_child,
+ mo_changelog(env, CL_HSM, clf_flags, mdt->mdt_child,
&car->car_hai->hai_fid);
need_changelog = false;
out:
/* always add a ChangeLog record */
if (need_changelog)
- mo_changelog(env, CL_HSM, cl_flags, mdt->mdt_child,
+ mo_changelog(env, CL_HSM, clf_flags, mdt->mdt_child,
&car->car_hai->hai_fid);
if (!IS_ERR(obj))