+int llu_sizeonmds_update(struct inode *inode, struct md_open_data *mod,
+ struct lustre_handle *fh, __u64 ioepoch)
+{
+ struct llu_inode_info *lli = llu_i2info(inode);
+ struct llu_sb_info *sbi = llu_i2sbi(inode);
+ struct md_op_data op_data = {{ 0 }};
+ struct obdo oa;
+ int rc;
+ ENTRY;
+
+ LASSERT(!(lli->lli_flags & LLIF_MDS_SIZE_LOCK));
+ LASSERT(sbi->ll_lco.lco_flags & OBD_CONNECT_SOM);
+
+ rc = llu_inode_getattr(inode, &oa);
+ if (rc == -ENOENT) {
+ oa.o_valid = 0;
+ CDEBUG(D_INODE, "objid "LPX64" is already destroyed\n",
+ lli->lli_smd->lsm_object_id);
+ } else if (rc) {
+ CERROR("inode_getattr failed (%d): unable to send a "
+ "Size-on-MDS attribute update for inode %llu/%lu\n",
+ rc, (long long)llu_i2stat(inode)->st_ino,
+ lli->lli_st_generation);
+ RETURN(rc);
+ }
+
+ md_from_obdo(&op_data, &oa, oa.o_valid);
+ memcpy(&op_data.op_handle, fh, sizeof(*fh));
+ op_data.op_ioepoch = ioepoch;
+ op_data.op_flags |= MF_SOM_CHANGE;
+
+ rc = llu_md_setattr(inode, &op_data, &mod);
+ RETURN(rc);
+}
+
+int llu_md_close(struct obd_export *md_exp, struct inode *inode)