18 Aug, 2014

1 commit


03 Jan, 2014

1 commit


03 Apr, 2013

1 commit


09 Feb, 2013

1 commit

  • Now that we're allowing more DRC entries, it becomes a lot easier to hit
    problems with XID collisions. In order to mitigate those, calculate a
    checksum of up to the first 256 bytes of each request coming in and store
    that in the cache entry, along with the total length of the request.

    This initially used crc32, but Chuck Lever and Jim Rees pointed out that
    crc32 is probably more heavyweight than we really need for generating
    these checksums, and recommended looking at using the same routines that
    are used to generate checksums for IP packets.

    On an x86_64 KVM guest measurements with ftrace showed ~800ns to use
    csum_partial vs ~1750ns for crc32. The difference probably isn't
    terribly significant, but for now we may as well use csum_partial.

    Signed-off-by: Jeff Layton
    Stones-thrown-by: Chuck Lever
    Signed-off-by: J. Bruce Fields

    Jeff Layton
     

04 Feb, 2013

3 commits

  • Add a preprocessor constant for the expiry time of cache entries, and
    move the test for an expired entry into a function. Note that the current
    code does not test for RC_INPROG. It just assumes that it won't take more
    than 2 minutes to fill out an in-progress entry.

    I'm not sure how valid that assumption is though, so let's just ensure
    that we never consider an RC_INPROG entry to be expired.

    Signed-off-by: Jeff Layton
    Signed-off-by: J. Bruce Fields

    Jeff Layton
     
  • The reply cache code never returns this status.

    Signed-off-by: Jeff Layton
    Signed-off-by: J. Bruce Fields

    Jeff Layton
     
  • Currently, it only stores the first 16 bytes of any address. struct
    sockaddr_in6 is 28 bytes however, so we're currently ignoring the last
    12 bytes of the address.

    Expand the c_addr field to a sockaddr_in6, and cast it to a sockaddr_in
    as necessary. Also fix the comparitor to use the existing RPC
    helpers for this.

    Signed-off-by: Jeff Layton
    Signed-off-by: J. Bruce Fields

    Jeff Layton
     

18 Jul, 2011

1 commit

  • It's sort of ridiculous that we've never had a working reply cache for
    NFSv4.

    On the other hand, we may still not: our current reply cache is likely
    not very good, especially in the TCP case (which is the only case that
    matters for v4). What we really need here is some serious testing.

    Anyway, here's a start.

    Signed-off-by: J. Bruce Fields

    J. Bruce Fields
     

16 Dec, 2009

1 commit


15 Dec, 2009

1 commit