lkml.org 
[lkml]   [2017]   [Jan]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 35/60] staging: lustre: lov: ld_target could be NULL
    Date
    From: Bobi Jam <bobijam.xu@intel.com>

    lov_device::ld_target[ost_idx] could be NULL if the OST target is
    not filled in lov_device::ld_lov::lov_tgt_desc[ost_idx] yet.

    Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
    Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8018
    Reviewed-on: http://review.whamcloud.com/21411
    Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
    Reviewed-by: John L. Hammond <john.hammond@intel.com>
    Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
    Signed-off-by: James Simmons <jsimmons@infradead.org>
    ---
    drivers/staging/lustre/lustre/lov/lov_object.c | 7 +++++++
    1 file changed, 7 insertions(+)

    diff --git a/drivers/staging/lustre/lustre/lov/lov_object.c b/drivers/staging/lustre/lustre/lov/lov_object.c
    index 9c4b5ab..977579c 100644
    --- a/drivers/staging/lustre/lustre/lov/lov_object.c
    +++ b/drivers/staging/lustre/lustre/lov/lov_object.c
    @@ -266,6 +266,13 @@ static int lov_init_raid0(const struct lu_env *env, struct lov_device *dev,
    if (result != 0)
    goto out;

    + if (!dev->ld_target[ost_idx]) {
    + CERROR("%s: OST %04x is not initialized\n",
    + lov2obd(dev->ld_lov)->obd_name, ost_idx);
    + result = -EIO;
    + goto out;
    + }
    +
    subdev = lovsub2cl_dev(dev->ld_target[ost_idx]);
    subconf->u.coc_oinfo = oinfo;
    LASSERTF(subdev, "not init ost %d\n", ost_idx);
    --
    1.8.3.1
    \
     
     \ /
      Last update: 2017-01-29 01:17    [W:4.237 / U:0.036 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site