Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-9814

prealloc table change don't work after 2.10 upgrade

Details

    • Bug
    • Resolution: Fixed
    • Major
    • Lustre 2.11.0, Lustre 2.10.2
    • Lustre 2.10.0
    • None
    • RHEL 7.2
    • 3
    • 9223372036854775807

    Description

      1. cat /proc/fs/ldiskfs/md0p1/prealloc_table
        256 512 1024
      2. echo "256 512 1024” > /proc/fs/ldiskfs/md0p1/prealloc_table
        -bash: echo: write error: Invalid argument

      Attachments

        Issue Links

          Activity

            [LU-9814] prealloc table change don't work after 2.10 upgrade

            John L. Hammond (john.hammond@intel.com) merged in patch https://review.whamcloud.com/29733/
            Subject: LU-9814 ldiskfs: restore simple_strtol in prealloc
            Project: fs/lustre-release
            Branch: b2_10
            Current Patch Set:
            Commit: 3e8f17ccfe0a2358b93dbda9bba05c8dfd95aa61

            gerrit Gerrit Updater added a comment - John L. Hammond (john.hammond@intel.com) merged in patch https://review.whamcloud.com/29733/ Subject: LU-9814 ldiskfs: restore simple_strtol in prealloc Project: fs/lustre-release Branch: b2_10 Current Patch Set: Commit: 3e8f17ccfe0a2358b93dbda9bba05c8dfd95aa61

            Minh Diep (minh.diep@intel.com) uploaded a new patch: https://review.whamcloud.com/29733
            Subject: LU-9814 ldiskfs: restore simple_strtol in prealloc
            Project: fs/lustre-release
            Branch: b2_10
            Current Patch Set: 1
            Commit: d42fb752b4b03e03e88c42bcc45ce324dba2e6a5

            gerrit Gerrit Updater added a comment - Minh Diep (minh.diep@intel.com) uploaded a new patch: https://review.whamcloud.com/29733 Subject: LU-9814 ldiskfs: restore simple_strtol in prealloc Project: fs/lustre-release Branch: b2_10 Current Patch Set: 1 Commit: d42fb752b4b03e03e88c42bcc45ce324dba2e6a5
            pjones Peter Jones added a comment -

            Landed for 2.11

            pjones Peter Jones added a comment - Landed for 2.11

            Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/28553/
            Subject: LU-9814 ldiskfs: restore simple_strtol in prealloc
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 685ef61f0fb9849e3f7a32c4ebf2980d3300afb0

            gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/28553/ Subject: LU-9814 ldiskfs: restore simple_strtol in prealloc Project: fs/lustre-release Branch: master Current Patch Set: Commit: 685ef61f0fb9849e3f7a32c4ebf2980d3300afb0

            Hi shadow,

            Do you have any updates on the patch?

            Thanks,

            Brad

            bhoagland Brad Hoagland (Inactive) added a comment - Hi shadow , Do you have any updates on the patch? Thanks, Brad
            pjones Peter Jones added a comment -

            Alexey

            Does this patch work from your point of view?

            Peter

            pjones Peter Jones added a comment - Alexey Does this patch work from your point of view? Peter

            Yang Sheng (yang.sheng@intel.com) uploaded a new patch: https://review.whamcloud.com/28553
            Subject: LU-9814 ldiskfs: restore simple_strtol in prealloc
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: add8915bb4083d29aec27fb81ac49b7ed9ecb9a7

            gerrit Gerrit Updater added a comment - Yang Sheng (yang.sheng@intel.com) uploaded a new patch: https://review.whamcloud.com/28553 Subject: LU-9814 ldiskfs: restore simple_strtol in prealloc Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: add8915bb4083d29aec27fb81ac49b7ed9ecb9a7

            btw. patch in LU-3719 isn't real solution for a own bug. We hit similar bug with patch applied. LU-3917 root cause is unprotected access to the table while update. prealloc_table modified by ext4_mb_prealloc_table_add while accessed. Andriy Skylush should fill a ticket and provide a more details in near time.

            shadow Alexey Lyashkov added a comment - btw. patch in LU-3719 isn't real solution for a own bug. We hit similar bug with patch applied. LU-3917 root cause is unprotected access to the table while update. prealloc_table modified by ext4_mb_prealloc_table_add while accessed. Andriy Skylush should fill a ticket and provide a more details in near time.
            pjones Peter Jones added a comment -

            Bobijam

            Could you please advise?

            Thanks

            Peter

            pjones Peter Jones added a comment - Bobijam Could you please advise? Thanks Peter

            It test system upgrade from IEEL 3.
            bug introduced by commit
            git describe b9ecf2671cba08530cc49d47713a360f2c6c25ca
            v2_10_50_0-19-gb9ecf2671c

            if one chunk was reverted

            --- ldiskfs/mballoc.c	2017-08-01 05:41:12.711164350 -0700
            +++ /usr/src/lustre/2.10.0/ldiskfs/mballoc.c	2017-08-01 05:44:25.782155391 -0700
            @@ -2357,20 +2357,16 @@
             	num = 0;
             	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;
            -		if (value == 0)
            -			break;
            -		if (value <= prev)
            -			return -EINVAL;
            -		prev = value;
            -		num++;
            -	}
            +        while ((cur < end) && (*cur == ' ')) cur++;
            +	    value = simple_strtol(cur, &cur, 0);
            +               if (value == 0)
            +                      break;
            +               if (value <= prev)
            +                       return -EINVAL;
            +               prev = value;
            +               num++;
            +       }
            +
             
             	new_table = kmalloc(num * sizeof(*new_table), GFP_KERNEL);
             	if (new_table == NULL)
            

            it will be work again.

            shadow Alexey Lyashkov added a comment - It test system upgrade from IEEL 3. bug introduced by commit git describe b9ecf2671cba08530cc49d47713a360f2c6c25ca v2_10_50_0-19-gb9ecf2671c if one chunk was reverted --- ldiskfs/mballoc.c 2017-08-01 05:41:12.711164350 -0700 +++ /usr/src/lustre/2.10.0/ldiskfs/mballoc.c 2017-08-01 05:44:25.782155391 -0700 @@ -2357,20 +2357,16 @@ num = 0; 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; - if (value == 0) - break ; - if (value <= prev) - return -EINVAL; - prev = value; - num++; - } + while ((cur < end) && (*cur == ' ' )) cur++; + value = simple_strtol(cur, &cur, 0); + if (value == 0) + break ; + if (value <= prev) + return -EINVAL; + prev = value; + num++; + } + new_table = kmalloc(num * sizeof(*new_table), GFP_KERNEL); if (new_table == NULL) it will be work again.

            People

              bobijam Zhenyu Xu
              shadow Alexey Lyashkov
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: