Re: [PATCH 2/2] NFS: Combine the idmapper key types

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

 



Myklebust, Trond <Trond.Myklebust@xxxxxxxxxx> wrote:

> > The NFS idmapper has two key types (normal and legacy) but should only use
> > one if it can - otherwise it risks having twice as many keys as it would
> > otherwise need.
> 
> Why is this? Do we add keys in the case where the 'normal' upcall fails?

Yes.  The idmapper code defines a second key type and uses the key_type
struct's .request_key() op to do its own thing (ie. upcall to a running
rpc.idmapd process).  The idmapper code, however, calls request_key*() to make
use of this, and that will create a new key.

If only the legacy idmapper is available, you will end up with two keys added
to the keyring for each operation, one of the 'normal' type and one of the
'legacy' type.

The 'normal' key will be negative, it is true, but it still takes up a slot
until the garbage collector eats it, and can displace an otherwise good key.

Negative keys are added to the keyring for a time set by their timeout to
limit the rate of key lookups.

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


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux