diff options
author | Richard Weinberger <richard@nod.at> | 2016-11-11 22:46:06 +0300 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2016-12-13 01:07:38 +0300 |
commit | 528e3d178f257e36001345d4d61ae5af35422017 (patch) | |
tree | 6ad691850c8ab01965cc3b556b746b1828efb002 /arch | |
parent | b91dc9816e5cd684b0d131fe6ec608a99bfbe3ee (diff) | |
download | linux-528e3d178f257e36001345d4d61ae5af35422017.tar.xz |
ubifs: Add full hash lookup support
UBIFS stores a 32bit hash of every file, for traditional lookups by name
this scheme is fine since UBIFS can first try to find the file by the
hash of the filename and upon collisions it can walk through all entries
with the same hash and do a string compare.
When filesnames are encrypted fscrypto will ask the filesystem for a
unique cookie, based on this cookie the filesystem has to be able to
locate the target file again. With 32bit hashes this is impossible
because the chance for collisions is very high. Do deal with that we
store a 32bit cookie directly in the UBIFS directory entry node such
that we get a 64bit cookie (32bit from filename hash and the dent
cookie). For a lookup by hash UBIFS finds the entry by the first 32bit
and then compares the dent cookie. If it does not match, it has to do a
linear search of the whole directory and compares all dent cookies until
the correct entry is found.
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions