Skip to content

Commit

Permalink
Remove unconditional sharetab update
Browse files Browse the repository at this point in the history
Removes the unconditional sharetab update when running any zfs
command. This means the sharetab might become out of date if
users are manually adding/removing shares with exportfs.  But
we shouldn't punish all callers to zfs in order to handle that
unlikely case. In the unlikely event we observe issues because
of this it can always be added back to just the share/unshare
call paths where we need an up to date sharetab.

Signed-off-by: Brian Behlendorf <[email protected]>
Signed-off-by: Turbo Fredriksson <[email protected]>
Signed-off-by: Chris Dunlop <[email protected]>
Issue openzfs#845
  • Loading branch information
behlendorf committed Jan 7, 2014
1 parent e073066 commit 4dad7d9
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions lib/libshare/libshare.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,6 @@ libshare_init(void)
{
libshare_nfs_init();
libshare_smb_init();

/*
* This bit causes /etc/dfs/sharetab to be updated before libzfs gets a
* chance to read that file; this is necessary because the sharetab file
* might be out of sync with the NFS kernel exports (e.g. due to reboots
* or users manually removing shares)
*/
sa_fini(sa_init(0));
}

static void
Expand Down

0 comments on commit 4dad7d9

Please sign in to comment.