[LU-14286] fallocate() does not zero on-disk data Created: 01/Jan/21  Updated: 30/Jan/21  Resolved: 27/Jan/21

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.14.0
Fix Version/s: Lustre 2.14.0

Type: Bug Priority: Blocker
Reporter: Arshad Hussain Assignee: Arshad Hussain
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Related
is related to LU-14326 sanity-dom test_fsx: crash in osc_ext... Resolved
is related to LU-14333 ASSERTION( oinfo->loi_lvb.lvb_size >=... Resolved
is related to LU-14324 fsx fallocate detection is buggy Resolved
is related to LUDOC-487 Document llite.*.fallocate_zero_block... Open
Severity: 3
Rank (Obsolete): 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.



 Comments   
Comment by Gerrit Updater [ 01/Jan/21 ]

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

Comment by Andreas Dilger [ 10/Jan/21 ]

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.

Comment by Gerrit Updater [ 11/Jan/21 ]

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

Comment by Peter Jones [ 11/Jan/21 ]

Landed for 2.14

Comment by Gerrit Updater [ 12/Jan/21 ]

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

Comment by Andreas Dilger [ 12/Jan/21 ]

Still not fixed.

Comment by Gerrit Updater [ 12/Jan/21 ]

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

Comment by Gerrit Updater [ 13/Jan/21 ]

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

Comment by Gerrit Updater [ 13/Jan/21 ]

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

Comment by Gerrit Updater [ 22/Jan/21 ]

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

Comment by Gerrit Updater [ 25/Jan/21 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/41204/
Subject: LU-14286 osd-ldiskfs: fallocate with unwritten extents
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 4f18e08099e51b682f6acb1cf9fea6d7d45f5fd7

Comment by Gerrit Updater [ 25/Jan/21 ]

Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/41315
Subject: LU-14286 osd-ldiskfs: enable fallocate by default
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 0ba7b99f41593cdedcf6b1340b73932edd3fa3e0

Comment by Gerrit Updater [ 27/Jan/21 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/41315/
Subject: LU-14286 osd-ldiskfs: enable fallocate by default
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 51d2a79ac93d31f969baaa5f10da707762acf3f2

Comment by Peter Jones [ 27/Jan/21 ]

Finally I think that everything tracked here has landed

Generated at Sat Feb 10 03:08:25 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.