linux-sg2042/include/linux/sunrpc
Linus Torvalds 7e0fb73c52 Merge branch 'hash' of git://ftp.sciencehorizons.net/linux
Pull string hash improvements from George Spelvin:
 "This series does several related things:

   - Makes the dcache hash (fs/namei.c) useful for general kernel use.

     (Thanks to Bruce for noticing the zero-length corner case)

   - Converts the string hashes in <linux/sunrpc/svcauth.h> to use the
     above.

   - Avoids 64-bit multiplies in hash_64() on 32-bit platforms.  Two
     32-bit multiplies will do well enough.

   - Rids the world of the bad hash multipliers in hash_32.

     This finishes the job started in commit 689de1d6ca ("Minimal
     fix-up of bad hashing behavior of hash_64()")

     The vast majority of Linux architectures have hardware support for
     32x32-bit multiply and so derive no benefit from "simplified"
     multipliers.

     The few processors that do not (68000, h8/300 and some models of
     Microblaze) have arch-specific implementations added.  Those
     patches are last in the series.

   - Overhauls the dcache hash mixing.

     The patch in commit 0fed3ac866 ("namei: Improve hash mixing if
     CONFIG_DCACHE_WORD_ACCESS") was an off-the-cuff suggestion.
     Replaced with a much more careful design that's simultaneously
     faster and better.  (My own invention, as there was noting suitable
     in the literature I could find.  Comments welcome!)

   - Modify the hash_name() loop to skip the initial HASH_MIX().  This
     would let us salt the hash if we ever wanted to.

   - Sort out partial_name_hash().

     The hash function is declared as using a long state, even though
     it's truncated to 32 bits at the end and the extra internal state
     contributes nothing to the result.  And some callers do odd things:

      - fs/hfs/string.c only allocates 32 bits of state
      - fs/hfsplus/unicode.c uses it to hash 16-bit unicode symbols not bytes

   - Modify bytemask_from_count to handle inputs of 1..sizeof(long)
     rather than 0..sizeof(long)-1.  This would simplify users other
     than full_name_hash"

  Special thanks to Bruce Fields for testing and finding bugs in v1.  (I
  learned some humbling lessons about "obviously correct" code.)

  On the arch-specific front, the m68k assembly has been tested in a
  standalone test harness, I've been in contact with the Microblaze
  maintainers who mostly don't care, as the hardware multiplier is never
  omitted in real-world applications, and I haven't heard anything from
  the H8/300 world"

* 'hash' of git://ftp.sciencehorizons.net/linux:
  h8300: Add <asm/hash.h>
  microblaze: Add <asm/hash.h>
  m68k: Add <asm/hash.h>
  <linux/hash.h>: Add support for architecture-specific functions
  fs/namei.c: Improve dcache hash function
  Eliminate bad hash multipliers from hash_32() and  hash_64()
  Change hash_64() return value to 32 bits
  <linux/sunrpc/svcauth.h>: Define hash_str() in terms of hashlen_string()
  fs/namei.c: Add hashlen_string() function
  Pull out string hash to <linux/stringhash.h>
2016-05-28 16:15:25 -07:00
..
addr.h SUNRPC: Drop double-underscores from __rpc_cmp_addr6() 2015-08-17 14:47:53 -05:00
auth.h SUNRPC: Ensure get_rpccred() and put_rpccred() can take NULL arguments 2016-05-17 15:48:06 -04:00
auth_gss.h sunrpc: remove __rcu annotation from struct gss_cl_ctx->gc_gss_ctx 2014-08-03 17:05:23 -04:00
bc_xprt.h SUNRPC: Abstract backchannel operations 2015-11-02 13:45:15 -05:00
cache.h sunrpc/cache: make cache flushing more reliable. 2015-10-23 15:57:30 -04:00
clnt.h sunrpc: Advertise maximum backchannel payload size 2016-05-17 15:47:57 -04:00
debug.h sunrpc: make debugfs file creation failure non-fatal 2015-04-23 14:42:27 -04:00
gss_api.h
gss_asn1.h
gss_err.h
gss_krb5.h sunrpc: Use skcipher and ahash/shash 2016-01-27 20:36:01 +08:00
gss_krb5_enctypes.h
metrics.h SUNRPC: Fix a compile error when #undef CONFIG_PROC_FS 2015-02-12 08:31:38 -05:00
msg_prot.h sunrpc: Update RPCBIND_MAXNETIDLEN 2016-05-17 15:47:56 -04:00
rpc_pipe_fs.h
rpc_rdma.h xprtrdma: Properly handle RDMA_ERROR replies 2016-03-14 14:55:59 -04:00
sched.h SUNRPC: Allow caller to specify the transport to use 2016-02-05 18:48:55 -05:00
stats.h
svc.h mm, fs: remove remaining PAGE_CACHE_* and page_cache_{get,release} usage 2016-04-04 10:41:08 -07:00
svc_rdma.h svcrdma: Generalize svc_rdma_xdr_decode_req() 2016-05-13 15:53:06 -04:00
svc_xprt.h sunrpc: Add a function to close temporary transports immediately 2015-12-23 10:08:15 -05:00
svcauth.h <linux/sunrpc/svcauth.h>: Define hash_str() in terms of hashlen_string() 2016-05-28 15:42:50 -04:00
svcauth_gss.h
svcsock.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-04-12 17:31:22 -07:00
timer.h
types.h
xdr.h rpc: define xdr_restrict_buflen 2014-05-30 17:32:01 -04:00
xprt.h sunrpc: Advertise maximum backchannel payload size 2016-05-17 15:47:57 -04:00
xprtmultipath.h SUNRPC: Add a structure to track multiple transports 2016-02-05 18:48:54 -05:00
xprtrdma.h xprtrdma: Bound the inline threshold values 2016-05-17 15:47:57 -04:00
xprtsock.h SUNRPC: Move TCP receive data path into a workqueue context 2015-10-08 08:27:04 -04:00