Whamcloud - gitweb
LU-2638 ldiskfs: update dotdot entry for rename
authorFan Yong <yong.fan@whamcloud.com>
Thu, 10 Jan 2013 13:32:57 +0000 (21:32 +0800)
committerOleg Drokin <green@whamcloud.com>
Wed, 30 Jan 2013 22:07:21 +0000 (17:07 -0500)
commit0f3e9eec19548e3fe9452ddd603810ff41aa1588
tree310286afb4b7afcfe47a8e43fdbe0d62d168974a
parent85a5da01636b97081088b94dd8c2e0320f5ac68c
LU-2638 ldiskfs: update dotdot entry for rename

On master, when rename a directory, its old dotdot entry will
be removed firstly, then insert the new dotdot entry, and try
to append FID-in-dirent. But the space for dotdot entry maybe
not enough to hold the new dotdot with FID-in-dirent, such as
the MDT device restored from file-level backup, or the device
is upgraded from 1.8. If we do not move data in the directory
block, the FID-in-dirent will overwrite the dx_root and cause
the directory crashed. Currently, we do not want to introduce
complex logic to handle directory data moving, instead, under
such case, ignore the FID-in-dirent for the new dotdot entry,
and just insert the new dotdot entry.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Id38f5136fb2bc607344c37ca10a32e63ab427e3d
Reviewed-on: http://review.whamcloud.com/5179
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
ldiskfs/kernel_patches/patches/ext4_data_in_dirent-rhel6.patch