Andreas pointed out that we already have a function obdo_from_inode,
and that we might as well pack all valid fields, and let the client
take what it can.
rc = filter_direct_io(OBD_BRW_WRITE, res->dentry, iobuf, exp, &iattr,
oti, &wait_handle);
- if (rc == 0) {
- oa->o_size = inode->i_size;
- oa->o_blocks = inode->i_blocks;
- oa->o_valid |= OBD_MD_FLSIZE | OBD_MD_FLBLOCKS;
- }
+ if (rc == 0)
+ obdo_from_inode(oa, inode, FILTER_VALID_FLAGS);
if (time_after(jiffies, now + 15 * HZ))
CERROR("slow direct_io %lus\n", (jiffies - now) / HZ);