Subject: Re: soc zfs: zvol & DK_XNAME_SIZE
To: None <tech-kern@netbsd.org>
From: Oliver Gould <ogould@olix0r.net>
List: tech-kern
Date: 07/26/2007 12:04:56
On 2007-07-26 17:33 -0500, Joerg Sonnenberger wrote:
> On Thu, Jul 26, 2007 at 11:08:47AM -0400, Oliver Gould wrote:
> > Hello-
> > 
> > ZFS allows emulated volumes (zvols) to have abritrary names of length
> > MAXPATHLEN.  In the dk_softc structure, however, the length of sc_xname
> > is capped at DK_XNAME_SIZE, which is currently defined at 8.
> > 
> > Is it reasonable to set DK_XNAME_SIZE to MAXPATHLEN to accommodate
> > ZVOLs?
> 
> Aren't you confusing dkwedge_softc's sc_wname with the *device* name?

I don't think so.

Volume (device) names are intended to be descriptive (from [1]):

  # zpool create tank raidz da0 da1 da2
  # zfs create -V 10g tank/ufs

  # newfs /dev/zvol/tank/ufs
               ^^^^^^^^^^^^^
  # mount /dev/zvol/tank/ufs /ufs
               ^^^^^^^^^^^^^

  - Oliver

[1] http://lists.freebsd.org/pipermail/freebsd-current/2007-April/070616.html