Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1495628

Re: [PATCH 0/9] Generate uevents for all DM events

From Andy Grover <agrover@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH 0/9] Generate uevents for all DM events
Date 2016-10-05 01:40 +0200
Message-ID <soHtv-100-3@gated-at.bofh.it> (permalink)
References <soh61-z2-3@gated-at.bofh.it> <sosEa-83A-15@gated-at.bofh.it>
Organization Red Hat

Show all headers | View raw


On 10/04/2016 12:20 AM, Greg KH wrote:
> On Mon, Oct 03, 2016 at 12:22:51PM -0700, Andy Grover wrote:
>> Hi Mike and GregKH,
>>
>> I want a way to get devicemapper events without using the DM ioctl,
>> because that requires creating a thread to sleep in the ioctl for each
>> dm device I want events from.
>>
>> It would seem like using uevents and KOBJ_CHANGE would be a good way
>> to do this, but Mike said that the uevent maintainers (Greg that's
>> you?) did not think this was a good idea?
>
> KBOJ_CHANGE is a tricky one.  It has been used for a variety of
> different things, but usually it is used to show that a major change has
> happened with a device like a docking station plug in or out.
>
> How often do DM events happen?  What is triggering them?  How do you
> want to send them to userspace?  Through a sysfs file?  Why not just use
> your own netlink connection?

devicemapper is using uevents for:

a. dm-verity detected corruption
b. dm-multipath: path failed or reinstated
c. dm device renamed
d. there's also some use in md and bcache.

devicemapper uses DM_EVENT ioctl (yuck) for:

1. dm-thin pool data/metadata filling up (hit a threshold)
2. dm-cache is now clean
3. dm-log flushed or log failed
4. dm-raid error detected or sync complete

Instead of using uevent for everything, we could go to a separate 
genetlink for 1-4 instead of making them use uevent like a-d, but we'd 
end up with two different userspace notification techniques. At least to 
me, there doesn't seem to be much technical differentiation between the 
two lists.

(Would we want to then at some point transition any of a-d off of uevent 
and onto genetlink for consistency's sake?)

Thanks -- Regards -- Andy

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/9] Generate uevents for all DM events Andy Grover <agrover@redhat.com> - 2016-10-03 21:30 +0200
  [PATCH 4/9] dm: Update dm-uevent.txt Andy Grover <agrover@redhat.com> - 2016-10-03 21:30 +0200
  [PATCH 7/9] dm: Implement dm_uevent_add() Andy Grover <agrover@redhat.com> - 2016-10-03 21:30 +0200
  [PATCH 9/9] dm: Generate uevents for other targets Andy Grover <agrover@redhat.com> - 2016-10-03 21:30 +0200
  [PATCH 3/9] dm: Inline dm_build_path_uevent into dm_path_uevent Andy Grover <agrover@redhat.com> - 2016-10-03 21:30 +0200
  Re: [PATCH 0/9] Generate uevents for all DM events Greg KH <gregkh@linuxfoundation.org> - 2016-10-04 09:50 +0200
    Re: [PATCH 0/9] Generate uevents for all DM events Andy Grover <agrover@redhat.com> - 2016-10-05 01:40 +0200
      Re: [dm-devel] [PATCH 0/9] Generate uevents for all DM events Alasdair G Kergon <agk@redhat.com> - 2016-10-05 02:50 +0200
        Re: [dm-devel] [PATCH 0/9] Generate uevents for all DM events Hannes Reinecke <hare@suse.de> - 2016-10-05 08:30 +0200
        Re: [dm-devel] [PATCH 0/9] Generate uevents for all DM events Greg KH <gregkh@linuxfoundation.org> - 2016-10-05 09:00 +0200
          Re: [dm-devel] [PATCH 0/9] Generate uevents for all DM events Andy Grover <agrover@redhat.com> - 2016-10-05 19:10 +0200
            Re: [dm-devel] [PATCH 0/9] Generate uevents for all DM events Alasdair G Kergon <agk@redhat.com> - 2016-10-05 19:50 +0200
              Re: [dm-devel] [PATCH 0/9] Generate uevents for all DM events Andy Grover <agrover@redhat.com> - 2016-10-06 00:40 +0200

csiph-web