Whamcloud - gitweb
LU-8048 mgc: use the same lu_env for mgc_fs_{set,clean}up 92/19692/2
authorFan Yong <fan.yong@intel.com>
Sun, 3 Apr 2016 13:10:48 +0000 (21:10 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 11 May 2016 16:36:45 +0000 (16:36 +0000)
commiteaab0922aaaec6d68a2c8121220eb5ca21f186d3
tree6e193c08271ea6cdd0334a6b3e5a6958fd744782
parent34dada1c3e59b2ed3debd4c46347c1352dd958d0
LU-8048 mgc: use the same lu_env for mgc_fs_{set,clean}up

Originally, the mgc_fs_setup() and mgc_fs_cleanup use each own
lu_env. Sometimes the mgc_fs_cleanup() may fail to prepare the
lu_env. Such failure will cause local_oid_storage_fini() to be
skipped as to object leak found when osd_device_free().

This patch prepares the lu_env before calling mgs_fs_setup(),
then mgc_fs_setup() and mgc_fs_cleanup() can share the lu_env
and no need to worry about the failures in mgc_fs_cleanup().

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I7062abd670c53e93f456a8d8f1f6131d7ee92320
Reviewed-on: http://review.whamcloud.com/19692
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/mgc/mgc_request.c
lustre/obdclass/obd_mount_server.c