Whamcloud - gitweb
LU-3467 target: generic hpreq handler in target
[fs/lustre-release.git] / lustre / osp / lproc_osp.c
index b84b453..22e3372 100644 (file)
@@ -27,7 +27,7 @@
  * 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/
@@ -402,6 +402,9 @@ static int osp_rd_destroys_in_flight(char *page, char **start, off_t off,
        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:
@@ -462,12 +465,12 @@ static struct lprocfs_vars lprocfs_osp_obd_vars[] = {
 };
 
 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 }
 };