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

Cannot write to ldiskfs prealloc_table proc file

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Minor
    • Lustre 2.11.0
    • Lustre 2.10.0
    • None
    • RHEL7, SLES12
    • 3
    • 9223372036854775807

    Description

      For Lustre servers using ldiskfs, the prealloc_table cannot be updated through the proc file.

      # echo 1024 2048 4096 > /proc/fs/ldiskfs/md0/prealloc_table
      -bash: echo: write error: Invalid argument
      
      
      
      
      # ls -l /proc/fs/ldiskfs/md0/prealloc_table
      -rw-r--r-- 1 root root 0 Sep 13 04:42 /proc/fs/ldiskfs/md0/prealloc_table
      
      
      
      

      The issue appears to be caused by the usage of kstrtol in ldiskfs_mb_prealloc_table_proc_write. Unlike simple_strtol, kstrtol does not provide an end pointer. This causes -EINVAL to be returned due to the cur pointer not getting updated.

      Attachments

        Activity

          People

            ys Yang Sheng
            iziemba Ian Ziemba (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: