• Peter Oberparleiter's avatar
    s390/vmur: generate uevent on unsolicited device end · bf18140d
    Peter Oberparleiter authored
    When a traditional channel-attached device transitions from not-ready to
    ready state, an unsolicited DEVICE END I/O interrupt is raised. This
    happens for example when a new file arrives in the z/VM virtual reader
    device.
    
    Change the Linux kernel to generate a change uevent when such an
    interrupt occurs for any online unit record devices supported by the
    vmur driver. This can be useful to automatically trigger processing of
    files as they arrive in the reader device.
    
    A sample udev rule for running a program when this event occurs looks as
    follows:
    
      ENV{DRIVER}=="vmur", ACTION=="change", ENV{EVENT}=="unsol_de", \
        RUN{program}="/path/to/program"
    
    The rule can be tested using the following steps:
    
    1. Set reader device online (assuming default reader device number 000c)
    
       $ chzdev -ea 0.0.000c
    
    2. Force a ready-state transition using z/VM's READY CP command
    
       $ vmcp ready 000c
    Suggested-by: default avatarAlan Altmark <Alan_Altmark@us.ibm.com>
    Reviewed-by: default avatarHeiko Carstens <hca@linux.ibm.com>
    Reviewed-by: default avatarSven Schnelle <svens@linux.ibm.com>
    Signed-off-by: default avatarPeter Oberparleiter <oberpar@linux.ibm.com>
    Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
    bf18140d
vmur.h 3.12 KB