Whamcloud - gitweb
LU-9814 ldiskfs: restore simple_strtol in prealloc 33/29733/2
authorYang Sheng <yang.sheng@intel.com>
Tue, 15 Aug 2017 10:42:09 +0000 (18:42 +0800)
committerJohn L. Hammond <john.hammond@intel.com>
Thu, 26 Oct 2017 16:09:07 +0000 (16:09 +0000)
Since kstrtol needs a null-terminor string so we
back to use simple_strtol in prealloc patches.

Lustre-change: https://review.whamcloud.com/28553
Lustre-commit: 685ef61f0fb9849e3f7a32c4ebf2980d3300afb0

Signed-off-by: Yang Sheng <yang.sheng@intel.com>
Change-Id: I331308d830fbeef9c00156bb8c14b43651d66420
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Alexey Lyashkov <c17817@cray.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/29733
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
ldiskfs/kernel_patches/patches/rhel7.4/ext4-prealloc.patch
ldiskfs/kernel_patches/patches/rhel7/ext4-prealloc.patch
ldiskfs/kernel_patches/patches/sles12/ext4-prealloc.patch
ldiskfs/kernel_patches/patches/sles12sp2/ext4-prealloc.patch

index 65a5d4e..b35e038 100644 (file)
@@ -49,7 +49,7 @@ Index: linux-3.10.0-514.16.1.el7.x86_64/fs/ext4/mballoc.c
  /*
   * The routine scans buddy structures (not bitmap!) from given order
   * to max order and tries to find big enough chunk to satisfy the req
-@@ -2301,6 +2321,93 @@ static const struct seq_operations ext4_
+@@ -2301,6 +2321,90 @@ static const struct seq_operations ext4_
        .show   = ext4_mb_seq_groups_show,
  };
  
@@ -78,12 +78,9 @@ Index: linux-3.10.0-514.16.1.el7.x86_64/fs/ext4/mballoc.c
 +      cur = str;
 +      end = str + cnt;
 +      while (cur < end) {
-+              int rc;
 +              while ((cur < end) && (*cur == ' '))
 +                      cur++;
-+              rc = kstrtol(cur, 0, &value);
-+              if (rc != 0)
-+                      return -EINVAL;
++              value = simple_strtol(cur, &cur, 0);
 +              if (value == 0)
 +                      break;
 +              if (value <= prev)
index 975e927..0e9c3ca 100644 (file)
@@ -49,7 +49,7 @@ Index: linux-3.10.0-514.16.1.el7.x86_64/fs/ext4/mballoc.c
  /*
   * The routine scans buddy structures (not bitmap!) from given order
   * to max order and tries to find big enough chunk to satisfy the req
-@@ -2301,6 +2321,93 @@ static const struct seq_operations ext4_
+@@ -2301,6 +2321,90 @@ static const struct seq_operations ext4_
        .show   = ext4_mb_seq_groups_show,
  };
  
@@ -78,12 +78,9 @@ Index: linux-3.10.0-514.16.1.el7.x86_64/fs/ext4/mballoc.c
 +      cur = str;
 +      end = str + cnt;
 +      while (cur < end) {
-+              int rc;
 +              while ((cur < end) && (*cur == ' '))
 +                      cur++;
-+              rc = kstrtol(cur, 0, &value);
-+              if (rc != 0)
-+                      return -EINVAL;
++              value = simple_strtol(cur, &cur, 0);
 +              if (value == 0)
 +                      break;
 +              if (value <= prev)
index b788539..5de7cef 100644 (file)
@@ -49,7 +49,7 @@ Index: linux-3.12.39-47.1/fs/ext4/mballoc.c
  /*
   * The routine scans buddy structures (not bitmap!) from given order
   * to max order and tries to find big enough chunk to satisfy the req
-@@ -2285,6 +2304,93 @@ static const struct seq_operations ext4_
+@@ -2285,6 +2304,90 @@ static const struct seq_operations ext4_
        .show   = ext4_mb_seq_groups_show,
  };
  
@@ -78,12 +78,9 @@ Index: linux-3.12.39-47.1/fs/ext4/mballoc.c
 +      cur = str;
 +      end = str + cnt;
 +      while (cur < end) {
-+              int rc;
 +              while ((cur < end) && (*cur == ' '))
 +                      cur++;
-+              rc = kstrtol(cur, 0, &value);
-+              if (rc != 0)
-+                      return -EINVAL;
++              value = simple_strtol(cur, &cur, 0);
 +              if (value == 0)
 +                      break;
 +              if (value <= prev)
index b7b6d31..cf0f42b 100644 (file)
@@ -57,7 +57,7 @@ Index: linux-3.10.0-123.el7.x86_64/fs/ext4/mballoc.c
  /*
   * The routine scans buddy structures (not bitmap!) from given order
   * to max order and tries to find big enough chunk to satisfy the req
-@@ -2263,6 +2282,91 @@ static const struct seq_operations ext4_
+@@ -2263,6 +2282,88 @@ static const struct seq_operations ext4_
        .show   = ext4_mb_seq_groups_show,
  };
  
@@ -84,12 +84,9 @@ Index: linux-3.10.0-123.el7.x86_64/fs/ext4/mballoc.c
 +      cur = str;
 +      end = str + cnt;
 +      while (cur < end) {
-+              int rc;
 +              while ((cur < end) && (*cur == ' '))
 +                      cur++;
-+              rc = kstrtol(cur, 0, &value);
-+              if (rc != 0)
-+                      return -EINVAL;
++              value = simple_strtol(cur, &cur, 0);
 +              if (value == 0)
 +                      break;
 +              if (value <= prev)