List Info

Thread: soc zfs: zvol & DK_XNAME_SIZE




soc zfs: zvol & DK_XNAME_SIZE
country flaguser name
United States
2007-07-26 10:08:47
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?

  - Oliver

Re: soc zfs: zvol & DK_XNAME_SIZE
user name
2007-07-26 10:33:56
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?

Joerg

Re: soc zfs: zvol & DK_XNAME_SIZE
country flaguser name
United States
2007-07-26 11: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/free
bsd-current/2007-April/070616.html

Re: soc zfs: zvol & DK_XNAME_SIZE
user name
2007-07-26 11:07:39
On Thu, Jul 26, 2007 at 12:04:56PM -0400, Oliver Gould
wrote:
> 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.

Well, wedges (and GPT partitions in detail) are currently
mapped to dkX
devices and those names are restricted by DK_XNAME_SIZE
AFAIK.

Joerg

Re: soc zfs: zvol & DK_XNAME_SIZE
country flaguser name
United Kingdom
2007-07-26 14:20:50
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?

You really don't want to be unconditionally allocating that
big a buffer....

	David

-- 
David Laight: davidl8s.co.uk

[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )