Skip to content

add crc64 calculation as kernel library

Coly Li linux-bcache linux-block lkml 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest2 patches 3 repliesIn review
  2. v43 patches 11 repliesSuperseded
  3. v33 patches 16 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v23 patches4 repliesSuperseded

Changelog from the cover letter

v5: Remove test_crc patch from this series, it will be another separated
patch set. Fixes review comments from v4.
v4: Only keep crc64_be() in lib/crc64.c, tested bcache specific stuffs
moved back to bcache code.
Fixes all review comments of v3.
v3: Remove little endian restriction and remove 'le' from function names.
Fixes all review comments of v2
v2: Combine first two patches into one
Fixes all review comments of v1
v1: Initial version.

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2lib: add crc64 calculation routinesinclude/linux/crc64.h lib/.gitignore lib/Kconfig +3 more+156 -03 replies
2/2bcache: use routines from lib/crc64.c for CRC64 calculationdrivers/md/bcache/Kconfig drivers/md/bcache/util.c drivers/md/bcache/util.h+18 -1350 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchHannes ReineckeAndy ShevchenkoColy Li
1/2R-b A-b
2/2R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v5 thread

Cover letter [PATCH v5 0/2] add crc64 calculation as kernel library

This patch set adds basic implementation of crc64 calculation as Linux kernel library. Since bcache already does crc64 by itself, this patch set also modifies bcache code to use the new crc64 library routine.

Currently bcache is the only user of crc64 calculation, another potential user is bcachefs which is on the way to be in mainline kernel. Therefore it makes sense to make crc64 calculation to be a public library.

CRC calculation consistency testing is not trvial, it will be another separated patch set and not in this series any more.

Coly Li

Cc Andy Shevchenko <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Michael Lyle <[email protected]>
Cc Kent Overstreet <[email protected]>
Cc Kate Stewart <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Randy Dunlap <[email protected]>
Cc Eric Biggers <[email protected]>

---
Changelog:
v5: Remove test_crc patch from this series, it will be another separated
patch set. Fixes review comments from v4.
v4: Only keep crc64_be() in lib/crc64.c, tested bcache specific stuffs
moved back to bcache code.
Fixes all review comments of v3.
v3: Remove little endian restriction and remove 'le' from function names.
Fixes all review comments of v2
v2: Combine first two patches into one
Fixes all review comments of v1
v1: Initial version.

Coly Li (2):
lib: add crc64 calculation routines
bcache: use routines from lib/crc64.c for CRC64 calculation

 drivers/md/bcache/Kconfig |   1 +
 drivers/md/bcache/util.c  | 131 --------------------------------------
 drivers/md/bcache/util.h  |  21 ++++--
 include/linux/crc64.h     |  11 ++++
 lib/.gitignore            |   2 +
 lib/Kconfig               |   8 +++
 lib/Makefile              |  11 ++++
 lib/crc64.c               |  56 ++++++++++++++++
 lib/gen_crc64table.c      |  68 ++++++++++++++++++++
 9 files changed, 174 insertions(+), 135 deletions(-)
 create mode 100644 include/linux/crc64.h
 create mode 100644 lib/crc64.c
 create mode 100644 lib/gen_crc64table.c
Signature · 1 line
2.17.1