[LU-16812] ldiskfs osd_punch() should check new inode size does not exceed maximum size Created: 10/May/23  Updated: 29/Jun/23

Status: Open
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Dongyang Li Assignee: Dongyang Li
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Duplicate
is duplicated by LU-14384 data "written" to last stripe of very... Open
Related
is related to LU-16537 osd-ldiskfs prevents writing of last ... Open
Severity: 3
Rank (Obsolete): 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().



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

"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

Comment by Andreas Dilger [ 11/May/23 ]

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"

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