Project

General

Profile

Actions

Bug #6298

closed

zfs_create_008_neg and zpool_create_023_neg need to be updated for large block support

Added by Matthew Ahrens about 8 years ago. Updated about 8 years ago.

Status:
Closed
Priority:
Normal
Category:
zfs - Zettabyte File System
Start date:
2015-10-07
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:
External Bug:

Description

The two aforementioned tests have a list of invalid argument combinations to zfs create and zpool create, respectively. One of these used to be "-o recordsize=256K" (twice the maximum allowed block size). However, we now support blocks up and including 1024K.
Unfortunately, even after updating to "-o recordsize=2048K" (and "-o recordsize=2M"), the test suite failed because ioctl calls raised unhandled errors (specifically ERANGE).
Upon further investigation, zfs_create didn't pass a zfs handle to zfs_valid_proplist, which prevented the latter from validating the provided blocksize more strictly than SPA_MINBLOCKSIZE<=specified blocksize<=SPA_MAXBLOCKSIZE (using zpool_get_prop_int). Since various other parts of the function depend on the absence or presence of said zfs handle, the signature of zfs_valid_proplist was modified to accept a zpool handle separately from the zfs handle.
Furthermore, zpool_create can't use zpool_get_prop_int to validate the blocksize param, because the zpool is not created yet, so it has no properties, e.g. max blocksize, to use for validation. The best way to detect if an invalid blocksize was specified is, for better or for worse, to handle an ERANGE error from the ioctl call which creates the pool (ZFS_IOC_POOL_CREATE).

Actions #1

Updated by Electric Monk about 8 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit e9316f7696401f3e5e263a5939031cb8d5641a88

commit  e9316f7696401f3e5e263a5939031cb8d5641a88
Author: Joe Stein <joe.stein@delphix.com>
Date:   2015-10-13T04:44:25.000Z

    6298 zfs_create_008_neg and zpool_create_023_neg need to be updated for large block support
    Reviewed by: Matthew Ahrens <mahrens@delphix.com>
    Reviewed by: John Kennedy <john.kennedy@delphix.com>
    Approved by: Robert Mustacchi <rm@joyent.com>

Actions

Also available in: Atom PDF