Whamcloud - gitweb
b=18696
[fs/lustre-release.git] / lustre / obdclass / linux / linux-sysctl.c
index 6a1e4c0..8ef676d 100644 (file)
@@ -16,8 +16,8 @@
  * in the LICENSE file that accompanied this code).
  *
  * You should have received a copy of the GNU General Public License
- * version 2 along with this program; If not, see [sun.com URL with a
- * copy of GPLv2].
+ * 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
@@ -106,9 +106,9 @@ int LL_PROC_PROTO(proc_memory_alloc)
                 *lenp = 0;
                 return 0;
         }
-        if (write) 
+        if (write)
                 return -EINVAL;
-        
+
         len = snprintf(buf, sizeof(buf), LPU64"\n", obd_memory_sum());
         if (len > *lenp)
                 len = *lenp;
@@ -195,6 +195,7 @@ int LL_PROC_PROTO(proc_pages_max)
 int LL_PROC_PROTO(proc_max_dirty_pages_in_mb)
 {
         int rc = 0;
+        DECLARE_LL_PROC_PPOS_DECL;
 
         if (!table->data || !table->maxlen || !*lenp || (*ppos && !write)) {
                 *lenp = 0;
@@ -221,7 +222,7 @@ int LL_PROC_PROTO(proc_max_dirty_pages_in_mb)
                 len = lprocfs_read_frac_helper(buf, sizeof(buf),
                                                *(unsigned int*)table->data,
                                                1 << (20 - CFS_PAGE_SHIFT));
-                if (len > *lenp) 
+                if (len > *lenp)
                         len = *lenp;
                 buf[len] = '\0';
                 if (copy_to_user(buffer, buf, len))
@@ -243,7 +244,7 @@ int LL_PROC_PROTO(proc_alloc_fail_rate)
                 return 0;
         }
         if (write) {
-                rc = lprocfs_write_frac_helper(buffer, *lenp, 
+                rc = lprocfs_write_frac_helper(buffer, *lenp,
                                                (unsigned int*)table->data,
                                                OBD_ALLOC_FAIL_MULT);
         } else {
@@ -354,7 +355,7 @@ static cfs_sysctl_table_t obd_table[] = {
                 .mode     = 0644,
                 .proc_handler = &proc_set_timeout
         },
-#ifdef RANDOM_FAIL_LOC
+#ifdef RANDOM_FAIL_ALLOC
         {
                 .ctl_name = OBD_ALLOC_FAIL_RATE,
                 .procname = "alloc_fail_rate",