Whamcloud - gitweb
LU-2193 ofd: look up FID to destroy before locking
authorAndreas Dilger <adilger@whamcloud.com>
Tue, 16 Oct 2012 05:15:17 +0000 (23:15 -0600)
committerOleg Drokin <green@whamcloud.com>
Wed, 17 Oct 2012 01:26:04 +0000 (21:26 -0400)
commit75ad0b753f483f219234b3699567ed4cdc977f6d
tree618672f0ecd16732a49cfa9e39e5570661c926b0
parent7186c88d389c236f5fe887e3c7f35f2249f8aa86
LU-2193 ofd: look up FID to destroy before locking

If the MDS is replaying object destroys after recovery, then it may
be trying to destroy non-existent objects.  This can provoke spurious
errors in lvbo_init() due to the inability to populate the lock LVB.
Rather than quiet the useful error message from lvbo_init(), instead
do the object lookup on the to-be-destroyed FID first.  If lookup
fails to find an object, skip the object locking entirely since it
isn't needed and would just flood the console after recovery.

During destroy RPCs from the MDS, the ELC buffer is always empty, so
short-circuit the initial lock cancellation attempt that is useless.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Id6197f23773ea271e0cb0912b19585b3df500c1e
Reviewed-on: http://review.whamcloud.com/4276
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/ldlm/ldlm_lockd.c
lustre/ofd/ofd_obd.c