John,

I saw this putback fly by and was curious why ZFS wasn't touched,
so I looked into both this case and its predecessor, PSARC/2008/290.
I see now why ZFS is different, but I think it's quite possible
to make this work.

For folks who haven't followed this, a brief description: when you
have an iso file, it's really convenient to be able to just mount it.
But you can't mount a file, so before this putback it was a two-step
process:

    # lofiadm -a /my/iso                # creates /dev/lofi/1
    # mount -F hsfs /dev/lofi/1 /mnt    # access /my/iso via /mnt

With this wadlet, you can now omit the lofiadm step and just say:

    # mount -F hsfs /my/iso /mnt

Similarly with unmount -- you don't have to remember to lofiadm -d.

All well and good.  But this doesn't work with ZFS because you
can't just pass a raw device to zfs_mount().

However, I see no reason we couldn't make this work.  If you specify
a file or device to zfs_mount(), as indicated by a leading slash in
the "special" field, we could attempt to import to an alternate root
at the specified mountpoint.  Upon last unmount (there may be multiple
filesystems in the pool), we would automatically export the pool.

We will need read-only pool support to make read-only ZFS media
work this way, but of course that's already on our list.

What do you think, folks -- does this seem useful?
Can you see any reason why it's not as simple as I've described?

Jeff

On Wed, Jun 11, 2008 at 06:14:53PM -0700, John Levon wrote:
> Event:            putback-to
> Parent workspace: /ws/onnv-gate
>                   (elpaso:/ws/onnv-gate)
> Child workspace:  /net/hatchback/export/build/johnlev/onnv-lomount
>                   (hatchback:/export/build/johnlev/onnv-lomount)
> User:             johnlev
> 
> Comment:
> PSARC 2008/366 VSW_CANLOFI
> 6709611 PSARC 2008/366 VSW_CANLOFI
> 
> Files:
> update: usr/src/uts/common/fs/hsfs/hsfs_vfsops.c
> update: usr/src/uts/common/fs/pcfs/pc_vfsops.c
> update: usr/src/uts/common/fs/udfs/udf_vfsops.c
> update: usr/src/uts/common/fs/ufs/ufs_vfsops.c
> update: usr/src/uts/common/fs/vfs.c
> update: usr/src/uts/common/gssapi/gssd_clnt_stubs.c
> update: usr/src/uts/common/os/modctl.c
> update: usr/src/uts/common/sys/modctl.h
> update: usr/src/uts/common/sys/vfs.h
> update: usr/src/uts/sun4u/serengeti/io/ssm.c
> 
> Examined files: 10
> 
> Contents Summary:
>       10   update
> 

Reply via email to