Re: [PATCH v1] bcache: Split out crc64 to library

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2018/5/4 3:37 AM, Andy Shevchenko wrote:
> For generic use split out crc64 code to a separate module
> in the library folder.
> 
> No functional change intended.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>

Hi Andy,

I like the idea. So far a problem is endianness, bch_crc64() is for
on-disk format, which means it is always little endian, and lib/crc64.c
should not have such assumption. Further more, almost all the bcache
code assumes the processor is little endian, including the checksum
calculation.And the order to calculate and check checksum in bcache code
should be fixed as well. The result is, so far bcache does not work on
s390x.

What I can say is, after fix the endianness issue, maybe the code about
checksum will change a little bit. How about waiting for the big endian
support is finished, if you are still interested on libcrc64.c or
libcrc64.h, let's see how the fix will be ?

Thanks for your proposal.

Coly Li

> ---
>  drivers/md/bcache/Kconfig               |   1 +
>  drivers/md/bcache/bcache.h              |   2 +-
>  drivers/md/bcache/btree.c               |   2 +-
>  drivers/md/bcache/request.c             |   2 +-
>  drivers/md/bcache/super.c               |   4 +-
>  drivers/md/bcache/util.c                | 131 ----------
>  drivers/md/bcache/util.h                |   4 +-
>  include/linux/crc64.h                   |   9 +
>  lib/Kconfig                             |   8 +
>  lib/Makefile                            |   1 +
>  drivers/md/bcache/util.c => lib/crc64.c | 334 +-----------------------
>  11 files changed, 37 insertions(+), 461 deletions(-)
>  create mode 100644 include/linux/crc64.h
>  copy drivers/md/bcache/util.c => lib/crc64.c (50%)
> 
[code snipped]

--
To unsubscribe from this list: send the line "unsubscribe linux-bcache" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux ARM Kernel]     [Linux Filesystem Development]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux