diff options
author | Ben Myers <bpm@sgi.com> | 2009-04-03 15:13:10 -0400 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2009-04-03 15:13:10 -0400 |
commit | f0ed8401e854e1cbd23b2fb5dca5e88dec2df7c4 (patch) | |
tree | e525bec15e10a3c984dbc6b26b075a7433e0d417 /support/include | |
parent | c56152202a3000c69b87f9cb90f40166f1f21275 (diff) | |
download | nfs-utils-f0ed8401e854e1cbd23b2fb5dca5e88dec2df7c4.tar.gz nfs-utils-f0ed8401e854e1cbd23b2fb5dca5e88dec2df7c4.tar.xz nfs-utils-f0ed8401e854e1cbd23b2fb5dca5e88dec2df7c4.zip |
Mountd should use separate lockfiles
Mountd keeps file descriptors used for locks separate from
those used for io and seems to assume that the lock will
only be released on close of the file descriptor that was used
with fcntl. Actually the lock is released when any file
descriptor for that file is closed. When setexportent() is called
after xflock() he closes and reopens the io file descriptor and defeats the
lock.
This patch fixes that by using a separate file for locking, cleaning
them up when finished.
Signed-off-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'support/include')
-rw-r--r-- | support/include/nfslib.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/support/include/nfslib.h b/support/include/nfslib.h index a51d79d..9d0d39d 100644 --- a/support/include/nfslib.h +++ b/support/include/nfslib.h @@ -34,18 +34,27 @@ #ifndef _PATH_XTABTMP #define _PATH_XTABTMP NFS_STATEDIR "/xtab.tmp" #endif +#ifndef _PATH_XTABLCK +#define _PATH_XTABLCK NFS_STATEDIR "/.xtab.lock" +#endif #ifndef _PATH_ETAB #define _PATH_ETAB NFS_STATEDIR "/etab" #endif #ifndef _PATH_ETABTMP #define _PATH_ETABTMP NFS_STATEDIR "/etab.tmp" #endif +#ifndef _PATH_ETABLCK +#define _PATH_ETABLCK NFS_STATEDIR "/.etab.lock" +#endif #ifndef _PATH_RMTAB #define _PATH_RMTAB NFS_STATEDIR "/rmtab" #endif #ifndef _PATH_RMTABTMP #define _PATH_RMTABTMP _PATH_RMTAB ".tmp" #endif +#ifndef _PATH_RMTABLCK +#define _PATH_RMTABLCK NFS_STATEDIR "/.rmtab.lock" +#endif #ifndef _PATH_PROC_EXPORTS #define _PATH_PROC_EXPORTS "/proc/fs/nfs/exports" #define _PATH_PROC_EXPORTS_ALT "/proc/fs/nfsd/exports" |