diff options
author | Jeff Layton <jlayton@redhat.com> | 2007-05-09 10:19:33 -0400 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2007-05-11 13:33:56 +1000 |
commit | fd9097110f74f39bce89ec3a341fd9b686a68719 (patch) | |
tree | 3cae6aad996e95b0436770d97ef0e1bda1a4119d /support/export/xtab.c | |
parent | 89fb5a45d2020aaee203dd9016d98c3ff9d9f991 (diff) | |
download | nfs-utils-fd9097110f74f39bce89ec3a341fd9b686a68719.tar.gz nfs-utils-fd9097110f74f39bce89ec3a341fd9b686a68719.tar.xz nfs-utils-fd9097110f74f39bce89ec3a341fd9b686a68719.zip |
nfs-utils: have mountd hold open etab file to force inode number to change
This patch changes mountd to hold the etab file open so that when it's
changed by exportfs, the inode number should change. We then change
auth_reload to reload the file based on whether st_ino is different
from the last time it was checked. It also changes auth_reload to
maintain a static counter value and return it instead of a timestamp
and fixes up get_exportlist accordingly. Finally, it adds some
comments to xtab_write to warn people about editing the etab in place.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'support/export/xtab.c')
-rw-r--r-- | support/export/xtab.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/support/export/xtab.c b/support/export/xtab.c index 0ddb251..292087b 100644 --- a/support/export/xtab.c +++ b/support/export/xtab.c @@ -80,6 +80,12 @@ xtab_export_read(void) return xtab_read(_PATH_ETAB, 1); } +/* + * mountd now keeps an open fd for the etab at all times to make sure that the + * inode number changes when the xtab_export_write is done. If you change the + * routine below such that the files are edited in place, then you'll need to + * fix the auth_reload logic as well... + */ static int xtab_write(char *xtab, char *xtabtmp, int is_export) { |