summaryrefslogtreecommitdiffstats
path: root/sys/cddl/boot
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2014-12-22 20:58:51 +0000
committerdelphij <delphij@FreeBSD.org>2014-12-22 20:58:51 +0000
commit1ad38ed4f01c38401f2c15151edbcfab81168db1 (patch)
treebf517de79b70790f455a71edd81bb6303f96f90e /sys/cddl/boot
parentaf2ee162da52913fdefa6d0ffae3644e39a3b369 (diff)
downloadFreeBSD-src-1ad38ed4f01c38401f2c15151edbcfab81168db1.zip
FreeBSD-src-1ad38ed4f01c38401f2c15151edbcfab81168db1.tar.gz
MFC r274337,r274673,274681,r275515:
ZFS large block support. The default recordsize remains at 128KB. A new tunable/sysctl variable, vfs.zfs.max_recordsize is added to allow adjusting the permitted maximum record size, or zfs_max_recordsize, with a default of 1MB. ZFS will not allow setting recordsize greater than zfs_max_recordsize as a safety belt, because larger recordsize means greater read and write latency and more memory usage. Please note that booting from datasets that have recordsize greater than 128KB is not supported (but it's Okay to enable the feature on the pool). Limited safety belt is provided for mounted root filesystem but use caution when using a larger value. Illumos issue: 5027 zfs large block support
Diffstat (limited to 'sys/cddl/boot')
-rw-r--r--sys/cddl/boot/zfs/zfsimpl.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/cddl/boot/zfs/zfsimpl.h b/sys/cddl/boot/zfs/zfsimpl.h
index 5f2e255..730cdf4 100644
--- a/sys/cddl/boot/zfs/zfsimpl.h
+++ b/sys/cddl/boot/zfs/zfsimpl.h
@@ -113,17 +113,14 @@
#define BSWAP_64(x) ((BSWAP_32(x) << 32) | BSWAP_32((x) >> 32))
/*
- * We currently support nine block sizes, from 512 bytes to 128K.
- * We could go higher, but the benefits are near-zero and the cost
- * of COWing a giant block to modify one byte would become excessive.
+ * Note: the boot loader can't actually read blocks larger than 128KB,
+ * due to lack of memory. Therefore its SPA_MAXBLOCKSIZE is still 128KB.
*/
#define SPA_MINBLOCKSHIFT 9
#define SPA_MAXBLOCKSHIFT 17
#define SPA_MINBLOCKSIZE (1ULL << SPA_MINBLOCKSHIFT)
#define SPA_MAXBLOCKSIZE (1ULL << SPA_MAXBLOCKSHIFT)
-#define SPA_BLOCKSIZES (SPA_MAXBLOCKSHIFT - SPA_MINBLOCKSHIFT + 1)
-
/*
* The DVA size encodings for LSIZE and PSIZE support blocks up to 32MB.
* The ASIZE encoding should be at least 64 times larger (6 more bits)
OpenPOWER on IntegriCloud