more information, please refer to bugzilla 17630.
Severity : normal
+Bugzilla : 20146
+Description: Do not update ctime for the deleted inode.
+Details : Check in mds_reint_unlink() before calling fsfilt_setattr().
+
+Severity : normal
Bugzilla : 14951
Description: Improved cleanup procedure for conf-sanity test_46a.
struct iattr iattr;
int err;
- /* update ctime of unlinked file, even if last link is
- removed because open-unlinked file can be statted */
- iattr.ia_valid = ATTR_CTIME;
- LTIME_S(iattr.ia_ctime) = rec->ur_time;
- err = fsfilt_setattr(obd, dchild, handle, &iattr, 0);
- if (err)
- CERROR("error on unlinked inode time update: "
- "rc = %d\n", err);
+ if (child_inode->i_nlink > 0 ||
+ mds_orphan_open_count(child_inode) > 0) {
+ /* update ctime of unlinked file only if it is still
+ * opened or a link still exists */
+ iattr.ia_valid = ATTR_CTIME;
+ LTIME_S(iattr.ia_ctime) = rec->ur_time;
+ err = fsfilt_setattr(obd, dchild, handle, &iattr, 0);
+ if (err)
+ CERROR("error on unlinked inode time update: "
+ "rc = %d\n", err);
+ }
/* update mtime and ctime of parent directory*/
iattr.ia_valid = ATTR_MTIME | ATTR_CTIME;