Whamcloud - gitweb
LU-8661 libcfs: handle padata_alloc() rename
[fs/lustre-release.git] / lustre / lod / lproc_lod.c
index faa014c..06dd2ee 100644 (file)
@@ -23,7 +23,7 @@
  * Copyright  2008 Sun Microsystems, Inc. All rights reserved
  * Use is subject to license terms.
  *
- * Copyright (c) 2012, 2015, Intel Corporation.
+ * Copyright (c) 2012, 2016, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -35,7 +35,7 @@
 #include <obd_class.h>
 #include <linux/seq_file.h>
 #include "lod_internal.h"
-#include <lustre_param.h>
+#include <uapi/linux/lustre_param.h>
 
 /*
  * Notice, all the functions below (except for lod_procfs_init() and
@@ -542,9 +542,10 @@ lod_qos_maxage_seq_write(struct file *file, const char __user *buffer,
        lustre_cfg_bufs_reset(&bufs, NULL);
        snprintf(str, 32, "%smaxage=%u", PARAM_OSP, (__u32)val);
        lustre_cfg_bufs_set_string(&bufs, 1, str);
-       lcfg = lustre_cfg_new(LCFG_PARAM, &bufs);
+       OBD_ALLOC(lcfg, lustre_cfg_len(bufs.lcfg_bufcount, bufs.lcfg_buflen));
        if (lcfg == NULL)
                return -ENOMEM;
+       lustre_cfg_init(lcfg, LCFG_PARAM, &bufs);
 
        lod_getref(&lod->lod_ost_descs);
        lod_foreach_ost(lod, i) {
@@ -554,7 +555,7 @@ lod_qos_maxage_seq_write(struct file *file, const char __user *buffer,
                        CERROR("can't set maxage on #%d: %d\n", i, rc);
        }
        lod_putref(lod, &lod->lod_ost_descs);
-       lustre_cfg_free(lcfg);
+       OBD_FREE(lcfg, lustre_cfg_len(lcfg->lcfg_bufcount, lcfg->lcfg_buflens));
 
        return count;
 }
@@ -765,13 +766,13 @@ static struct lprocfs_vars lprocfs_lod_obd_vars[] = {
 };
 
 static struct lprocfs_vars lprocfs_lod_osd_vars[] = {
-       { "blocksize",          &lod_dt_blksize_fops            },
-       { "kbytestotal",        &lod_dt_kbytestotal_fops        },
-       { "kbytesfree",         &lod_dt_kbytesfree_fops         },
-       { "kbytesavail",        &lod_dt_kbytesavail_fops        },
-       { "filestotal",         &lod_dt_filestotal_fops         },
-       { "filesfree",          &lod_dt_filesfree_fops          },
-       { NULL }
+       { .name = "blocksize",   .fops = &lod_dt_blksize_fops },
+       { .name = "kbytestotal", .fops = &lod_dt_kbytestotal_fops },
+       { .name = "kbytesfree",  .fops = &lod_dt_kbytesfree_fops },
+       { .name = "kbytesavail", .fops = &lod_dt_kbytesavail_fops },
+       { .name = "filestotal",  .fops = &lod_dt_filestotal_fops },
+       { .name = "filesfree",   .fops = &lod_dt_filesfree_fops },
+       { .name = NULL }
 };
 
 static const struct file_operations lod_proc_target_fops = {