ldiskfs_init_new_dir() doesn't mark the inode
dirty, so i_size isn't transferred when ./..
are being inserted.
Change-Id: I1a80a80f6646984fbdec03d65579e735f6fac7c5
Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-on: http://review.whamcloud.com/14772
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
dir->oo_compat_dotdot_created = 1;
}
+ /* ldiskfs_init_new_dir() doesn't call ldiskfs_mark_inode_dirty()
+ * this seem as an optimization as usually it's called
+ * later to refresh mtime of the parent. Lustre does not
+ * update mtime in few cases (e.g. PENDING, .lustre)
+ * we still need to transfer i_size/etc to the buffer cache */
+ ldiskfs_mark_inode_dirty(oth->ot_handle, dir->oo_inode);
+
return result;
}