mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
Remove vn_set_fs_pwd()/vn_set_pwd() (no need to be at / during insmod)
Per suggestion from @behlendorf in #8777, remove vn_set_fs_pwd() and vn_set_pwd() which are only used in zfs_ioctl.c:_init() while loading zfs.ko. The rest of initialization functions being called here after cwd set to / don't depend on cwd of the process except for spa_config_load(). spa_config_load() uses a relative path ".//etc/zfs/zpool.cache" when `rootdir` is non-NULL, which is "/etc/zfs/zpool.cache" given cwd is /, so just unconditionally use the absolute path without "./", so that `vn_set_pwd("/")` as well as the entire functions can be removed. This is also what FreeBSD does. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@osnexus.com> Closes #8826
This commit is contained in:
committed by
Brian Behlendorf
parent
1e724f4f34
commit
fe0c9f409a
@@ -1,24 +0,0 @@
|
||||
dnl #
|
||||
dnl # 2.6.36 API change,
|
||||
dnl # The 'struct fs_struct->lock' was changed from a rwlock_t to
|
||||
dnl # a spinlock_t to improve the fastpath performance.
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_FS_STRUCT_SPINLOCK], [
|
||||
AC_MSG_CHECKING([whether struct fs_struct uses spinlock_t])
|
||||
tmp_flags="$EXTRA_KCFLAGS"
|
||||
EXTRA_KCFLAGS="-Werror"
|
||||
ZFS_LINUX_TRY_COMPILE([
|
||||
#include <linux/sched.h>
|
||||
#include <linux/fs_struct.h>
|
||||
],[
|
||||
static struct fs_struct fs;
|
||||
spin_lock_init(&fs.lock);
|
||||
],[
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_FS_STRUCT_SPINLOCK, 1,
|
||||
[struct fs_struct uses spinlock_t])
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
EXTRA_KCFLAGS="$tmp_flags"
|
||||
])
|
||||
@@ -12,7 +12,6 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [
|
||||
ZFS_AC_KERNEL_CTL_NAME
|
||||
ZFS_AC_KERNEL_PDE_DATA
|
||||
ZFS_AC_KERNEL_2ARGS_VFS_FSYNC
|
||||
ZFS_AC_KERNEL_FS_STRUCT_SPINLOCK
|
||||
ZFS_AC_KERNEL_KUIDGID_T
|
||||
ZFS_AC_KERNEL_FALLOCATE
|
||||
ZFS_AC_KERNEL_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE
|
||||
|
||||
Reference in New Issue
Block a user