Commit e0b94b7
authored
chd: Handle short writes (#15902)
Check the number of bytes written by CHD file write operations and report an I/O error when a write completes without writing all requested data
Also, prevent the alignment padding loop from getting stuck if a write succeeds without making any progress
Used ChatGPT (GPT-5.6 Sol) to review the code, identify the short-write handling issues, and help prepare the fix.1 parent c690a9e commit e0b94b7
1 file changed
Lines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
198 | 202 | | |
199 | 203 | | |
200 | 204 | | |
| |||
235 | 239 | | |
236 | 240 | | |
237 | 241 | | |
| 242 | + | |
| 243 | + | |
238 | 244 | | |
239 | 245 | | |
240 | 246 | | |
| |||
245 | 251 | | |
246 | 252 | | |
247 | 253 | | |
248 | | - | |
| 254 | + | |
| 255 | + | |
249 | 256 | | |
250 | 257 | | |
| 258 | + | |
| 259 | + | |
251 | 260 | | |
252 | 261 | | |
253 | 262 | | |
| |||
0 commit comments