mbox series

[v2,0/3] Block integrity with flexible-offset PI

Message ID 20240201130126.211402-1-joshi.k@samsung.com (mailing list archive)
Headers show
Series Block integrity with flexible-offset PI | expand

Message

Kanchan Joshi Feb. 1, 2024, 1:01 p.m. UTC
The block integrity subsystem can only work with PI placed in the first
bytes of the metadata buffer.

The series makes block-integrity support the flexible placement of PI.
And changes NVMe driver to make use of the new capability.

This helps to
(i) enable the more common case for NVMe (PI in last bytes is the norm)
(ii) reduce nop profile users (tried by Jens recently [1]).

/* For NS 4K+16b, 8b PI, last bytes */
Before:
# cat /sys/block/nvme0n1/integrity/format
nop

After:
# cat /sys/block/nvme0n1/integrity/format
T10-DIF-TYPE1-CRC

Changes since v1:
- Reworded commit messsage in patch 2 and 3 (hch)
- Variable initialization order change (hch)
- Collect reviewed-by

[1] https://lore.kernel.org/linux-block/20240111160226.1936351-1-axboe@kernel.dk/



Kanchan Joshi (3):
  block: refactor guard helpers
  block: support PI at non-zero offset within metadata
  nvme: allow integrity when PI is not in first bytes

 block/bio-integrity.c         |  1 +
 block/blk-integrity.c         |  1 +
 block/t10-pi.c                | 72 +++++++++++++++++++++++------------
 drivers/nvme/host/core.c      |  8 +++-
 drivers/nvme/host/nvme.h      |  1 +
 include/linux/blk-integrity.h |  1 +
 include/linux/blkdev.h        |  1 +
 7 files changed, 60 insertions(+), 25 deletions(-)

Comments

Kanchan Joshi Feb. 12, 2024, 3:47 p.m. UTC | #1
On Thu, Feb 1, 2024 at 6:39 PM Kanchan Joshi <joshi.k@samsung.com> wrote:
>
> The block integrity subsystem can only work with PI placed in the first
> bytes of the metadata buffer.
>
> The series makes block-integrity support the flexible placement of PI.
> And changes NVMe driver to make use of the new capability.

Hi Jens,

This has got the necessary reviews. Can this be picked up?
Or do you see anything missing?
Jens Axboe Feb. 12, 2024, 3:57 p.m. UTC | #2
On Thu, 01 Feb 2024 18:31:23 +0530, Kanchan Joshi wrote:
> The block integrity subsystem can only work with PI placed in the first
> bytes of the metadata buffer.
> 
> The series makes block-integrity support the flexible placement of PI.
> And changes NVMe driver to make use of the new capability.
> 
> This helps to
> (i) enable the more common case for NVMe (PI in last bytes is the norm)
> (ii) reduce nop profile users (tried by Jens recently [1]).
> 
> [...]

Applied, thanks!

[1/3] block: refactor guard helpers
      commit: 6b5c132a3f0d3b7c024ae98f0ace07c04d32cf73
[2/3] block: support PI at non-zero offset within metadata
      commit: 60d21aac52e26531affdadb7543fe5b93f58b450
[3/3] nvme: allow integrity when PI is not in first bytes
      commit: 921e81db524d17db683cc29aed7ff02f06ea3f96

Best regards,