Skip to content

NAME_ERR_DISKLIKE is Solaris specific in module/zcommon/zfs_namecheck.c #11781

Closed
@blastwave

Description

@blastwave
Looking at module/zcommon/zfs_namecheck.c at line 453 we see :

   453    if (pool[0] == 'c' && (pool[1] >= '0' && pool[1] <= '9')) {
   454        if (why)
   455            *why = NAME_ERR_DISKLIKE;
   456        return (-1);
   457    }

The end result is that zpool create with a name like "c0" fails for 
no valid reason.  Certainly on FreeBSD this has been an issue for some
time now : 

    ZFS NAME_ERR_DISKLIKE check is Solaris-specific
    https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=159356

Should be a trivial fix. 

The alternative would be a pile of ifdef and checking for things like
ada0 and da0 and sda0.  Perhaps these days are in the distant history
and the error NAME_ERR_DISKLIKE may not be reasonable anymore.


-- 
Dennis Clarke
RISC-V/SPARC/PPC/ARM/CISC
UNIX and Linux spoken
GreyBeard and suspenders optional

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: DefectIncorrect behavior (e.g. crash, hang)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions