diff options
author | Brian Behlendorf <[email protected]> | 2011-11-11 14:50:15 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2011-11-11 14:50:48 -0800 |
commit | ca5fd24984624146ebd1460d7554f42b0572e45f (patch) | |
tree | ece8f00745d4562aa8748b86ea07daab2b690744 /lib | |
parent | 09559cdd150fa0b610dd4f816292fd90f50fd0cb (diff) |
Limit maximum ashift value to 12
While we initially allowed you to set your ashift as large as 17
(SPA_MAXBLOCKSIZE) that is actually unsafe. What wasn't considered
at the time is that each uberblock written to the vdev label ring
buffer will be of this size. Now the buffer is statically sized
to 128k and we need to be able to fit several uberblocks in it.
With a large ashift that becomes a problem.
Therefore I'm reducing the maximum configurable ashift value to 12.
This is large enough for the 4k sector drives and small enough that
we can still keep the most recent 32 uberblock in the vdev label
ring buffer.
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #425
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libzfs/libzfs_pool.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libzfs/libzfs_pool.c b/lib/libzfs/libzfs_pool.c index d95092d0e..9213101e4 100644 --- a/lib/libzfs/libzfs_pool.c +++ b/lib/libzfs/libzfs_pool.c @@ -443,7 +443,7 @@ zpool_valid_proplist(libzfs_handle_t *hdl, const char *poolname, goto error; } - if (intval != 0 && (intval < 9 || intval > 17)) { + if (intval != 0 && (intval < 9 || intval > 12)) { zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, "property '%s' number %d is invalid."), propname, intval); |