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

ldiskfs osd_punch() should check new inode size does not exceed maximum size

Details

    • Improvement
    • Resolution: Unresolved
    • Minor
    • None
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      On osd we don't check for new inode size before ldiskfs_truncate(), we could overflow the block counters in ext4_es_remove_extent().

      Attachments

        Issue Links

          Activity

            [LU-16812] ldiskfs osd_punch() should check new inode size does not exceed maximum size

            It seems kind of wrong that we allow creating a file with size=MAX_LFS_FILESIZE but then we cannot open it? It would probably make more sense that we would return an error for the truncate operation for files larger than LOV_MAX_STRIPE_COUNT * ocd_maxbytes at the client.

            Something like this is already in https://review.whamcloud.com/41365 "LU-14384 tests: write and read last object stripe"

            adilger Andreas Dilger added a comment - It seems kind of wrong that we allow creating a file with size=MAX_LFS_FILESIZE but then we cannot open it? It would probably make more sense that we would return an error for the truncate operation for files larger than LOV_MAX_STRIPE_COUNT * ocd_maxbytes at the client. Something like this is already in https://review.whamcloud.com/41365 " LU-14384 tests: write and read last object stripe "

            "Li Dongyang <dongyangli@ddn.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/50898
            Subject: LU-16812 osd-ldiskfs: check inode new size before truncate
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: b68d6ea613477d39ecdadc8d8131554a1a5bf27d

            gerrit Gerrit Updater added a comment - "Li Dongyang <dongyangli@ddn.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/50898 Subject: LU-16812 osd-ldiskfs: check inode new size before truncate Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: b68d6ea613477d39ecdadc8d8131554a1a5bf27d

            People

              dongyang Dongyang Li
              dongyang Dongyang Li
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: