diff options
author | Bobi Jam <bobijam.xu@intel.com> | 2014-02-09 02:51:45 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-02-11 12:09:57 -0800 |
commit | f34b6cd3ee6c3cd80ce6ccfb1be203145718807f (patch) | |
tree | 88f56d28d1ad8a7341027c6f38d7cf16aadd5972 /drivers/staging/lustre/lustre/lov/lovsub_dev.c | |
parent | 7ca363f6872bede71e486352885de3a88f4a3967 (diff) |
lustre/lov: avoid subobj's coh_parent race
* during a file lov object initialization, we need protect the access
and change of its subobj->coh_parent, since it could be another
layout change race there, which makes an unreferenced lovsub obj in
the site object hash table.
* dump lovsub objects in the site if the lovsub device reference > 0
during its finalization phase.
Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Reviewed-on: http://review.whamcloud.com/6105
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-1480
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lustre/lov/lovsub_dev.c')
-rw-r--r-- | drivers/staging/lustre/lustre/lov/lovsub_dev.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/staging/lustre/lustre/lov/lovsub_dev.c b/drivers/staging/lustre/lustre/lov/lovsub_dev.c index 998ea1cbc7bb..926c35a25ceb 100644 --- a/drivers/staging/lustre/lustre/lov/lovsub_dev.c +++ b/drivers/staging/lustre/lustre/lov/lovsub_dev.c @@ -131,6 +131,10 @@ static struct lu_device *lovsub_device_free(const struct lu_env *env, struct lovsub_device *lsd = lu2lovsub_dev(d); struct lu_device *next = cl2lu_dev(lsd->acid_next); + if (atomic_read(&d->ld_ref) && d->ld_site) { + LIBCFS_DEBUG_MSG_DATA_DECL(msgdata, D_ERROR, NULL); + lu_site_print(env, d->ld_site, &msgdata, lu_cdebug_printer); + } cl_device_fini(lu2cl_dev(d)); OBD_FREE_PTR(lsd); return next; |