Commit 01e807e
ext4: make online defragmentation support large folios
move_extent_per_page() currently assumes that each folio is the size of
PAGE_SIZE and only copies data for one page. ext4_move_extents() should
call move_extent_per_page() for each page. To support larger folios,
simply modify the calculations for the block start and end offsets
within the folio based on the provided range of 'data_offset_in_page'
and 'block_len_in_page'. This function will continue to handle PAGE_SIZE
of data at a time and will not convert this function to manage an entire
folio. Additionally, we use the source folio to copy data, so it doesn't
matter if the source and dest folios are different in size.
Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
Link: https://patch.msgid.link/20250512063319.3539411-8-yi.zhang@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>1 parent cd9f76d commit 01e807e
1 file changed
Lines changed: 4 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
272 | | - | |
| 272 | + | |
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
| |||
323 | 323 | | |
324 | 324 | | |
325 | 325 | | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | 326 | | |
332 | 327 | | |
333 | 328 | | |
| |||
360 | 355 | | |
361 | 356 | | |
362 | 357 | | |
| 358 | + | |
| 359 | + | |
363 | 360 | | |
364 | 361 | | |
365 | 362 | | |
| |||
390 | 387 | | |
391 | 388 | | |
392 | 389 | | |
393 | | - | |
| 390 | + | |
394 | 391 | | |
395 | 392 | | |
396 | 393 | | |
| |||
0 commit comments