11043 lofiadm -la still fails after 10215

Review Request #1840 — Created May 16, 2019 and submitted

tsoome
illumos-gate
11043
74a7d31...
general

11043 lofiadm -la still fails after 10215



  • 0
  • 0
  • 1
  • 1
  • 2
Description From Last Updated
igork
  1. Ship It!
  2. 
      
alp
  1. While testing I've found the following.
    The testcase doesn't fail. But

    # test0=$(mktemp); test1=`lofiadm -a ${test0}` ; echo $test0; echo $test1; lofiadm -d $test1; test2=$(mktemp);  test3=`lofiadm -la $test2`; echo $test2; echo $test3;
    /dev/lofi/1
    /tmp/tmp.HKaaVc
    /dev/dsk/c4t1d0p0
    # lofiadm ####  Hangs for a while
    Block Device File Options
    unknown /tmp/tmp.HKaaVc Labeled
    

    Note 'unknown' block device.

    1. oh, but of course it does, silly me:)

  2. 
      
tsoome
alp
  1. Seems to be working now.

  2. 
      
citrus
  1. Ship It!
  2. 
      
igork
  1. 
      
  2. usr/src/uts/common/io/lofi.c (Diff revision 2)
     
     

    maybe move valuse to tunable global variable?

  3. 
      
igork
  1. Ship It!
  2. 
      
tsoome
tsoome
Review request changed

Status: Closed (submitted)

gwr
  1. 
      
  2. usr/src/uts/common/io/lofi.c (Diff revision 3)
     
     

    Given that ticks is an absolute "end" time, it would seem like it should be computed just once, above the loop, right?

    1. I actually did this on purpose. The "late" /dev/lofi/X does appear because we do not wait for non-labeled device name to appear in cace, but since we do know the device name, we return it to the lofiadm without any wait. Then the script does unmap, and will create new mapping and meanwhile devfsadm is busy with its tasks and depending on how busy is the whole system, the messages are appearing late.

      So the purpose for this recalculation is to make sure we set the wait time for "right" name - once we have found non-labeled device name, we ignore it, reset the timer and start cycle for name of the labeled device. The problem is that we really do not know how long it can take for the name to appear because it is created in userspace by devfsadmd and can depend on many factors. Eventually I'd like to see controller ID assignment to be managed in kernel to get rid of such delays and to have zone aware assignments etc (plus sysevent facility is not usable in local zones), but at this time we need to use what we have.

    2. OK. In that case, I'll just say: some more comments about that might have helped...

  3. 
      
Loading...