Whamcloud - gitweb
LU-3182 lmv: fix duplicate directory entries 05/6405/4
authorNed Bass <bass6@llnl.gov>
Tue, 21 May 2013 01:50:47 +0000 (18:50 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 10 Jul 2013 02:07:52 +0000 (02:07 +0000)
commitad83b289c4b0b24ec5edb6d6677ef9ba7403464b
tree065b3968e7f1ba9da040df4f85b804e199413c17
parent462dda94432b0179835ac7f8e2eabb0ccc83adcc
LU-3182 lmv: fix duplicate directory entries

In 4e57f6dd3a156e35ccb587fc5c003805dd73ecb7, I accidentally
introduced a new way for duplicate directory entries to be returned
from readdir().  That patch fails to properly decrement the nlupgs
counter when breaking out of the inner-for loop.  This accounting
error causes an extra iteration of the inner-for loop when processing
the next cfs page and a bad ldp_hash_end value is then saved in the
lu_dirpage.  To fix this, always decrement the nlupgs counter on
entry into the inner loop.

Note: this bug only affects architectures with > 4k-sized pages, e.g.
PowerPC.

Signed-off-by: Ned Bass <bass6@llnl.gov>
Change-Id: I9fa0fd8f34081f834f1d8b4df633d6e08926dcc9
Reviewed-on: http://review.whamcloud.com/6405
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
lustre/lmv/lmv_obd.c
lustre/tests/sanity.sh