libexport.a: xtab.c no longer needs #include xmalloc.h Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
exports: turn on pseudo exports If a pseudo root is not defined in the export file, the v4root_needed global variable will be set, signaling v4root_set() create the dynamic pseudo root. Signed-off-by: Steve Dickson <steved@redhat.com>
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>
Exportfs and rpc.mountd optimalization There were some problems with exportfs and rpc.mountd for long export lists - see https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=76643 I do optimalization as my bachelors thesis (Facuulty of informatics, Masaryk's university Brno, Czech Republic), under lead of Yenya Kasprzak. Both exportfs and rpc.mount build linked list of exports (shared functions in export.c). Every time they are inserting new export into list, they search for same export in list. I replaced linked list by hash table and functions export_add and export_lookup by functions hash_export_add and hash_export_lookup (export.c). Because some other functions required exportlist as linked list, hash table has some implementation modification im comparison with ordinary hash table. It also keeps exports in linked list and has pointer to head of the list. So there's no need of implementation function <for_all_in_hash_table>. Signed-off-by: Tomas Richter <krik3t@gmail.com> Signed-off-by: Steve Dickson <steved@redhat.com>
rpc.mountd: make exportent->e_hostname a dynamically-allocated string This makes the e_hostname field of the exportent into a pointer to a dynamically allocated string. This is necessary since this is field is often filled out from the m_hostname. This too adds a few micro-optimizations as we can avoid copying the string in some places and simply pass a pointer to the original string instead. Signed-off-by: Jeff Layton <jlayton@redhat.com> Acked-by: Steve Dickson <steved@redhat.com> Signed-off-by: Neil Brown <neilb@suse.de>
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>
Autogen update
/proc/fs/nfsd as an alternate to /proc/fs/nfsd
enhance exportfs to use new cache/upcall stuff
See Changelog
See Changelog
make "exportfs -au" do no DNS lookup
1/ be less trusting of information in /var/lib/nfs/xtab. Add things to kernel even if they are in here. 2/ O_CREAT [ex]log when locking for write incase they don't exist 3/ added etc/debian diretory with some files
2000-08-09 H.J. Lu <hjl@lucon.org> * etc/redhat/nfs.init: Run /usr/sbin/exportfs first during startup to ensure all existing clients work fine. * support/export/xtab.c (xtab_mount_read): Pass 1 instead of 0 to xtab_read () for reading _PATH_XTAB.
Initial revision