* 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/
#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
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) {
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;
}
};
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 = {