diff options
author | David Howells <dhowells@redhat.com> | 2021-10-20 16:45:28 +0200 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2022-01-07 10:22:19 +0100 |
commit | e8a07c9d22afdace966353231d0273d29efe0890 (patch) | |
tree | 05ac1f37dc2a4d0c699e34cf00e44796169f2c16 /arch/sh/configs/kfr2r09-romimage_defconfig | |
parent | fscache: Introduce new driver (diff) | |
download | linux-e8a07c9d22afdace966353231d0273d29efe0890.tar.xz linux-e8a07c9d22afdace966353231d0273d29efe0890.zip |
fscache: Implement a hash function
Implement a function to generate hashes. It needs to be stable over time
and endianness-independent as the hashes will appear on disk in future
patches. It can assume that its input is a multiple of four bytes in size
and alignment.
This is borrowed from the VFS and simplified. le32_to_cpu() is added to
make it endianness-independent.
Changes
=======
ver #3:
- Read the data being hashed in an endianness-independent way[1].
- Change the size parameter to be in bytes rather than words.
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
cc: linux-cachefs@redhat.com
Link: https://lore.kernel.org/r/CAHk-=whtkzB446+hX0zdLsdcUJsJ=8_-0S1mE_R+YurThfUbLA@mail.gmail.com [1]
Link: https://lore.kernel.org/r/163819586113.215744.1699465806130102367.stgit@warthog.procyon.org.uk/ # v1
Link: https://lore.kernel.org/r/163906888735.143852.10944614318596881429.stgit@warthog.procyon.org.uk/ # v2
Link: https://lore.kernel.org/r/163967082342.1823006.8915671045444488742.stgit@warthog.procyon.org.uk/ # v3
Link: https://lore.kernel.org/r/164021493624.640689.9990442668811178628.stgit@warthog.procyon.org.uk/ # v4
Diffstat (limited to 'arch/sh/configs/kfr2r09-romimage_defconfig')
0 files changed, 0 insertions, 0 deletions