* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2012, Intel Corporation.
+ * Copyright (c) 2012, 2013, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
struct obd_device *obd = data;
struct osp_device *osp = lu2osp_dev(obd->obd_lu_dev);
- if (osp == NULL)
+ if (osp == NULL || osp->opd_pre == NULL)
return 0;
return snprintf(page, count, "%d\n", osp->opd_pre_grow_count);
struct osp_device *osp = lu2osp_dev(obd->obd_lu_dev);
int val, rc, i;
- if (osp == NULL)
+ if (osp == NULL || osp->opd_pre == NULL)
return 0;
rc = lprocfs_write_helper(buffer, count, &val);
struct obd_device *obd = data;
struct osp_device *osp = lu2osp_dev(obd->obd_lu_dev);
- if (osp == NULL)
+ if (osp == NULL || osp->opd_pre == NULL)
return 0;
return snprintf(page, count, "%d\n", osp->opd_pre_max_grow_count);
struct osp_device *osp = lu2osp_dev(obd->obd_lu_dev);
int val, rc;
- if (osp == NULL)
+ if (osp == NULL || osp->opd_pre == NULL)
return 0;
rc = lprocfs_write_helper(buffer, count, &val);
struct obd_device *obd = data;
struct osp_device *osp = lu2osp_dev(obd->obd_lu_dev);
- if (osp == NULL)
+ if (osp == NULL || osp->opd_pre == NULL)
return 0;
return snprintf(page, count, "%u\n",
struct obd_device *obd = data;
struct osp_device *osp = lu2osp_dev(obd->obd_lu_dev);
- if (osp == NULL)
+ if (osp == NULL || osp->opd_pre == NULL)
return 0;
return snprintf(page, count, "%u\n",
struct obd_device *obd = data;
struct osp_device *osp = lu2osp_dev(obd->obd_lu_dev);
- if (osp == NULL)
+ if (osp == NULL || osp->opd_pre == NULL)
return 0;
return snprintf(page, count, LPX64"\n",
struct obd_device *obd = data;
struct osp_device *osp = lu2osp_dev(obd->obd_lu_dev);
- if (osp == NULL)
+ if (osp == NULL || osp->opd_pre == NULL)
return 0;
return snprintf(page, count, LPX64"\n",
struct obd_device *obd = data;
struct osp_device *osp = lu2osp_dev(obd->obd_lu_dev);
- if (osp == NULL)
+ if (osp == NULL || osp->opd_pre == NULL)
return 0;
return snprintf(page, count, LPU64"\n", osp->opd_pre_reserved);
struct osp_device *osp = lu2osp_dev(dev->obd_lu_dev);
int rc;
- if (osp == NULL)
+ if (osp == NULL || osp->opd_pre == NULL)
return -EINVAL;
rc = snprintf(page, count, "%d\n", osp->opd_pre_status);
struct obd_device *dev = data;
struct osp_device *osp = lu2osp_dev(dev->obd_lu_dev);
+ if (osp == NULL)
+ return -EINVAL;
+
/*
* This counter used to determine if OST has space returned.
* Now we need to wait for the following:
};
static struct lprocfs_vars lprocfs_osp_osd_vars[] = {
- { "blocksize", lprocfs_osd_rd_blksize, 0, 0 },
- { "kbytestotal", lprocfs_osd_rd_kbytestotal, 0, 0 },
- { "kbytesfree", lprocfs_osd_rd_kbytesfree, 0, 0 },
- { "kbytesavail", lprocfs_osd_rd_kbytesavail, 0, 0 },
- { "filestotal", lprocfs_osd_rd_filestotal, 0, 0 },
- { "filesfree", lprocfs_osd_rd_filesfree, 0, 0 },
+ { "blocksize", lprocfs_dt_rd_blksize, 0, 0 },
+ { "kbytestotal", lprocfs_dt_rd_kbytestotal, 0, 0 },
+ { "kbytesfree", lprocfs_dt_rd_kbytesfree, 0, 0 },
+ { "kbytesavail", lprocfs_dt_rd_kbytesavail, 0, 0 },
+ { "filestotal", lprocfs_dt_rd_filestotal, 0, 0 },
+ { "filesfree", lprocfs_dt_rd_filesfree, 0, 0 },
{ 0 }
};