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

ldiskfs: ext4_map_inode_page() ready for large blocks count

Details

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

    Description

      2.6.2 ext4_map_inode_page function's parameter blocks should be 64bit long
      There is function with parameter “unsigned long *blocks”:

      int ext4_map_inode_page(struct inode *inode, struct page *page,
      unsigned long *blocks, int create)
      

      But ext4_bmap returns sector_t value.

      static sector_t ext4_bmap(struct address_space *mapping, sector_t block)
      blocks[i] = ext4_bmap(inode->i_mapping, iblock);
      

      That depending on macros can be 32 or 64 bit long

       /**
       * The type used for indexing onto a disc or disc partition.
       *
       * Linux always considers sectors to be 512 bytes long independently
       * of the devices real block size.
       *
       * blkcnt_t is th type of the inode's block count.
       */
      #ifdef CONFIG_LBDAF
      typedef u64 sector_t;
      typedef u64 blkcnt_t;
      #else
      typedef unsigned long sector_t;
      typedef unsigned long blkcnt_t;
      #endif
      

      CONFIG_LBDAF:Enable block devices or files of size 2TB and larger.This option is required to support the full capacity of large (2TB+) block devices, including RAID, disk, Network Block
      Device, Logical Volume Manager (LVM) and loopback.This option also enables support for single files larger than 2TB.The ext4 filesystem requires that this feature be enabled in order to support filesystems that have the huge_file feature enabled. Otherwise, it will refuse to mount in the read-write mode any filesystems that use the huge_file feature, which is enabled by default by mke2fs.ext4.The GFS2 filesystem also requires this feature.If unsure, say Y.

      So we need to use sector_t for this array of blocks.
      The field dr_blocks in osd_iobuf and its users should be corrected

      This problem is actual for x86_32 systems only.

      Attachments

        Activity

          [LU-6464] ldiskfs: ext4_map_inode_page() ready for large blocks count
          pjones Peter Jones added a comment -

          Landed for 2.8

          pjones Peter Jones added a comment - Landed for 2.8

          Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/14463/
          Subject: LU-6464 ldiskfs: 64bit pointers in ext4_map_inode_page()
          Project: fs/lustre-release
          Branch: master
          Current Patch Set:
          Commit: 6f0f73eb72f63c8988aa89e2bf05f24b6588e584

          gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/14463/ Subject: LU-6464 ldiskfs: 64bit pointers in ext4_map_inode_page() Project: fs/lustre-release Branch: master Current Patch Set: Commit: 6f0f73eb72f63c8988aa89e2bf05f24b6588e584

          Artem Blagodarenko (artem_blagodarenko@xyratex.com) uploaded a new patch: http://review.whamcloud.com/14463
          Subject: LU-6464 ldiskfs: 64bit pointers in ext4_map_inode_page()
          Project: fs/lustre-release
          Branch: master
          Current Patch Set: 1
          Commit: f77a665e0133257f30b4453020c9d21c37ba8c78

          gerrit Gerrit Updater added a comment - Artem Blagodarenko (artem_blagodarenko@xyratex.com) uploaded a new patch: http://review.whamcloud.com/14463 Subject: LU-6464 ldiskfs: 64bit pointers in ext4_map_inode_page() Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: f77a665e0133257f30b4453020c9d21c37ba8c78

          People

            wc-triage WC Triage
            artem_blagodarenko Artem Blagodarenko (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: