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

e2freefrag say "Inappropriate ioctl for device while calling fsmap"

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.16.0
    • Lustre 2.16.0
    • None
    • 3
    • 9223372036854775807

    Description

      Tested on RHEL8.7 patched kernel.

      # e2freefrag /dev/sda 
      Device: /dev/sda
      Blocksize: 4096 bytes
      /dev/sda: Inappropriate ioctl for device while calling fsmap
      Total blocks: 7482638336
      Free blocks: 7452679685 (99.6%)
      
      Min. free extent: 4 KB 
      Max. free extent: 135160 KB
      Avg. free extent: 4624 KB
      Num. free extent: 215369
      
      HISTOGRAM OF FREE EXTENT SIZES:
      Extent Size Range :  Free extents   Free Blocks  Percent
          4K...    8K-  :           386           386    0.00%
          8K...   16K-  :           247           598    0.00%
         16K...   32K-  :            89           443    0.00%
         32K...   64K-  :            23           215    0.00%
        256K...  512K-  :          1813        222094    0.00%
          1M...    2M-  :           292        111545    0.00%
          2M...    4M-  :          2995       2821591    0.04%
          4M...    8M-  :        208582     215511377    2.89%
          8M...   16M-  :            23         59123    0.00%
         64M...  128M-  :           494      16100776    0.22%
        128M...  256M-  :           425      14159177    0.19%
      

      Attachments

        Activity

          [LU-17042] e2freefrag say "Inappropriate ioctl for device while calling fsmap"
          pjones Peter Jones added a comment -

          Landed for 2.16

          pjones Peter Jones added a comment - Landed for 2.16

          "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/52147/
          Subject: LU-17042 target: allow fsmap ioctl
          Project: fs/lustre-release
          Branch: master
          Current Patch Set:
          Commit: 8e83c0cf68119920355307cbead6f017d1e937ea

          gerrit Gerrit Updater added a comment - "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/52147/ Subject: LU-17042 target: allow fsmap ioctl Project: fs/lustre-release Branch: master Current Patch Set: Commit: 8e83c0cf68119920355307cbead6f017d1e937ea

          "Li Dongyang <dongyangli@ddn.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/52147
          Subject: LU-17042 target: allow fsmap ioctl
          Project: fs/lustre-release
          Branch: master
          Current Patch Set: 1
          Commit: 9cc7567fc163369a060c3f14be944042c1f4d676

          gerrit Gerrit Updater added a comment - "Li Dongyang <dongyangli@ddn.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/52147 Subject: LU-17042 target: allow fsmap ioctl Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 9cc7567fc163369a060c3f14be944042c1f4d676
          dongyang Dongyang Li added a comment -

          Andreas, the free block counters are based on the result from the ioctl when doing online scanning,
          we only use the free blocks from superblock when doing offline scan, which means device is umounted anyway. So I think it's fine here.
          We are seeing the ioctl error is because we don't pass through the ioctl to ldiskfs on server, I got a patch for this.

          dongyang Dongyang Li added a comment - Andreas, the free block counters are based on the result from the ioctl when doing online scanning, we only use the free blocks from superblock when doing offline scan, which means device is umounted anyway. So I think it's fine here. We are seeing the ioctl error is because we don't pass through the ioctl to ldiskfs on server, I got a patch for this.

          The summary at the start of e2freefrag is also based on the superblock block counts, (which is not updated while mounted) and not the actual free block counters in the group descriptors. It would be better to use the actual block counts.

          adilger Andreas Dilger added a comment - The summary at the start of e2freefrag is also based on the superblock block counts, (which is not updated while mounted) and not the actual free block counters in the group descriptors. It would be better to use the actual block counts.

          People

            dongyang Dongyang Li
            sihara Shuichi Ihara
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: