code during mount error handling, returning success instead
of an error.
+Severity : minor
+Bugzilla : 6266
+Frequency : rare (liblustre)
+Description: fsx running with liblustre complained that using truncate() to
+ extend the file doesn't work. This patch corrects that issue.
+Details : This is the liblustre equivalent of the fix for bug 6196. Fixes
+ ATTR_SIZE and lsm use in llu_setattr_raw.
+
------------------------------------------------------------------------------
2005-07-07 Cluster File Systems, Inc. <info@clusterfs.com>
RETURN(rc);
}
- /* We call inode_setattr to adjust timestamps, but we first
- * clear ATTR_SIZE to avoid invoking vmtruncate.
- *
- * NB: ATTR_SIZE will only be set at this point if the size
- * resides on the MDS, ie, this file has no objects. */
- attr->ia_valid &= ~ATTR_SIZE;
+ /* We call inode_setattr to adjust timestamps.
+ * If there is at least some data in file, we cleared ATTR_SIZE
+ * above to avoid invoking vmtruncate, otherwise it is important
+ * to call vmtruncate in inode_setattr to update inode->i_size
+ * (bug 6196) */
inode_setattr(inode, attr);
llu_update_inode(inode, md.body, md.lsm);
ptlrpc_req_finished(request);
- if (!md.lsm || !S_ISREG(st->st_mode)) {
+ if (!lsm || !S_ISREG(st->st_mode)) {
CDEBUG(D_INODE, "no lsm: not setting attrs on OST\n");
RETURN(0);
}