From: phil Date: Wed, 5 Nov 2003 00:47:41 +0000 (+0000) Subject: b=1028 X-Git-Tag: v1_7_0_51~2^9~198 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=9563a265b4a1ac548ceb4efcae6e66c8e32acb58;p=fs%2Flustre-release.git b=1028 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. --- diff --git a/lustre/obdfilter/filter_io_24.c b/lustre/obdfilter/filter_io_24.c index 8d532dc..90f6135 100644 --- a/lustre/obdfilter/filter_io_24.c +++ b/lustre/obdfilter/filter_io_24.c @@ -230,11 +230,8 @@ int filter_commitrw_write(struct obd_export *exp, struct obdo *oa, int objcount, 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);