[Drbd-dev] [PATCH v2 5/5] zram: use generic PAGE_SECTORS and PAGE_SECTORS_SHIFT

Johannes Thumshirn Johannes.Thumshirn at wdc.com
Fri May 26 11:24:14 CEST 2023


On 26.05.23 09:34, Luis Chamberlain wrote:
> +	u32 index = bio->bi_iter.bi_sector >> PAGE_SECTORS_SHIFT;
> +	u32 offset = (bio->bi_iter.bi_sector & (PAGE_SECTORS - 1)) <<
>  			SECTOR_SHIFT;

(PAGE_SECTORS - 1) is SECTOR_MASK, please use this.

Thanks,
	Johannes


More information about the drbd-dev mailing list