mbox series

[GIT,PULL] Support for 64-bit data integrity

Message ID 37e3c459-0de0-3d23-11d2-7d7d39e5e941@kernel.dk (mailing list archive)
State New, archived
Headers show
Series [GIT,PULL] Support for 64-bit data integrity | expand

Pull-request

git://git.kernel.dk/linux-block.git tags/for-5.18/64bit-pi-2022-03-25

Message

Jens Axboe March 25, 2022, 3:18 p.m. UTC
Hi Linus,

This pull request adds support for 64-bit data integrity in the block
layer and in NVMe.

For avoiding conflicts, this was layered on top of the write streams
removal pull request that was just sent.

Please pull!

The following changes since commit c75e707fe1aab32f1dc8e09845533b6542d9aaa9:

  block: remove the per-bio/request write hint (2022-03-07 12:45:57 -0700)

are available in the Git repository at:

  git://git.kernel.dk/linux-block.git tags/for-5.18/64bit-pi-2022-03-25

for you to fetch changes up to 1e21270685ae4c14361dd501da62cdc4be867d4e:

  crypto: fix crc64 testmgr digest byte order (2022-03-22 19:44:29 -0600)

----------------------------------------------------------------
for-5.18/64bit-pi-2022-03-25

----------------------------------------------------------------
Jens Axboe (4):
      Merge branch 'for-5.18/block' into for-5.18/64bit-pi
      Merge branch 'for-5.18/drivers' into for-5.18/64bit-pi
      Merge branch 'for-5.18/alloc-cleanups' into for-5.18/64bit-pi
      Merge branch 'for-5.18/write-streams' into for-5.18/64bit-pi

Keith Busch (9):
      block: support pi with extended metadata
      nvme: allow integrity on extended metadata formats
      asm-generic: introduce be48 unaligned accessors
      linux/kernel: introduce lower_48_bits function
      lib: add rocksoft model crc64
      crypto: add rocksoft 64b crc guard tag framework
      block: add pi for extended integrity
      nvme: add support for enhanced metadata
      crypto: fix crc64 testmgr digest byte order

 block/Kconfig                   |   1 +
 block/bio-integrity.c           |   1 +
 block/t10-pi.c                  | 198 +++++++++++++++++++++++++++++++++++++++-
 crypto/Kconfig                  |   5 +
 crypto/Makefile                 |   1 +
 crypto/crc64_rocksoft_generic.c |  89 ++++++++++++++++++
 crypto/testmgr.c                |   7 ++
 crypto/testmgr.h                |  15 +++
 drivers/nvme/host/core.c        | 165 +++++++++++++++++++++++++++------
 drivers/nvme/host/nvme.h        |   4 +-
 include/asm-generic/unaligned.h |  26 ++++++
 include/linux/blk-integrity.h   |   1 +
 include/linux/crc64.h           |   7 ++
 include/linux/kernel.h          |   9 ++
 include/linux/nvme.h            |  53 +++++++++--
 include/linux/t10-pi.h          |  20 ++++
 lib/Kconfig                     |   9 ++
 lib/Makefile                    |   1 +
 lib/crc64-rocksoft.c            | 126 +++++++++++++++++++++++++
 lib/crc64.c                     |  28 ++++++
 lib/gen_crc64table.c            |  51 ++++++++---
 21 files changed, 770 insertions(+), 47 deletions(-)
 create mode 100644 crypto/crc64_rocksoft_generic.c
 create mode 100644 lib/crc64-rocksoft.c

Comments

Linus Torvalds March 26, 2022, 7:14 p.m. UTC | #1
On Fri, Mar 25, 2022 at 8:18 AM Jens Axboe <axboe@kernel.dk> wrote:
>
> This pull request adds support for 64-bit data integrity in the block
> layer and in NVMe.

I've pulled this, but people - please don't do silly things like this:

> Keith Busch (9):
>       linux/kernel: introduce lower_48_bits function

There is *NO* excuse for adding this completely trivial and pointless
function to a core kernel header file.

It isn't generic enough to make sense. "48" just isn't a common enough number.

Maybe

It isn't *complex* enough to make sense.

It isn't even clarifying the code.

Honestly, the advantage of writing

        seed = lower_48_bits(iter->seed);

over just writing it out the usual way, or using one of our existing
helpers like

        seed = iter->seed & GENMASK_ULL(47,0);

is just not there.

And it damn well shouldn't be in some <linux/kernel.h> header file. If
you ABSOLUTELY need to have it, put it in some NVMe-specific header
file where it (maybe) belongs.
Linus Torvalds March 26, 2022, 7:16 p.m. UTC | #2
On Sat, Mar 26, 2022 at 12:14 PM Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> It isn't generic enough to make sense. "48" just isn't a common enough number.
>
> Maybe

This got sent out early by mistake. That "Maybe" was supposed to continue

  Maybe a generic mask implementation could be useful, but not this
special case.

or similar.

           Linus
pr-tracker-bot@kernel.org March 26, 2022, 8:18 p.m. UTC | #3
The pull request you sent on Fri, 25 Mar 2022 09:18:35 -0600:

> git://git.kernel.dk/linux-block.git tags/for-5.18/64bit-pi-2022-03-25

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/3f7282139fe1594be464b90141d56738e7a0ea8a

Thank you!