Re: [PATCH RFC -next v2 05/41] md/md-bitmap: add 'sync_size' into struct md_bitmap_stats

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

 



On Wed, 14 Aug 2024 15:10:37 +0800
Yu Kuai <yukuai1@xxxxxxxxxxxxxxx> wrote:

> From: Yu Kuai <yukuai3@xxxxxxxxxx>
> 
> To avoid dereferencing bitmap directly in md-cluster to prepare
> inventing a new bitmap.
> 
> BTW, also fix following checkpatch warnings:
> 
> WARNING: Deprecated use of 'kmap_atomic', prefer 'kmap_local_page' instead
> WARNING: Deprecated use of 'kunmap_atomic', prefer 'kunmap_local' instead
> 
> Signed-off-by: Yu Kuai <yukuai3@xxxxxxxxxx>
> ---
>  drivers/md/md-bitmap.c  |  6 ++++++
>  drivers/md/md-bitmap.h  |  1 +
>  drivers/md/md-cluster.c | 25 +++++++++++++++----------
>  3 files changed, 22 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/md/md-bitmap.c b/drivers/md/md-bitmap.c
> index 8a2411040d2f..9ff5ed250ba5 100644
> --- a/drivers/md/md-bitmap.c
> +++ b/drivers/md/md-bitmap.c
> @@ -2096,11 +2096,16 @@ EXPORT_SYMBOL_GPL(md_bitmap_copy_from_slot);
>  
>  int md_bitmap_get_stats(struct bitmap *bitmap, struct md_bitmap_stats *stats)
>  {
> +	bitmap_super_t *sb;
>  	struct bitmap_counts *counts;

Hi Kuai,

Use reversed christmas tree convention if possible :)



> diff --git a/drivers/md/md-bitmap.h b/drivers/md/md-bitmap.h
> index c8527ba38dfc..1a7ad2cf9f75 100644
> --- a/drivers/md/md-bitmap.h
> +++ b/drivers/md/md-bitmap.h
> @@ -237,6 +237,7 @@ struct bitmap {
>  struct md_bitmap_stats {
>  	unsigned long pages;
>  	unsigned long missing_pages;
> +	unsigned long sync_size;

Same here.

Anyway, LGTM.
Mariusz




[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux