Whamcloud - gitweb
LU-9049 obdclass: change object lookup to no wait mode 65/26965/9
authorLai Siyao <lai.siyao@intel.com>
Tue, 23 May 2017 07:56:06 +0000 (15:56 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 22 Jun 2017 02:55:22 +0000 (02:55 +0000)
commitfa14bdf6b648d1d4023a4fa88789059d185f4a07
treea5c126d9858c28b0e3731b025f1254eeb186d8f6
parentca41d88d9228e469a8728c20c21c7e919b77dc12
LU-9049 obdclass: change object lookup to no wait mode

Currently we set LU_OBJECT_HEARD_BANSHEE on object when we want
to remove object from cache, but this may lead to deadlock, because
when other process lookup such object, it needs to wait for this
object until release (done at last refcount put), while that process
maybe already hold an LDLM lock.

Now that current code can handle dying object correctly, we can just
return such object in lookup, thus the above deadlock can be avoided.

There is another case we need to make some changes:
objects created in OUT doesn't set dt_body_ops for LOD layer because
originally it's set by lod_create(), change to set dt_body_ops in
lod_object_init() so objects created in OUT is no different from
those created in MDT. To achieve this, functions in lod_body_ops
should check file type inside to avoid misuse.

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: Ia31ab5f09f9bf80a9aa8fd7e7b60348b02400b25
Reviewed-on: https://review.whamcloud.com/26965
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Cliff White <cliff.white@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/include/lu_object.h
lustre/lfsck/lfsck_internal.h
lustre/lfsck/lfsck_layout.c
lustre/lfsck/lfsck_striped_dir.c
lustre/lod/lod_internal.h
lustre/lod/lod_object.c
lustre/obdclass/lu_object.c
lustre/target/out_handler.c