Whamcloud - gitweb
LU-3182 lmv: fix duplicate directory entries
authorNed Bass <bass6@llnl.gov>
Wed, 17 Apr 2013 00:58:02 +0000 (17:58 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 1 May 2013 04:58:37 +0000 (00:58 -0400)
commit4e57f6dd3a156e35ccb587fc5c003805dd73ecb7
tree7769ca7588af982f2b2ee3d5c1061d5057ff4bb6
parentbee35dd415cf51ad784e69eb91a5fbe02b7c0d70
LU-3182 lmv: fix duplicate directory entries

lmv_readpage() fails to overwrite the ldp_hash_end and ldp_flags of
the first lu_dirpage in a CFS_PAGE with the values from the last
lu_dirpage. This causes duplicate directory entries to be returned
from readdir() for sufficiently large directories.  This is only
an issue on platforms where CFS_PAGE_SIZE > LU_PAGE_SIZE, i.e. PPC.

* Fix the regression introduced in commit 5e91e5b, which was the
  apparently accidental removal of these lines from lmv_readpage():

-                        hash_end = dp->ldp_hash_end;
-                        flags = dp->ldp_flags;

* Refactor the lmv_readpage() function and add some comments.

Signed-off-by: Ned Bass <bass6@llnl.gov>
Change-Id: I04e9a98b90216a7da7ce9d9325080d6b6c4010c7
Reviewed-on: http://review.whamcloud.com/6071
Tested-by: Hudson
Reviewed-by: wangdi <di.wang@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/llite/dir.c
lustre/lmv/lmv_obd.c