ext4: trim allocation requests to group size
am: 8774c73cf6
Change-Id: I7ef4daf4451a8e8373f8e6e0cf07e08c676c9921
This commit is contained in:
commit
3e0e74cef5
1 changed files with 7 additions and 0 deletions
|
@ -3121,6 +3121,13 @@ ext4_mb_normalize_request(struct ext4_allocation_context *ac,
|
|||
if (ar->pright && start + size - 1 >= ar->lright)
|
||||
size -= start + size - ar->lright;
|
||||
|
||||
/*
|
||||
* Trim allocation request for filesystems with artificially small
|
||||
* groups.
|
||||
*/
|
||||
if (size > EXT4_BLOCKS_PER_GROUP(ac->ac_sb))
|
||||
size = EXT4_BLOCKS_PER_GROUP(ac->ac_sb);
|
||||
|
||||
end = start + size;
|
||||
|
||||
/* check we don't cross already preallocated blocks */
|
||||
|
|
Loading…
Add table
Reference in a new issue