Whamcloud - gitweb
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>