fs_locations: replica information from /etc/exports reaches kernel only sporadically

Fredric Isaman iisaman at citi.umich.edu
Thu Aug 24 08:17:29 EDT 2006


On Thu, 24 Aug 2006, Andre van Hoorn wrote:

> Hi,
>
>
> Since the current CITI NFSv4 patches support the FS_LOCATIONS attribute
> I'd like to use the existing functionality for my replication application.
>
> Unfortunately, I couldn't retrace the way (and when) the information
> flows from /etc/exports via exportfs and mountd into the nfsd kernel module:
>
> I specified the following export with replicas in /etc/exports:
> /export  *(rw,fsid=0,insecure,no_subtree_check,replicas="/@192.168.0.1")
>
> The replica information is parsed by exportfs but doesn't reach the
> kernel in /fs/nfsd/export.c:svc_export_parse(struct cache_detail *cd,
> char *mesg, int mlen) where I expect the string 'mesg' to end with
> "fsloc 1 192.168.0.1 / 0" each time .
>

Try the following patch:

--- nfs-utils-1.0.10/utils/mountd/cache.c.orig	2006-08-24 08:13:44.244404000 -0400
+++ nfs-utils-1.0.10/utils/mountd/cache.c	2006-08-24 08:14:16.078972000 -0400
@@ -395,6 +395,7 @@ void cache_export_ent(char *domain, stru
 	qword_printint(f, exp->e_anonuid);
 	qword_printint(f, exp->e_anongid);
 	qword_printint(f, exp->e_fsid);
+	write_fsloc(f, exp, exp->e_path);
 	qword_eol(f);

 	fclose(f);


More information about the NFSv4 mailing list