On Wed, May 18, 2011 at 11:19:37AM +0100, James Pearson wrote: > NeilBrown wrote: > > > >Unfortunately you cannot do that. > > > >The place in the code where this is determined is towards the end of > >'lookup_export' in utils/mountd/cache.c > > > >Were I to try to 'fix' this I would probably define a new field in 'struct > >exportent' which holds a 'priority'. > > > >Then allow a setting like "priority=4" in /etc/exports > > > >Then change the code in lookup_export to choose the one with the higher > >priority, rather than the 'first' one. > > > >NeilBrown > > I've hacked the source to make netgroups take precedence over > subnets by moving MCL_NETGROUP before MCL_SUBNETWORK in the enum in > support/include/exportfs.h - which works for me, as I only use > netgroups, subnets and anonymous (in that priority order). > > IMHO the priority of exports should really be as they appear on the > line in /etc/exports, Sounds reasonable to me. > but I guess if that were to change, it would > break existing /etc/exports that use the current priority ordering > (either by design or accident!). Maybe some new /etc/exports syntax could allow the administrator to opt into a new priority ordering. > Having a priority option would be a very good idea - and may be in > the meantime the exports man page should be updated with info about > the current priority ordering? Sounds good. Could you send in a patch? --b. -- 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