[dm-devel] [PATCH] dm integrity: Document size and format of superblock fields

2018-11-09 Thread Andy Grover
undocumented. Signed-off-by: Andy Grover --- Documentation/device-mapper/dm-integrity.txt | 26 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/Documentation/device-mapper/dm-integrity.txt b/Documentation/device-mapper/dm-integrity.txt index 297251b0d2d5

Re: [dm-devel] [PATCH] dm integrity: Document size and format of superblock fields

2018-11-12 Thread Andy Grover
On 11/9/18 12:21 PM, Andy Grover wrote: As mentioned elsewhere in dm-integrity.txt, creating a new integrity device requires creating a small integrity device on top of the base device that formats the base device, reading the provided data sectors out of the superblock, and then recreating the

[dm-devel] [PATCH 4/9] dm: Update dm-uevent.txt

2016-10-03 Thread Andy Grover
Document the current dm uevent API, as modified by this patchset. Signed-off-by: Andy Grover --- Documentation/device-mapper/dm-uevent.txt | 49 ++- 1 file changed, 42 insertions(+), 7 deletions(-) diff --git a/Documentation/device-mapper/dm-uevent.txt b

[dm-devel] [PATCH 3/9] dm: Inline dm_build_path_uevent into dm_path_uevent

2016-10-03 Thread Andy Grover
Since it's no longer an API boundary we can consolidate these two functions. Signed-off-by: Andy Grover --- drivers/md/dm-mpath.c | 59 +++ 1 file changed, 22 insertions(+), 37 deletions(-) diff --git a/drivers/md/dm-mpath.c b/drivers/

[dm-devel] [PATCH 8/9] dm: Generate uevents for thin targets

2016-10-03 Thread Andy Grover
Generate uevents when thin pool devices hit data or metadata low water marks, and when pool mode changes. Signed-off-by: Andy Grover --- drivers/md/dm-thin.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c index d1c05c1..0778a2a 100644 --- a

[dm-devel] [PATCH 9/9] dm: Generate uevents for other targets

2016-10-03 Thread Andy Grover
Generate uevents for other targets: cache, log, raid1, and snap. Signed-off-by: Andy Grover --- drivers/md/dm-cache-target.c | 5 - drivers/md/dm-log-userspace-base.c | 8 ++-- drivers/md/dm-log.c| 1 + drivers/md/dm-raid1.c | 1 + drivers/md/dm-snap.c

[dm-devel] [PATCH 0/9] Generate uevents for all DM events

2016-10-03 Thread Andy Grover
owing patchset may be appliable if you're actually ok with using KOBJ_CHANGE for dm events, or if not, then I'll look to rework it to use a dm-specific genetlink approach. Thanks -- Regards -- Andy Andy Grover (9): dm: Do not export dm_send_uevents dm: Move multipath-specific stuff out

[dm-devel] [PATCH 1/9] dm: Do not export dm_send_uevents

2016-10-03 Thread Andy Grover
Since dm-uevent.c (if CONFIG_DM_UEVENT) is part of the same module as where dm_sent_uevents is called, it does not need to be exported. Signed-off-by: Andy Grover --- drivers/md/dm-uevent.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/md/dm-uevent.c b/drivers/md/dm-uevent.c index

[dm-devel] [PATCH 2/9] dm: Move multipath-specific stuff out of dm-uevent.c

2016-10-03 Thread Andy Grover
these to dm-mpath.c and expose a few lower-level functions, dm_build_uevent, dm_uevent_add and dm_uevent_free, for other dm targets to build their own uevents. Signed-off-by: Andy Grover --- drivers/md/dm-mpath.c | 71 +++ drivers/md/dm-uevent.c

[dm-devel] [PATCH 6/9] dm: Rename dm_event_add to dm_event_queue

2016-10-03 Thread Andy Grover
For clarity. This function queues an event to be sent, which is not totally clear from the previous name. And, we want to reuse the name for something else. Signed-off-by: Andy Grover --- Documentation/device-mapper/dm-uevent.txt | 2 +- drivers/md/dm-mpath.c | 2 +- drivers

[dm-devel] [PATCH 7/9] dm: Implement dm_uevent_add()

2016-10-03 Thread Andy Grover
This helper function builds and enqueues the uevent. Targets can use this when they do not need to customize the uevent beyond its name. Signed-off-by: Andy Grover --- Documentation/device-mapper/dm-uevent.txt | 5 + drivers/md/dm-uevent.c| 26

[dm-devel] [PATCH 5/9] dm: Rename dm_build_uevent to dm_uevent_build

2016-10-03 Thread Andy Grover
For consistency with other function names that start with 'dm_uevent'. Signed-off-by: Andy Grover --- Documentation/device-mapper/dm-uevent.txt | 2 +- drivers/md/dm-mpath.c | 4 ++-- drivers/md/dm-uevent.c| 4 ++-- drivers/md/d

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

2016-10-04 Thread Andy Grover
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

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

2016-10-05 Thread Andy Grover
On 10/04/2016 11:51 PM, Greg KH wrote: On Wed, Oct 05, 2016 at 01:40:05AM +0100, Alasdair G Kergon wrote: We see these as two different categories of notifications, and prefer the greater flexibility a mechanism independent of uevents would provide. The team has discussed several alternatives

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

2016-10-05 Thread Andy Grover
On 10/05/2016 10:43 AM, Alasdair G Kergon wrote: On Wed, Oct 05, 2016 at 10:06:41AM -0700, Andy Grover wrote: My project *would* like this added sooner, so I'll work on a revised patchset that uses netlink instead of uevents, and will also work on a revision to uevents.txt that talks

[dm-devel] [PATCH 3/3] dm: Allow associated fd to be used for TABLE_STATUS

2017-01-09 Thread Andy Grover
Allows TABLE_STATUS to be used without specifying the dm device in the ioctl, if it has previously been associated with a device. Signed-off-by: Andy Grover --- drivers/md/dm-ioctl.c | 25 - 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/drivers/md/dm

[dm-devel] [PATCH 2/3] dm: Add support to poll for dm events

2017-01-09 Thread Andy Grover
enced device is destroyed Associating a fd with a device for polling limits the use of other ioctls besides VERSION, using that fd. There is no mechanism to query associations, userspace must track this itself. Signed-off-by: Andy Grover --- drivers/md/dm-core.h | 10 + drivers/md/dm-io

[dm-devel] [PATCH 1/3] dm: Change ioctl handlers to take struct file*

2017-01-09 Thread Andy Grover
We will need access to struct file in a following commit in an ioctl handler. Since lookup_ioctl() wants all ioctl handler functions to have the same signature, change all signatures to take struct file. Signed-off-by: Andy Grover --- drivers/md/dm-ioctl.c | 38

[dm-devel] [PATCH 0/3] poll() for DM events

2017-01-09 Thread Andy Grover
-poll-test Thanks -- Andy Andy Grover (3): dm: Change ioctl handlers to take struct file* dm: Add support to poll for dm events dm: Allow associated fd to be used for TABLE_STATUS drivers/md/dm-core.h | 10 +++ drivers/md/dm-ioctl.c

Re: [dm-devel] [PATCH 2/3] dm: Add support to poll for dm events

2017-01-09 Thread Andy Grover
Please see below for some bugs I spotted. The surest way to find bugs is to post patches to a public list :-/ On 01/09/2017 10:20 AM, Andy Grover wrote: +int dm_release(struct inode *inode, struct file *filp) + if (priv->md) { should be "if (priv && priv->md)"

[dm-devel] [PATCH 1/3] dm: a basic support for using the select or poll function

2017-05-09 Thread Andy Grover
/mapper/control handle 5. go to step 1 The next patch allows to re-arm the polling without closing and reopening the device. Signed-off-by: Andy Grover Signed-off-by: Mikulas Patocka --- drivers/md/dm-core.h | 3 +++ drivers/md/dm-ioctl.c | 49

[dm-devel] [PATCH 2/3] dm-ioctl: add a new DM_DEV_ARM_POLL ioctl

2017-05-09 Thread Andy Grover
hem 4. call select, poll or epoll on the handle (it waits until some new event happens since the ARM ioctl) 5. go to step 2 Signed-off-by: Andy Grover Signed-off-by: Mikulas Patocka --- drivers/md/dm-ioctl.c | 56 +++ include/uapi/linux/dm-ioctl.h

[dm-devel] [PATCH 0/3] poll()able DM events

2017-05-09 Thread Andy Grover
Hi Mike, We've been working off-list to develop a method of getting DM events that is reliable, and also can monitor events from multiple DM devices from a single thread. In short, these enable an open file descriptor to /dev/mapper/control to be polled. If the fd indicates POLLIN, some DM device

[dm-devel] [PATCH 3/3] dm-ioctl: report event number in DM_LIST_DEVICES

2017-05-09 Thread Andy Grover
From: Mikulas Patocka This patch reports the event numbers for all the devices, so that the user doesn't have to ask them one by one. The event number is reported after the name field in the dm_name_list structure. The location of the next record is specified in the dm_name_list->next field, tha

Re: [dm-devel] [PATCH 1/3] dm: a basic support for using the select or poll function

2017-05-11 Thread Andy Grover
On 05/11/2017 06:21 AM, Mike Snitzer wrote: On Thu, May 11 2017 at 5:43am -0400, Martin Wilck wrote: On Thu, 2017-05-11 at 11:39 +0200, Martin Wilck wrote: On Tue, 2017-05-09 at 12:10 -0700, Andy Grover wrote: From: Mikulas Patocka This is the very simple patch for polling on the /dev

Re: [dm-devel] [PATCH 1/3] dm: a basic support for using the select or poll function

2017-05-11 Thread Andy Grover
On 05/11/2017 12:30 PM, Martin Wilck wrote: I see - but I don't see yet how the ioctl approach (or the close()/open() based one, for that matter) would avoid this race. 1) application processes event N 2) event N+1 arrives in the kernel 3) user space issues ioctl or close()/open() sequenc

Re: [dm-devel] [PATCH 3/3] dm-ioctl: report event number in DM_LIST_DEVICES

2017-09-19 Thread Andy Grover
On 09/16/2017 07:41 PM, Eugene Syromiatnikov wrote: + event_nr = align_ptr(((void *) (nl + 1)) + strlen(hc->name) + 1); If my understanding is correct, (nl + 1) differs between 32-bit and 64-bit kernels (as the structure contains of one 8-byte and one 4-byte field), so thi

Re: [dm-devel] Getting device-mapper failure notifications

2016-02-24 Thread Andy Grover
On 02/01/2016 11:07 PM, Avishay Traeger wrote: Hi all, I have a system where various configurations are possible - iSCSI/FC, single paths and multiple. For multiple I of course use device-mapper. I was wondering if it was possible to: 1. use it for cases where I have a single path. 2. create a m

[dm-devel] [PATCH 4/5] dm: Add uevent support for dm-thin

2016-03-18 Thread Andy Grover
Create a uevent before calling dm_table_event() when either data or metadata low water are hit, as well as when pool mode changes. Signed-off-by: Andy Grover --- drivers/md/dm-thin.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/md/dm-thin.c b/drivers/md/dm

[dm-devel] [PATCH 2/5] dm: Move multipath-specific stuff out of dm-uevent.c

2016-03-18 Thread Andy Grover
these to dm-mpath.c and expose a few lower-level functions, dm_build_uevent, dm_uevent_add and dm_uevent_free, for other dm targets to build their own uevents. Signed-off-by: Andy Grover --- drivers/md/dm-mpath.c | 71 +++ drivers/md/dm-uevent.c

[dm-devel] [PATCH 1/5] dm: Do not export dm_send_uevents

2016-03-19 Thread Andy Grover
Since dm-uevent.c (if CONFIG_DM_UEVENT) is part of the same module as where dm_sent_uevents is called, it does not need to be exported. Signed-off-by: Andy Grover --- drivers/md/dm-uevent.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/md/dm-uevent.c b/drivers/md/dm-uevent.c index

[dm-devel] [PATCH 5/5] dm: Update dm-uevent.txt

2016-03-19 Thread Andy Grover
Document the current dm uevent API, as modified by this patchset. Signed-off-by: Andy Grover --- Documentation/device-mapper/dm-uevent.txt | 48 ++- 1 file changed, 41 insertions(+), 7 deletions(-) diff --git a/Documentation/device-mapper/dm-uevent.txt b

[dm-devel] [PATCH 0/5] Use uevent for thin pool events

2016-03-19 Thread Andy Grover
this code a little to allow another target to also generate uevents, dm-thin, as a first step for what we might like to do for all targets' events. DEV_WAIT ioctl support is unchanged. Andy Grover (5): dm: Do not export dm_send_uevents dm: Move multipath-specific stuff out of dm-uev

[dm-devel] [PATCH 3/5] dm: Inline dm_build_path_uevent into dm_path_uevent

2016-03-20 Thread Andy Grover
Since it's no longer an API boundary we can consolidate these two functions. Signed-off-by: Andy Grover --- drivers/md/dm-mpath.c | 59 +++ 1 file changed, 22 insertions(+), 37 deletions(-) diff --git a/drivers/md/dm-mpath.c b/drivers/

Re: [dm-devel] [PATCH 00/11] dm-raid: add RAID level takeover cababilities

2016-05-21 Thread Andy Grover
On 05/19/2016 09:49 AM, hei...@redhat.com wrote: This series of patches for the device-mapper dm-raid target (which utilizes the md kernel raid runtime) provides superblock enhancements and additional infrastructure for full takover/reshape and raid set shrink support. It includes full raid leve