From: Jeff Layton Date: Thu, 27 Sep 2007 10:54:04 +0000 (-0400) Subject: rpc.mountd: add new mode for handling netgroup-heavy configurations X-Git-Tag: nfs-utils-1-1-1~36 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;ds=sidebyside;h=7a042b78ba064a36d1c7de797d2af796212fca2e;hp=7a042b78ba064a36d1c7de797d2af796212fca2e;p=nfs-utils.git rpc.mountd: add new mode for handling netgroup-heavy configurations If a host is a member of a large number of netgroups, it becomes easily possible for client_compose to generate a m_hostname string that overflows the maximum string length allowed by the kernel caches. This patch adds a new mode for mountd where it will map IP address to IP address in the auth.unix.ip cache. When this enabled, mountd doesn't bother using client_compose to build the m_hostname string. It just populates it with the dotted-quad ip address. When mountd handles a mount request, it then has an IP address and a path. It then calls client_check to check the host against export entries where the path has already matched. Since we don't bother looking up netgroups which have no relation to the mount, this can be a big performance gain in netgroup-heavy configurations. The downside is that every host has a corresponding entry in the nfsd.export and nfsd.fh caches as well as the auth.unix.ip cache. The new behavior is automatically enabled if the length of all of the concatenated netgroup names in the export table is longer than half NFSCLNT_IDMAX. The rationale for this logic is that this should allow for a host to be a member of a long list of netgroups while still allowing for other matches. Signed-off-by: Jeff Layton Acked-by: Steve Dickson Signed-off-by: Neil Brown ---