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

fallocate() does not zero on-disk data

Details

    • Bug
    • Resolution: Fixed
    • Blocker
    • Lustre 2.14.0
    • Lustre 2.14.0
    • None
    • 3
    • 9223372036854775807

    Description

      The ldiskfs osd_fallocate() does not correctly zero the allocated blocks. This is not noticed during autotest and local developer testing because the underlying storage is zero-filled due to using a sparse backing file and will usually read back as zero. Also, the fsx data correctness test was not properly detecting fallocate() support, and as a result this behavior was not detected until after fsx was fixed.

      fsx uses test_fallocate() to determine if fallocate() along with its various FLAGS is enabled and could be called. This was discovered while working on LU-14160 that test_fallocate() always returned false as a bug. Resulting is fallocate() being skipped always for fsx runs.

      Attachments

        Issue Links

          Activity

            [LU-14286] fallocate() does not zero on-disk data

            Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/41216/
            Subject: LU-14286 osd-ldiskfs: don't read unwritten blocks
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 42c52069cada6837df34a02638717dff709e5a0e

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/41216/ Subject: LU-14286 osd-ldiskfs: don't read unwritten blocks Project: fs/lustre-release Branch: master Current Patch Set: Commit: 42c52069cada6837df34a02638717dff709e5a0e

            Alex Zhuravlev (bzzz@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/41216
            Subject: LU-14286 osd: don't read unwritten blocks
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 065e10770fc082ba8ec80aed21a797a34faaaab4

            gerrit Gerrit Updater added a comment - Alex Zhuravlev (bzzz@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/41216 Subject: LU-14286 osd: don't read unwritten blocks Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 065e10770fc082ba8ec80aed21a797a34faaaab4

            Andreas Dilger (adilger@whamcloud.com) merged in patch https://review.whamcloud.com/41211/
            Subject: LU-14286 tests: reduce fallocate space sanity 150e
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: b9274179adf0939909ff2dd78d077515a64fd25f

            gerrit Gerrit Updater added a comment - Andreas Dilger (adilger@whamcloud.com) merged in patch https://review.whamcloud.com/41211/ Subject: LU-14286 tests: reduce fallocate space sanity 150e Project: fs/lustre-release Branch: master Current Patch Set: Commit: b9274179adf0939909ff2dd78d077515a64fd25f

            James Nunez (jnunez@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/41211
            Subject: LU-14286 tests: reduce fallocate space sanity 150e
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 4be24e98c0d1f1a08c9ca03444a3cb682017303c

            gerrit Gerrit Updater added a comment - James Nunez (jnunez@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/41211 Subject: LU-14286 tests: reduce fallocate space sanity 150e Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 4be24e98c0d1f1a08c9ca03444a3cb682017303c

            Still not fixed.

            adilger Andreas Dilger added a comment - Still not fixed.

            Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/41204
            Subject: LU-14286 osd-ldiskfs: fallocate with unwritten extents
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 44c56a496d80a8607d29681ade498fe4fbf85a59

            gerrit Gerrit Updater added a comment - Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/41204 Subject: LU-14286 osd-ldiskfs: fallocate with unwritten extents Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 44c56a496d80a8607d29681ade498fe4fbf85a59
            pjones Peter Jones added a comment -

            Landed for 2.14

            pjones Peter Jones added a comment - Landed for 2.14

            Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/41119/
            Subject: LU-14286 osd-ldiskfs: fallocate() should zero new blocks
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 72617588ac8cb2e3e5a7b8e5ebc201cab524d938

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/41119/ Subject: LU-14286 osd-ldiskfs: fallocate() should zero new blocks Project: fs/lustre-release Branch: master Current Patch Set: Commit: 72617588ac8cb2e3e5a7b8e5ebc201cab524d938

            Arshad, I've recharacterized this ticket to be more about the osd_fallocate() bug rather than the fsx bug, since it is essentially a data corruption issue that needs to be fixed as part of 2.14.0, and since this patch was already fixing the problem. Rather than spin up a new patch with the same fix, I instead changed the commit message to make it clear the importance of the patch and the reason that it is being included in 2.14.0 at this late date.

            adilger Andreas Dilger added a comment - Arshad, I've recharacterized this ticket to be more about the osd_fallocate() bug rather than the fsx bug, since it is essentially a data corruption issue that needs to be fixed as part of 2.14.0, and since this patch was already fixing the problem. Rather than spin up a new patch with the same fix, I instead changed the commit message to make it clear the importance of the patch and the reason that it is being included in 2.14.0 at this late date.

            Arshad Hussain (arshad.hussain@aeoncomputing.com) uploaded a new patch: https://review.whamcloud.com/41119
            Subject: LU-14286 fsx: 'fsx' calling test_fallocate() always returns false
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 80f2acf55464ebc52f15872223d49481810ffdb0

            gerrit Gerrit Updater added a comment - Arshad Hussain (arshad.hussain@aeoncomputing.com) uploaded a new patch: https://review.whamcloud.com/41119 Subject: LU-14286 fsx: 'fsx' calling test_fallocate() always returns false Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 80f2acf55464ebc52f15872223d49481810ffdb0

            People

              arshad512 Arshad Hussain
              arshad512 Arshad Hussain
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: