public inbox for nvdimm@lists.linux.dev
 help / color / mirror / Atom feed
* Re: [PATCH 08/20] drbd: add DAX/PMEM support for metadata access
       [not found] ` <20260327223820.2244227-9-christoph.boehmwalder@linbit.com>
@ 2026-04-08  5:46   ` Christoph Hellwig
  0 siblings, 0 replies; only message in thread
From: Christoph Hellwig @ 2026-04-08  5:46 UTC (permalink / raw)
  To: Christoph Böhmwalder
  Cc: Jens Axboe, drbd-dev, linux-kernel, Lars Ellenberg,
	Philipp Reisner, linux-block, Joel Colledge, an Williams,
	Vishal Verma, Dave Jiang, nvdimm

Adding the dax maintainers and they really need to review this.

> +	long want = (drbd_md_last_sector(bdev) + 1 - first_sector) >> (PAGE_SHIFT - SECTOR_SHIFT);
> +	pgoff_t pgoff = first_sector >> (PAGE_SHIFT - SECTOR_SHIFT);
> +	long md_offset_byte = (bdev->md.md_offset - first_sector) << SECTOR_SHIFT;
> +	long al_offset_byte = (al_sector - first_sector) << SECTOR_SHIFT;

You really want helpers to make all these unit conversions maintainable.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-04-08  5:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20260327223820.2244227-1-christoph.boehmwalder@linbit.com>
     [not found] ` <20260327223820.2244227-9-christoph.boehmwalder@linbit.com>
2026-04-08  5:46   ` [PATCH 08/20] drbd: add DAX/PMEM support for metadata access Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox