~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/admin-guide/device-mapper/dm-uevent.rst

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /Documentation/admin-guide/device-mapper/dm-uevent.rst (Version linux-6.12-rc7) and /Documentation/admin-guide/device-mapper/dm-uevent.rst (Version linux-5.17.15)


  1 ====================                                1 ====================
  2 device-mapper uevent                                2 device-mapper uevent
  3 ====================                                3 ====================
  4                                                     4 
  5 The device-mapper uevent code adds the capabil      5 The device-mapper uevent code adds the capability to device-mapper to create
  6 and send kobject uevents (uevents).  Previousl      6 and send kobject uevents (uevents).  Previously device-mapper events were only
  7 available through the ioctl interface.  The ad      7 available through the ioctl interface.  The advantage of the uevents interface
  8 is the event contains environment attributes p      8 is the event contains environment attributes providing increased context for
  9 the event avoiding the need to query the state      9 the event avoiding the need to query the state of the device-mapper device after
 10 the event is received.                             10 the event is received.
 11                                                    11 
 12 There are two functions currently for device-m     12 There are two functions currently for device-mapper events.  The first function
 13 listed creates the event and the second functi     13 listed creates the event and the second function sends the event(s)::
 14                                                    14 
 15   void dm_path_uevent(enum dm_uevent_type even     15   void dm_path_uevent(enum dm_uevent_type event_type, struct dm_target *ti,
 16                       const char *path, unsign     16                       const char *path, unsigned nr_valid_paths)
 17                                                    17 
 18   void dm_send_uevents(struct list_head *event     18   void dm_send_uevents(struct list_head *events, struct kobject *kobj)
 19                                                    19 
 20                                                    20 
 21 The variables added to the uevent environment      21 The variables added to the uevent environment are:
 22                                                    22 
 23 Variable Name: DM_TARGET                           23 Variable Name: DM_TARGET
 24 ------------------------                           24 ------------------------
 25 :Uevent Action(s): KOBJ_CHANGE                     25 :Uevent Action(s): KOBJ_CHANGE
 26 :Type: string                                      26 :Type: string
 27 :Description:                                      27 :Description:
 28 :Value: Name of device-mapper target that gene     28 :Value: Name of device-mapper target that generated the event.
 29                                                    29 
 30 Variable Name: DM_ACTION                           30 Variable Name: DM_ACTION
 31 ------------------------                           31 ------------------------
 32 :Uevent Action(s): KOBJ_CHANGE                     32 :Uevent Action(s): KOBJ_CHANGE
 33 :Type: string                                      33 :Type: string
 34 :Description:                                      34 :Description:
 35 :Value: Device-mapper specific action that cau     35 :Value: Device-mapper specific action that caused the uevent action.
 36         PATH_FAILED - A path has failed;           36         PATH_FAILED - A path has failed;
 37         PATH_REINSTATED - A path has been rein     37         PATH_REINSTATED - A path has been reinstated.
 38                                                    38 
 39 Variable Name: DM_SEQNUM                           39 Variable Name: DM_SEQNUM
 40 ------------------------                           40 ------------------------
 41 :Uevent Action(s): KOBJ_CHANGE                     41 :Uevent Action(s): KOBJ_CHANGE
 42 :Type: unsigned integer                            42 :Type: unsigned integer
 43 :Description: A sequence number for this speci     43 :Description: A sequence number for this specific device-mapper device.
 44 :Value: Valid unsigned integer range.              44 :Value: Valid unsigned integer range.
 45                                                    45 
 46 Variable Name: DM_PATH                             46 Variable Name: DM_PATH
 47 ----------------------                             47 ----------------------
 48 :Uevent Action(s): KOBJ_CHANGE                     48 :Uevent Action(s): KOBJ_CHANGE
 49 :Type: string                                      49 :Type: string
 50 :Description: Major and minor number of the pa     50 :Description: Major and minor number of the path device pertaining to this
 51               event.                               51               event.
 52 :Value: Path name in the form of "Major:Minor"     52 :Value: Path name in the form of "Major:Minor"
 53                                                    53 
 54 Variable Name: DM_NR_VALID_PATHS                   54 Variable Name: DM_NR_VALID_PATHS
 55 --------------------------------                   55 --------------------------------
 56 :Uevent Action(s): KOBJ_CHANGE                     56 :Uevent Action(s): KOBJ_CHANGE
 57 :Type: unsigned integer                            57 :Type: unsigned integer
 58 :Description:                                      58 :Description:
 59 :Value: Valid unsigned integer range.              59 :Value: Valid unsigned integer range.
 60                                                    60 
 61 Variable Name: DM_NAME                             61 Variable Name: DM_NAME
 62 ----------------------                             62 ----------------------
 63 :Uevent Action(s): KOBJ_CHANGE                     63 :Uevent Action(s): KOBJ_CHANGE
 64 :Type: string                                      64 :Type: string
 65 :Description: Name of the device-mapper device     65 :Description: Name of the device-mapper device.
 66 :Value: Name                                       66 :Value: Name
 67                                                    67 
 68 Variable Name: DM_UUID                             68 Variable Name: DM_UUID
 69 ----------------------                             69 ----------------------
 70 :Uevent Action(s): KOBJ_CHANGE                     70 :Uevent Action(s): KOBJ_CHANGE
 71 :Type: string                                      71 :Type: string
 72 :Description: UUID of the device-mapper device     72 :Description: UUID of the device-mapper device.
 73 :Value: UUID. (Empty string if there isn't one     73 :Value: UUID. (Empty string if there isn't one.)
 74                                                    74 
 75 An example of the uevents generated as capture     75 An example of the uevents generated as captured by udevmonitor is shown
 76 below                                              76 below
 77                                                    77 
 78 1.) Path failure::                                 78 1.) Path failure::
 79                                                    79 
 80         UEVENT[1192521009.711215] change@/bloc     80         UEVENT[1192521009.711215] change@/block/dm-3
 81         ACTION=change                              81         ACTION=change
 82         DEVPATH=/block/dm-3                        82         DEVPATH=/block/dm-3
 83         SUBSYSTEM=block                            83         SUBSYSTEM=block
 84         DM_TARGET=multipath                        84         DM_TARGET=multipath
 85         DM_ACTION=PATH_FAILED                      85         DM_ACTION=PATH_FAILED
 86         DM_SEQNUM=1                                86         DM_SEQNUM=1
 87         DM_PATH=8:32                               87         DM_PATH=8:32
 88         DM_NR_VALID_PATHS=0                        88         DM_NR_VALID_PATHS=0
 89         DM_NAME=mpath2                             89         DM_NAME=mpath2
 90         DM_UUID=mpath-35333333000002328            90         DM_UUID=mpath-35333333000002328
 91         MINOR=3                                    91         MINOR=3
 92         MAJOR=253                                  92         MAJOR=253
 93         SEQNUM=1130                                93         SEQNUM=1130
 94                                                    94 
 95 2.) Path reinstate::                               95 2.) Path reinstate::
 96                                                    96 
 97         UEVENT[1192521132.989927] change@/bloc     97         UEVENT[1192521132.989927] change@/block/dm-3
 98         ACTION=change                              98         ACTION=change
 99         DEVPATH=/block/dm-3                        99         DEVPATH=/block/dm-3
100         SUBSYSTEM=block                           100         SUBSYSTEM=block
101         DM_TARGET=multipath                       101         DM_TARGET=multipath
102         DM_ACTION=PATH_REINSTATED                 102         DM_ACTION=PATH_REINSTATED
103         DM_SEQNUM=2                               103         DM_SEQNUM=2
104         DM_PATH=8:32                              104         DM_PATH=8:32
105         DM_NR_VALID_PATHS=1                       105         DM_NR_VALID_PATHS=1
106         DM_NAME=mpath2                            106         DM_NAME=mpath2
107         DM_UUID=mpath-35333333000002328           107         DM_UUID=mpath-35333333000002328
108         MINOR=3                                   108         MINOR=3
109         MAJOR=253                                 109         MAJOR=253
110         SEQNUM=1131                               110         SEQNUM=1131
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php