diff options
author | Matt Macy <mmacy@FreeBSD.org> | 2020-09-18 23:21:24 +0000 |
---|---|---|
committer | Matt Macy <mmacy@FreeBSD.org> | 2020-09-18 23:21:24 +0000 |
commit | 2c48331d28f16c0efce5a72a81e7d71668c4a158 (patch) | |
tree | 3b7c79252e9c0d269630439a5ef3e9b8a9f8cc3e /sys/contrib/openzfs/module/os/freebsd/zfs/vdev_file.c | |
parent | d8d2dda141c198a2e9863584e2e61566cc6b222d (diff) | |
parent | 04bab0082226f7e72c41ad528298c43edc3fa316 (diff) | |
download | src-test2-2c48331d28f16c0efce5a72a81e7d71668c4a158.tar.gz src-test2-2c48331d28f16c0efce5a72a81e7d71668c4a158.zip |
Notes
Diffstat (limited to 'sys/contrib/openzfs/module/os/freebsd/zfs/vdev_file.c')
-rw-r--r-- | sys/contrib/openzfs/module/os/freebsd/zfs/vdev_file.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/vdev_file.c b/sys/contrib/openzfs/module/os/freebsd/zfs/vdev_file.c index 4d27751c8893..cf762c5fd61c 100644 --- a/sys/contrib/openzfs/module/os/freebsd/zfs/vdev_file.c +++ b/sys/contrib/openzfs/module/os/freebsd/zfs/vdev_file.c @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, 2016 by Delphix. All rights reserved. + * Copyright (c) 2011, 2020 by Delphix. All rights reserved. */ #include <sys/zfs_context.h> @@ -40,6 +40,9 @@ static taskq_t *vdev_file_taskq; +unsigned long vdev_file_logical_ashift = SPA_MINBLOCKSHIFT; +unsigned long vdev_file_physical_ashift = SPA_MINBLOCKSHIFT; + void vdev_file_init(void) { @@ -167,8 +170,8 @@ skip_open: } *max_psize = *psize = zfa.zfa_size; - *logical_ashift = SPA_MINBLOCKSHIFT; - *physical_ashift = SPA_MINBLOCKSHIFT; + *logical_ashift = vdev_file_logical_ashift; + *physical_ashift = vdev_file_physical_ashift; return (0); } @@ -326,3 +329,8 @@ vdev_ops_t vdev_disk_ops = { }; #endif + +ZFS_MODULE_PARAM(zfs_vdev_file, vdev_file_, logical_ashift, ULONG, ZMOD_RW, + "Logical ashift for file-based devices"); +ZFS_MODULE_PARAM(zfs_vdev_file, vdev_file_, physical_ashift, ULONG, ZMOD_RW, + "Physical ashift for file-based devices"); |