mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
ZVOL: Make zvol_inhibit_dev module parameter platform-independent
The module parameter now is represented in FreeBSD sysctls list with name: 'vfs.zfs.vol.inhibit_dev'. The default value is '0', same as on Linux side. Sponsored-by: vStack, Inc. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <mav@FreeBSD.org> Reviewed-by: Rob Norris <rob.norris@klarasystems.com> Signed-off-by: Fedor Uporov <fuporov.vstack@gmail.com> Closes #17384
This commit is contained in:
@@ -1373,6 +1373,9 @@ zvol_os_create_minor(const char *name)
|
||||
int error;
|
||||
bool replayed_zil = B_FALSE;
|
||||
|
||||
if (zvol_inhibit_dev)
|
||||
return (0);
|
||||
|
||||
ZFS_LOG(1, "Creating ZVOL %s...", name);
|
||||
hash = zvol_name_hash(name);
|
||||
if ((zv = zvol_find_by_name_hash(name, hash, RW_NONE)) != NULL) {
|
||||
|
||||
@@ -1788,9 +1788,6 @@ zvol_fini(void)
|
||||
ida_destroy(&zvol_ida);
|
||||
}
|
||||
|
||||
module_param(zvol_inhibit_dev, uint, 0644);
|
||||
MODULE_PARM_DESC(zvol_inhibit_dev, "Do not create zvol device nodes");
|
||||
|
||||
module_param(zvol_major, uint, 0444);
|
||||
MODULE_PARM_DESC(zvol_major, "Major number for zvol device");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user