Whamcloud - gitweb
b=1028
authorphil <phil>
Wed, 5 Nov 2003 00:00:03 +0000 (00:00 +0000)
committerphil <phil>
Wed, 5 Nov 2003 00:00:03 +0000 (00:00 +0000)
r=zab
Return the object's block count from write requests, and store it in
the client inode.

lustre/llite/rw24.c

index 8f84e67..770d8a8 100644 (file)
@@ -190,8 +190,10 @@ static int ll_direct_IO_24(int rw, struct inode *inode, struct kiobuf *iobuf,
                         CERROR("error from callback: rc = %d\n", rc);
         }
         ptlrpc_set_destroy(set);
-        if (rc == 0)
+        if (rc == 0) {
                 rc = iobuf->length;
+                obdo_to_inode(inode, &oa, OBD_MD_FLBLOCKS);
+        }
 
         OBD_FREE(pga, sizeof(*pga) * iobuf->nr_pages);
         RETURN(rc);