lkml.org 
[lkml]   [2013]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 18/39] staging/lustre/llite: Delaying creation of client side proc entries.
    Date
    From: Gaurav Mahajan <gmahajan@ddn.com>

    In client_common_fill_super() proc entries are created before
    before cl_sb_init() and therefore lu_site is not allocated resulting
    in client crash when tried reading lu_site stats.
    Delaying creation of proc entries after creation of all required data
    structures fixed the problem.

    Lustre-change: http://review.whamcloud.com/6852
    Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2941
    Signed-off-by: Gaurav Mahajan <gmahajan@ddn.com>
    Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
    Reviewed-by: Emoly Liu <emoly.liu@intel.com>
    Signed-off-by: Peng Tao <bergwolf@gmail.com>
    Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
    ---
    drivers/staging/lustre/lustre/llite/llite_lib.c | 17 +++++++++--------
    1 file changed, 9 insertions(+), 8 deletions(-)

    diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c b/drivers/staging/lustre/lustre/llite/llite_lib.c
    index 18e3db2..a64808c 100644
    --- a/drivers/staging/lustre/lustre/llite/llite_lib.c
    +++ b/drivers/staging/lustre/lustre/llite/llite_lib.c
    @@ -186,13 +186,6 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt,
    return -ENOMEM;
    }

    - if (proc_lustre_fs_root) {
    - err = lprocfs_register_mountpoint(proc_lustre_fs_root, sb,
    - dt, md);
    - if (err < 0)
    - CERROR("could not register mount in /proc/fs/lustre\n");
    - }
    -
    /* indicate the features supported by this client */
    data->ocd_connect_flags = OBD_CONNECT_IBITS | OBD_CONNECT_NODEVOH |
    OBD_CONNECT_ATTRFID |
    @@ -590,6 +583,15 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt,
    OBD_FREE_PTR(data);
    if (osfs != NULL)
    OBD_FREE_PTR(osfs);
    + if (proc_lustre_fs_root != NULL) {
    + err = lprocfs_register_mountpoint(proc_lustre_fs_root, sb,
    + dt, md);
    + if (err < 0) {
    + CERROR("%s: could not register mount in lprocfs: "
    + "rc = %d\n", ll_get_fsname(sb, NULL, 0), err);
    + err = 0;
    + }
    + }

    return err;
    out_root:
    @@ -612,7 +614,6 @@ out:
    OBD_FREE_PTR(data);
    if (osfs != NULL)
    OBD_FREE_PTR(osfs);
    - lprocfs_unregister_mountpoint(sbi);
    return err;
    }

    --
    1.7.9.5


    \
     
     \ /
      Last update: 2013-11-14 19:01    [W:4.260 / U:0.024 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site