Whamcloud - gitweb
b=1028
authorphil <phil>
Wed, 5 Nov 2003 00:47:41 +0000 (00:47 +0000)
committerphil <phil>
Wed, 5 Nov 2003 00:47:41 +0000 (00:47 +0000)
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.

lustre/obdfilter/filter_io_24.c

index 8d532dc..90f6135 100644 (file)
@@ -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);