int ll_setattr_raw(struct inode *inode, struct iattr *attr)
{
struct lov_stripe_md *lsm = ll_i2info(inode)->lli_smd;
+ struct ll_inode_info *lli = ll_i2info(inode);
struct ll_sb_info *sbi = ll_i2sbi(inode);
struct ptlrpc_request *request = NULL;
struct mdc_op_data *op_data;
ldlm_policy_data_t policy = { .l_extent = {attr->ia_size,
OBD_OBJECT_EOF } };
struct lustre_handle lockh = { 0 };
- struct ll_inode_info *lli = ll_i2info(inode);
int err, ast_flags = 0;
/* XXX when we fix the AST intents to pass the discard-range
* XXX extent, make ast_flags always LDLM_AST_DISCARD_DATA
oa->o_gr = lsm->lsm_object_gr;
oa->o_valid = OBD_MD_FLID | OBD_MD_FLGROUP;
+ /* adding uid and gid, needed for quota */
if (ia_valid & ATTR_UID) {
oa->o_uid = inode->i_uid;
oa->o_valid |= OBD_MD_FLUID;
oa->o_valid |= OBD_MD_FLGID;
}
+ /* putting there also fid, needed for quota too. */
+ memcpy(obdo_id(oa), &lli->lli_id, sizeof(lli->lli_id));
+ oa->o_valid |= OBD_MD_FLINLINE;
+
obdo_from_inode(oa, inode, OBD_MD_FLTYPE | OBD_MD_FLATIME |
OBD_MD_FLMTIME | OBD_MD_FLCTIME);
rc = obd_setattr(sbi->ll_dt_exp, oa, lsm, NULL);
oa->o_gid = inode->i_gid;
oa->o_valid |= OBD_MD_FLGID;
+
+ /* putting there also fid, needed for quota too. */
+ memcpy(obdo_id(oa), &lli->lli_id, sizeof(lli->lli_id));
+ oa->o_valid |= OBD_MD_FLINLINE;
rc = obd_brw(OBD_BRW_CHECK, ll_i2dtexp(inode),
oa, lsm, 1, &pga, NULL);
OBD_MD_FLATIME | OBD_MD_FLMTIME |
OBD_MD_FLCTIME | OBD_MD_FLFLAGS |
OBD_MD_FLSIZE | OBD_MD_FLGROUP |
- OBD_MD_FLUID | OBD_MD_FLGID)));
+ OBD_MD_FLUID | OBD_MD_FLGID |
+ OBD_MD_FLINLINE)));
LASSERT(!(src_oa->o_valid & OBD_MD_FLGROUP) || src_oa->o_gr > 0);
LPU64"/"LPU64" err = %d\n", oid,
ogr, (int)PTR_ERR(dentry));
RETURN(dentry);
+ } else {
+ /* XXX: here should be storing fid from client into OSS object
+ * EA to use it for quota later. --umka */
}
RETURN(dentry);