7167 lofi does mismanage size(9P) properties

Review Request #206 — Created July 3, 2016 and submitted

tsoome
illumos-gate
7167
general
7167 lofi does mismanage size(9P) properties

For lofi instance 1 the device- properties are added automatically by framework, and Nblocks/Size are added
by cmlb (only first minor is listed here). For instance 2 the Nblocks and Size are added by lofi driver.

        lofi, instance #1
            Driver properties:
                name='ddi-kernel-ioctl' type=boolean dev=none
                name='zone' type=string items=1 dev=none
                    value='global'
                name='labeled' type=boolean dev=none
                name='instance' type=int items=1 dev=none
                    value=00000001
                name='device-nblocks' type=int64 items=1 dev=none
                    value=0000000000200000
                name='device-blksize' type=int items=1 dev=none
                    value=00000200
                name='device-solid-state' type=int items=1 dev=none
                    value=00000000
            Device Minor Nodes:
                dev=(128,64)
                    dev_path=/pseudo/lofi@1:a
                        spectype=blk type=minor
                        dev_link=/dev/dsk/c0t1d0s0
                    dev_path=/pseudo/lofi@1:a,raw
                        spectype=chr type=minor
                        dev_link=/dev/rdsk/c0t1d0s0
                    Minor properties:
                        name='Nblocks' type=int64 items=1 dev=(128,64)
                            value=00000000001fbedf
                        name='Size' type=int64 items=1 dev=(128,64)
                            value=000000003f7dbe00                    

        lofi, instance #2
            Driver properties:
                name='ddi-kernel-ioctl' type=boolean dev=none
                name='zone' type=string items=1 dev=none
                    value='global'
                name='instance' type=int items=1 dev=none
                    value=00000002
            Device Minor Nodes:
                dev=(128,128)
                    dev_path=/pseudo/lofi@2:disk
                        spectype=blk type=minor
                        dev_link=/dev/lofi/2
                    dev_path=/pseudo/lofi@2:disk,raw
                        spectype=chr type=minor
                        dev_link=/dev/rlofi/2
                    Minor properties:
                        name='Nblocks' type=int64 items=1 dev=(128,128)
                            value=0000000000032000
                        name='Size' type=int64 items=1 dev=(128,128)
                            value=0000000006400000

root@beastie:~# zpool status test                                               
  pool: test
 state: ONLINE
  scan: none requested
config:

        NAME           STATE     READ WRITE CKSUM
        test           ONLINE       0     0     0
          c0t1d0       ONLINE       0     0     0
        logs
          /dev/lofi/2  ONLINE       0     0     0

errors: No known data errors
root@beastie:~#
tsoome
tsoome
igork
  1. Ship It!
  2. 
      
rm
  1. This looks good, but I'd make sure to update the bug to have a proper analysis about what happened, as in the fact that we're here because for labelled devices it's up to cmlb to set them.

    1. Updated the description in issue.

  2. 
      
tsoome
Review request changed

Status: Closed (submitted)

Loading...