mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 06:50:58 +07:00
ext4: Init the complete page while building buddy cache
We need to init the complete page during buddy cache init by setting the contents to '1'. Otherwise we can see the following errors after doing an online resize of the filesystem: EXT4-fs error (device sdb1): ext4_mb_mark_diskspace_used: Allocating block 1040385 in system zone of 127 group Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Cc: stable@kernel.org
This commit is contained in:
parent
8556e8f3b6
commit
29eaf02498
@ -846,6 +846,8 @@ static int ext4_mb_init_cache(struct page *page, char *incore)
|
||||
|
||||
err = 0;
|
||||
first_block = page->index * blocks_per_page;
|
||||
/* init the page */
|
||||
memset(page_address(page), 0xff, PAGE_CACHE_SIZE);
|
||||
for (i = 0; i < blocks_per_page; i++) {
|
||||
int group;
|
||||
struct ext4_group_info *grinfo;
|
||||
@ -872,7 +874,6 @@ static int ext4_mb_init_cache(struct page *page, char *incore)
|
||||
BUG_ON(incore == NULL);
|
||||
mb_debug("put buddy for group %u in page %lu/%x\n",
|
||||
group, page->index, i * blocksize);
|
||||
memset(data, 0xff, blocksize);
|
||||
grinfo = ext4_get_group_info(sb, group);
|
||||
grinfo->bb_fragments = 0;
|
||||
memset(grinfo->bb_counters, 0,
|
||||
|
Loading…
Reference in New Issue
Block a user