mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	ext4: use non-movable memory for the ext4 superblock
Since the ext4 superblock is not released until the file system is unmounted, allocate the buffer cache entry for the ext4 superblock out of the non-moveable are to allow page migrations and thus CMA allocations to more easily succeed if the CMA area is limited. Signed-off-by: Gioh Kim <gioh.kim@lge.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu> Reviewed-by: Jan Kara <jack@suse.cz>
This commit is contained in:
		
							parent
							
								
									3b5e6454aa
								
							
						
					
					
						commit
						a8ac900b81
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
					@ -3436,7 +3436,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
 | 
				
			||||||
		logical_sb_block = sb_block;
 | 
							logical_sb_block = sb_block;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (!(bh = sb_bread(sb, logical_sb_block))) {
 | 
						if (!(bh = sb_bread_unmovable(sb, logical_sb_block))) {
 | 
				
			||||||
		ext4_msg(sb, KERN_ERR, "unable to read superblock");
 | 
							ext4_msg(sb, KERN_ERR, "unable to read superblock");
 | 
				
			||||||
		goto out_fail;
 | 
							goto out_fail;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					@ -3646,7 +3646,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
 | 
				
			||||||
		brelse(bh);
 | 
							brelse(bh);
 | 
				
			||||||
		logical_sb_block = sb_block * EXT4_MIN_BLOCK_SIZE;
 | 
							logical_sb_block = sb_block * EXT4_MIN_BLOCK_SIZE;
 | 
				
			||||||
		offset = do_div(logical_sb_block, blocksize);
 | 
							offset = do_div(logical_sb_block, blocksize);
 | 
				
			||||||
		bh = sb_bread(sb, logical_sb_block);
 | 
							bh = sb_bread_unmovable(sb, logical_sb_block);
 | 
				
			||||||
		if (!bh) {
 | 
							if (!bh) {
 | 
				
			||||||
			ext4_msg(sb, KERN_ERR,
 | 
								ext4_msg(sb, KERN_ERR,
 | 
				
			||||||
			       "Can't read superblock on 2nd try");
 | 
								       "Can't read superblock on 2nd try");
 | 
				
			||||||
| 
						 | 
					@ -3868,7 +3868,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	for (i = 0; i < db_count; i++) {
 | 
						for (i = 0; i < db_count; i++) {
 | 
				
			||||||
		block = descriptor_loc(sb, logical_sb_block, i);
 | 
							block = descriptor_loc(sb, logical_sb_block, i);
 | 
				
			||||||
		sbi->s_group_desc[i] = sb_bread(sb, block);
 | 
							sbi->s_group_desc[i] = sb_bread_unmovable(sb, block);
 | 
				
			||||||
		if (!sbi->s_group_desc[i]) {
 | 
							if (!sbi->s_group_desc[i]) {
 | 
				
			||||||
			ext4_msg(sb, KERN_ERR,
 | 
								ext4_msg(sb, KERN_ERR,
 | 
				
			||||||
			       "can't read group descriptor %d", i);
 | 
								       "can't read group descriptor %d", i);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue