verify = 1;
}
- fid_zero(&oic->oic_fid);
-
/*
* Objects are created as locking anchors or place holders for objects
* yet to be created. No need to osd_oi_lookup() at here because FID
if (IS_ERR(inode)) {
result = PTR_ERR(inode);
if (result == -ENOENT || result == -ESTALE) {
+ fid_zero(&oic->oic_fid);
result = 0;
} else if (result == -EREMCHG) {
const struct lu_buf *buf, const char *name,
int fl, struct thandle *handle)
{
- struct osd_thandle *oh;
-
- LASSERT(handle != NULL);
+ struct osd_thandle *oh;
- if (strcmp(name, XATTR_NAME_VERSION) == 0) {
- /* no credits for version */
- return 0;
- }
+ LASSERT(handle != NULL);
- oh = container_of0(handle, struct osd_thandle, ot_super);
- LASSERT(oh->ot_handle == NULL);
+ oh = container_of0(handle, struct osd_thandle, ot_super);
+ LASSERT(oh->ot_handle == NULL);
- OSD_DECLARE_OP(oh, xattr_set);
- oh->ot_credits += osd_dto_credits_noquota[DTO_XATTR_SET];
+ OSD_DECLARE_OP(oh, xattr_set);
+ if (strcmp(name, XATTR_NAME_VERSION) == 0)
+ oh->ot_credits += osd_dto_credits_noquota[DTO_ATTR_SET_BASE];
+ else
+ oh->ot_credits += osd_dto_credits_noquota[DTO_XATTR_SET];
- return 0;
+ return 0;
}
/*
return result;
result = iam_container_setup(bag);
- if (result != 0)
- goto out;
-
- if (osd_obj2dev(obj)->od_iop_mode) {
- u32 ptr = bag->ic_descr->id_ops->id_root_ptr(bag);
-
- bag->ic_root_bh = ldiskfs_bread(NULL, obj->oo_inode,
- ptr, 0, &result);
- }
-
- out:
if (result == 0)
obj->oo_dt.do_index_ops = &osd_index_iam_ops;
else
rc = osd_ea_fid_get(env, obj, ino, fid, &oic->oic_lid);
else
osd_id_gen(&oic->oic_lid, ino, OSD_OII_NOGEN);
-
- if (rc != 0 || !fid_is_norm(fid))
+ if (rc != 0 || !fid_is_norm(fid)) {
+ fid_zero(&oic->oic_fid);
GOTO(out, rc);
+ }
oic->oic_fid = *fid;
if ((scrub->os_pos_current <= ino) &&
it->oie_dirent->oied_name,
it->oie_dirent->oied_namelen,
it->oie_dirent->oied_type, attr);
-
- if (!fid_is_norm(fid))
+ if (!fid_is_norm(fid)) {
+ fid_zero(&oic->oic_fid);
RETURN(0);
+ }
oic->oic_fid = *fid;
if ((scrub->os_pos_current <= ino) &&