- inode = de->d_inode;
- CDEBUG(D_INODE, "ino %ld\n", inode->i_ino);
-
- /* a _really_ horrible hack to avoid removing the data stored
- in the block pointers; this data is the object id
- this will go into an extended attribute at some point.
- */
- if ( rec->ur_iattr.ia_valid & ATTR_SIZE ) {
- /* ATTR_SIZE would invoke truncate: clear it */
- rec->ur_iattr.ia_valid &= ~ATTR_SIZE;
- inode->i_size = rec->ur_iattr.ia_size;
-
- /* an _even_more_ horrible hack to make this hack work with
- * ext3. This is because ext3 keeps a separate inode size
- * until the inode is committed to ensure consistency. This
- * will also go away with the move to EAs.
- */
- if (!strcmp(inode->i_sb->s_type->name, "ext3"))
- inode->u.ext3_i.i_disksize = inode->i_size;
-
- /* make sure _something_ gets set - so new inode
- goes to disk (probably won't work over XFS */
- if (!rec->ur_iattr.ia_valid & ATTR_MODE) {
- rec->ur_iattr.ia_valid |= ATTR_MODE;
- rec->ur_iattr.ia_mode = inode->i_mode;
- }
- }
- OBD_FAIL_WRITE(OBD_FAIL_MDS_REINT_SETATTR_WRITE);
- if ( inode->i_op->setattr ) {
- req->rq_rephdr->status =
- inode->i_op->setattr(de, &rec->ur_iattr);
- } else {
- req->rq_rephdr->status =
- inode_setattr(inode, &rec->ur_iattr);
- }