[LU-16843] ext4 extent tree should be able to shrink Created: 23/May/23  Updated: 27/Jan/24  Resolved: 27/Jul/23

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

Type: Improvement Priority: Minor
Reporter: Alex Zhuravlev Assignee: Alex Zhuravlev
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Related
is related to LU-17136 ext4 extent tree: increase max depth Resolved
is related to LU-17337 ldiskfs extent merging may need more ... Open
is related to LU-17187 ldiskfs extent merge can release inco... Resolved
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

ext4's extent code doesn't handle cases when extents merge/collapse. for example, one can create a sparse file like this

EXTENTS:
(ETB0):33409
 (0):34816
 (2):34818
 (4):34820
 (6):34822
 (8):34824
 (10):34826
 (12):34828
 (14):34830
 (16):34832
 (18):34834
 (20):34836
 (22):34838
 (24):34840
 (26):34842
 (28):34844
 (30):34846
 (32):34848
 (34):34850
 (36):34852
 (38):34854
 (40):34856
 (42):34858
 (44):34860
 (46):34862
 (48):34864
 (50):34866

then fill the holes and get an extent tree like this one:

EXTENTS:
(ETB0):33409
 (0-1):34816-34817
 (ETB0):33411
 (2-679):34818-35495
 (ETB0):33410
 (680-998):35496-35814

where 2 blocks are used to store 2 mergable extents.



 Comments   
Comment by Gerrit Updater [ 23/May/23 ]

"Alex Zhuravlev <bzzz@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/51096
Subject: LU-16843 ldiskfs: merge extent blocks
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 2bc86de650dde674fe7db0930e819d48eecf29cf

Comment by Gerrit Updater [ 27/Jul/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/51096/
Subject: LU-16843 ldiskfs: merge extent blocks
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 0f7e6c02a9ea5b85d8d97f724bed318268cea60f

Comment by Peter Jones [ 27/Jul/23 ]

Landed for 2.16

Comment by Gerrit Updater [ 05/Dec/23 ]

"Li Dongyang <dongyangli@ddn.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/53323
Subject: LU-16843 ldiskfs: extend journal before merging extent blocks
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 0cab2031c9d11acbfede8fbd34177b0ac331fe6a

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