Re: [PATCHv1 5/9] ext4: Rename ext4_set_bits to mb_set_bits

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat 05-02-22 19:39:54, Ritesh Harjani wrote:
> ext4_set_bits() should actually be mb_set_bits() for uniform API naming
> convention.
> This is via below cmd -
> 
> grep -nr "ext4_set_bits" fs/ext4/ | cut -d ":" -f 1 | xargs sed -i 's/ext4_set_bits/mb_set_bits/g'
> 
> Signed-off-by: Ritesh Harjani <riteshh@xxxxxxxxxxxxx>

Looks good. Feel free to add:

Reviewed-by: Jan Kara <jack@xxxxxxx>

								Honza

> ---
>  fs/ext4/ext4.h    |  2 +-
>  fs/ext4/mballoc.c | 14 +++++++-------
>  fs/ext4/resize.c  |  4 ++--
>  3 files changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
> index 09d8f60ebf0f..8c1d0e352f47 100644
> --- a/fs/ext4/ext4.h
> +++ b/fs/ext4/ext4.h
> @@ -1279,7 +1279,7 @@ struct ext4_inode_info {
>  #define ext4_find_next_zero_bit		find_next_zero_bit_le
>  #define ext4_find_next_bit		find_next_bit_le
> 
> -extern void ext4_set_bits(void *bm, int cur, int len);
> +extern void mb_set_bits(void *bm, int cur, int len);
> 
>  /*
>   * Maximal mount counts between two filesystem checks
> diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
> index 91058f81a0c6..f80af108d05e 100644
> --- a/fs/ext4/mballoc.c
> +++ b/fs/ext4/mballoc.c
> @@ -1689,7 +1689,7 @@ static int mb_test_and_clear_bits(void *bm, int cur, int len)
>  	return zero_bit;
>  }
> 
> -void ext4_set_bits(void *bm, int cur, int len)
> +void mb_set_bits(void *bm, int cur, int len)
>  {
>  	__u32 *addr;
> 
> @@ -1996,7 +1996,7 @@ static int mb_mark_used(struct ext4_buddy *e4b, struct ext4_free_extent *ex)
>  	mb_set_largest_free_order(e4b->bd_sb, e4b->bd_info);
> 
>  	mb_update_avg_fragment_size(e4b->bd_sb, e4b->bd_info);
> -	ext4_set_bits(e4b->bd_bitmap, ex->fe_start, len0);
> +	mb_set_bits(e4b->bd_bitmap, ex->fe_start, len0);
>  	mb_check_buddy(e4b);
> 
>  	return ret;
> @@ -3825,7 +3825,7 @@ ext4_mb_mark_diskspace_used(struct ext4_allocation_context *ac,
>  		 * We leak some of the blocks here.
>  		 */
>  		ext4_lock_group(sb, ac->ac_b_ex.fe_group);
> -		ext4_set_bits(bitmap_bh->b_data, ac->ac_b_ex.fe_start,
> +		mb_set_bits(bitmap_bh->b_data, ac->ac_b_ex.fe_start,
>  			      ac->ac_b_ex.fe_len);
>  		ext4_unlock_group(sb, ac->ac_b_ex.fe_group);
>  		err = ext4_handle_dirty_metadata(handle, NULL, bitmap_bh);
> @@ -3844,7 +3844,7 @@ ext4_mb_mark_diskspace_used(struct ext4_allocation_context *ac,
>  		}
>  	}
>  #endif
> -	ext4_set_bits(bitmap_bh->b_data, ac->ac_b_ex.fe_start,
> +	mb_set_bits(bitmap_bh->b_data, ac->ac_b_ex.fe_start,
>  		      ac->ac_b_ex.fe_len);
>  	if (ext4_has_group_desc_csum(sb) &&
>  	    (gdp->bg_flags & cpu_to_le16(EXT4_BG_BLOCK_UNINIT))) {
> @@ -3939,7 +3939,7 @@ void ext4_mb_mark_bb(struct super_block *sb, ext4_fsblk_t block,
> 
>  		clen_changed = clen - already;
>  		if (state)
> -			ext4_set_bits(bitmap_bh->b_data, blkoff, clen);
> +			mb_set_bits(bitmap_bh->b_data, blkoff, clen);
>  		else
>  			mb_test_and_clear_bits(bitmap_bh->b_data, blkoff, clen);
>  		if (ext4_has_group_desc_csum(sb) &&
> @@ -4459,7 +4459,7 @@ static void ext4_mb_generate_from_freelist(struct super_block *sb, void *bitmap,
> 
>  	while (n) {
>  		entry = rb_entry(n, struct ext4_free_data, efd_node);
> -		ext4_set_bits(bitmap, entry->efd_start_cluster, entry->efd_count);
> +		mb_set_bits(bitmap, entry->efd_start_cluster, entry->efd_count);
>  		n = rb_next(n);
>  	}
>  	return;
> @@ -4500,7 +4500,7 @@ void ext4_mb_generate_from_pa(struct super_block *sb, void *bitmap,
>  		if (unlikely(len == 0))
>  			continue;
>  		BUG_ON(groupnr != group);
> -		ext4_set_bits(bitmap, start, len);
> +		mb_set_bits(bitmap, start, len);
>  		preallocated += len;
>  	}
>  	mb_debug(sb, "preallocated %d for group %u\n", preallocated, group);
> diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
> index ee8f02f406cb..f507f34be602 100644
> --- a/fs/ext4/resize.c
> +++ b/fs/ext4/resize.c
> @@ -483,7 +483,7 @@ static int set_flexbg_block_bitmap(struct super_block *sb, handle_t *handle,
>  		}
>  		ext4_debug("mark block bitmap %#04llx (+%llu/%u)\n",
>  			   first_cluster, first_cluster - start, count2);
> -		ext4_set_bits(bh->b_data, first_cluster - start, count2);
> +		mb_set_bits(bh->b_data, first_cluster - start, count2);
> 
>  		err = ext4_handle_dirty_metadata(handle, NULL, bh);
>  		brelse(bh);
> @@ -632,7 +632,7 @@ static int setup_new_flex_group_blocks(struct super_block *sb,
>  		if (overhead != 0) {
>  			ext4_debug("mark backup superblock %#04llx (+0)\n",
>  				   start);
> -			ext4_set_bits(bh->b_data, 0,
> +			mb_set_bits(bh->b_data, 0,
>  				      EXT4_NUM_B2C(sbi, overhead));
>  		}
>  		ext4_mark_bitmap_end(EXT4_B2C(sbi, group_data[i].blocks_count),
> --
> 2.31.1
> 
-- 
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR



[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux