mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
libzfs: handle EDOM error in zpool_create
When creating a pool with devices that have incompatible block sizes, the kernel returns EDOM. However, zpool_create() did not handle this errno, falling through to zpool_standard_error() which produced a confusing message about invalid property values. Add a case EDOM handler in zpool_create() to return EZFS_BADDEV with a descriptive auxiliary message, consistent with the existing EDOM handler in zpool_vdev_add(). Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Christos Longros <chris.longros@gmail.com> Closes #18268
This commit is contained in:
@@ -420,7 +420,7 @@ tests = ['zpool_create_001_pos', 'zpool_create_002_pos',
|
||||
'zpool_create_017_neg', 'zpool_create_018_pos', 'zpool_create_019_pos',
|
||||
'zpool_create_020_pos', 'zpool_create_021_pos', 'zpool_create_022_pos',
|
||||
'zpool_create_023_neg', 'zpool_create_024_pos',
|
||||
'zpool_create_encrypted', 'zpool_create_crypt_combos',
|
||||
'zpool_create_encrypted', 'zpool_create_edom_neg', 'zpool_create_crypt_combos',
|
||||
'zpool_create_draid_001_pos', 'zpool_create_draid_002_pos',
|
||||
'zpool_create_draid_003_pos', 'zpool_create_draid_004_pos',
|
||||
'zpool_create_features_001_pos', 'zpool_create_features_002_pos',
|
||||
|
||||
@@ -270,7 +270,7 @@ tests = ['zpool_create_001_pos', 'zpool_create_002_pos',
|
||||
'zpool_create_012_neg', 'zpool_create_014_neg', 'zpool_create_015_neg',
|
||||
'zpool_create_017_neg', 'zpool_create_018_pos', 'zpool_create_019_pos',
|
||||
'zpool_create_020_pos', 'zpool_create_021_pos', 'zpool_create_022_pos',
|
||||
'zpool_create_encrypted',
|
||||
'zpool_create_encrypted', 'zpool_create_edom_neg',
|
||||
'zpool_create_features_001_pos', 'zpool_create_features_002_pos',
|
||||
'zpool_create_features_003_pos', 'zpool_create_features_004_neg',
|
||||
'zpool_create_features_005_pos']
|
||||
|
||||
Reference in New Issue
Block a user