HomeFreeBSD

Remove vn_set_fs_pwd()/vn_set_pwd() (no need to be at / during insmod)

Description

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

Details

Provenance
kusumi.tomohiro_gmail.comAuthored on May 29 2019, 11:18 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on May 29 2019, 11:18 PM
Parents
rG1e724f4f3464: Exclude log device ashift from normal class
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rGfe0c9f409a19: Remove vn_set_fs_pwd()/vn_set_pwd() (no need to be at / during insmod) (authored by Tomohiro Kusumi <kusumi.tomohiro@gmail.com>).May 29 2019, 11:18 PM