Whamcloud - gitweb
LU-8066 obdclass: Get rid of remaining /proc/sys/lustre plumbing
[fs/lustre-release.git] / lustre / lod / lproc_lod.c
index 389ac3f..0c4a391 100644 (file)
  *
  * You should have received a copy of the GNU General Public License
  * version 2 along with this program; If not, see
- * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * http://www.gnu.org/licenses/gpl-2.0.html
  *
  * GPL HEADER END
  */
@@ -27,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/
@@ -65,7 +61,7 @@ static int lod_stripesize_seq_show(struct seq_file *m, void *v)
 
        LASSERT(dev != NULL);
        lod  = lu2lod_dev(dev->obd_lu_dev);
-       seq_printf(m, LPU64"\n",
+       seq_printf(m, "%llu\n",
                   lod->lod_desc.ld_default_stripe_size);
        return 0;
 }
@@ -95,7 +91,7 @@ lod_stripesize_seq_write(struct file *file, const char __user *buffer,
 
        LASSERT(dev != NULL);
        lod  = lu2lod_dev(dev->obd_lu_dev);
-       rc = lprocfs_str_to_s64(buffer, count, &val);
+       rc = lprocfs_str_with_units_to_s64(buffer, count, &val, '1');
        if (rc)
                return rc;
        if (val < 0)
@@ -124,7 +120,7 @@ static int lod_stripeoffset_seq_show(struct seq_file *m, void *v)
 
        LASSERT(dev != NULL);
        lod  = lu2lod_dev(dev->obd_lu_dev);
-       seq_printf(m, LPU64"\n",
+       seq_printf(m, "%llu\n",
                   lod->lod_desc.ld_default_stripe_offset);
        return 0;
 }
@@ -155,7 +151,7 @@ lod_stripeoffset_seq_write(struct file *file, const char __user *buffer,
 
        LASSERT(dev != NULL);
        lod  = lu2lod_dev(dev->obd_lu_dev);
-       rc = lprocfs_str_to_s64(buffer, count, &val);
+       rc = lprocfs_str_with_units_to_s64(buffer, count, &val, '1');
        if (rc)
                return rc;
        if (val < 0)
@@ -769,13 +765,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 = {