Re: [dm-devel] [PATCH 4/6] libmpathpersist: fix byte swapping for big endian systems

2018-06-22 Thread Bart Van Assche
On 06/22/18 16:27, Martin Wilck wrote: On Fri, 2018-06-22 at 16:19 -0700, Bart Van Assche wrote: On 06/22/18 16:16, Martin Wilck wrote: - sa_key = 0; - for (i = 0; i < 8; ++i){ - if (i > 0) -

Re: [dm-devel] [PATCH 4/6] libmpathpersist: fix byte swapping for big endian systems

2018-06-22 Thread Martin Wilck
On Fri, 2018-06-22 at 16:19 -0700, Bart Van Assche wrote: > On 06/22/18 16:16, Martin Wilck wrote: > > - sa_key = 0; > > - for (i = 0; i < 8; ++i){ > > - if (i > 0) > > - sa_key <<= 8; > > -

Re: [dm-devel] [PATCH 4/6] libmpathpersist: fix byte swapping for big endian systems

2018-06-22 Thread Bart Van Assche
On 06/22/18 16:16, Martin Wilck wrote: - sa_key = 0; - for (i = 0; i < 8; ++i){ - if (i > 0) - sa_key <<= 8; - sa_key |= paramp->sa_key[i]; -

Re: [dm-devel] [PATCH 1/6] libmpathpersist: remove duplicate test in readfullstatus

2018-06-22 Thread Martin Wilck
On Sat, 2018-06-23 at 01:15 +0200, Martin Wilck wrote: > Signed-off-by: Martin Wilck in replies, please remove Eli from cc, his email bounces. Martin -- Dr. Martin Wilck , Tel. +49 (0)911 74053 2107 SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg)

[dm-devel] [PATCH 3/6] libmpathpersist: fix stack overflow in mpath_format_readfullstatus()

2018-06-22 Thread Martin Wilck
Some storage arrays return corrupt data in response to READ FULL STATUS PRIN commands. This may lead to stack overflow if the values aren't sanitized. Signed-off-by: Martin Wilck --- libmpathpersist/mpath_pr_ioctl.c | 9 + 1 file changed, 9 insertions(+) diff --git

[dm-devel] [PATCH 2/6] libmpathpersist: fix typo in mpath_format_readfullstatus

2018-06-22 Thread Martin Wilck
Signed-off-by: Martin Wilck --- libmpathpersist/mpath_pr_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmpathpersist/mpath_pr_ioctl.c b/libmpathpersist/mpath_pr_ioctl.c index dcdb530d..bcbb9691 100644 --- a/libmpathpersist/mpath_pr_ioctl.c +++

[dm-devel] [PATCH 1/6] libmpathpersist: remove duplicate test in readfullstatus

2018-06-22 Thread Martin Wilck
Signed-off-by: Martin Wilck --- libmpathpersist/mpath_pr_ioctl.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/libmpathpersist/mpath_pr_ioctl.c b/libmpathpersist/mpath_pr_ioctl.c index 6dd74031..dcdb530d 100644 --- a/libmpathpersist/mpath_pr_ioctl.c +++

[dm-devel] [PATCH 5/6] (lib)mpathpersist: use O_RDONLY file descriptors

2018-06-22 Thread Martin Wilck
udevd catches close-after-write inotify events and generates "change" uvents for such devices, which may cause extra unnecessary and unwanted udev activity. Therefore use O_RDONLY file descriptors for PRIN and PROUT commands. This works just as well as O_WRONLY. sg_persist has supported the

[dm-devel] [PATCH 4/6] libmpathpersist: fix byte swapping for big endian systems

2018-06-22 Thread Martin Wilck
This code was obviously intended to convert big-endian data from PRIN to CPU endianness. It doesn't work on big endian systems. Signed-off-by: Martin Wilck --- libmpathpersist/mpath_persist.c | 7 +-- libmpathpersist/mpath_pr_ioctl.c | 16 ++-- 2 files changed, 3

Re: [dm-devel] [dm:for-next 6/8] drivers/md/dm-writecache.c:862:24: error: implicit declaration of function 'array_size'; did you mean '__ua_size'?

2018-06-22 Thread Mike Snitzer
sorry for the noise, I forgot to rebase to v4.18-rc1 before picking this change up. since fixed and pushed out. On Fri, Jun 22 2018 at 2:40pm -0400, kbuild test robot wrote: > tree: > https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git > for-next > head:

Re: [dm-devel] dm bufio: Reduce dm_bufio_lock contention

2018-06-22 Thread Mikulas Patocka
On Fri, 22 Jun 2018, Michal Hocko wrote: > On Fri 22-06-18 08:52:09, Mikulas Patocka wrote: > > > > > > On Fri, 22 Jun 2018, Michal Hocko wrote: > > > > > On Fri 22-06-18 11:01:51, Michal Hocko wrote: > > > > On Thu 21-06-18 21:17:24, Mikulas Patocka wrote: > > > [...] > > > > > What about

[dm-devel] [dm:for-next 6/8] drivers/md/dm-writecache.c:862:24: error: implicit declaration of function 'array_size'; did you mean '__ua_size'?

2018-06-22 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git for-next head: 696ee10fad76d6ec15f256e6dc2c08aa2c706890 commit: 5174624414ac49495a08eca4ee584dac193c0eb7 [6/8] dm writecache: use 2-factor allocator arguments config: mips-allyesconfig (attached as .config)

[dm-devel] [PATCH v2] dm-zoned: Avoid triggering reclaim from inside dmz_map()

2018-06-22 Thread Bart Van Assche
This patch avoids that lockdep reports the following: == WARNING: possible circular locking dependency detected 4.18.0-rc1 #62 Not tainted -- kswapd0/84 is trying to acquire lock:

[dm-devel] [PATCH] dm-zoned: Avoid triggering reclaim from inside dmz_map()

2018-06-22 Thread Bart Van Assche
This patch avoids that lockdep reports the following: == WARNING: possible circular locking dependency detected 4.18.0-rc1 #62 Not tainted -- kswapd0/84 is trying to acquire lock:

Re: [dm-devel] dm bufio: Reduce dm_bufio_lock contention

2018-06-22 Thread Michal Hocko
On Fri 22-06-18 08:44:52, Mikulas Patocka wrote: > On Fri, 22 Jun 2018, Michal Hocko wrote: [...] > > Why? How are you going to audit all the callers that the behavior makes > > sense and moreover how are you going to ensure that future usage will > > still make sense. The more subtle side effects

Re: [dm-devel] dm bufio: Reduce dm_bufio_lock contention

2018-06-22 Thread Michal Hocko
On Fri 22-06-18 08:52:09, Mikulas Patocka wrote: > > > On Fri, 22 Jun 2018, Michal Hocko wrote: > > > On Fri 22-06-18 11:01:51, Michal Hocko wrote: > > > On Thu 21-06-18 21:17:24, Mikulas Patocka wrote: > > [...] > > > > What about this patch? If __GFP_NORETRY and __GFP_FS is not set (i.e. > >

Re: [dm-devel] dm bufio: Reduce dm_bufio_lock contention

2018-06-22 Thread Mikulas Patocka
On Fri, 22 Jun 2018, Michal Hocko wrote: > On Fri 22-06-18 11:01:51, Michal Hocko wrote: > > On Thu 21-06-18 21:17:24, Mikulas Patocka wrote: > [...] > > > What about this patch? If __GFP_NORETRY and __GFP_FS is not set (i.e. the > > > request comes from a block device driver or a

Re: [dm-devel] dm bufio: Reduce dm_bufio_lock contention

2018-06-22 Thread Mikulas Patocka
On Fri, 22 Jun 2018, Michal Hocko wrote: > On Thu 21-06-18 21:17:24, Mikulas Patocka wrote: > [...] > > > But seriously, isn't the best way around the throttling issue to use > > > PF_LESS_THROTTLE? > > > > Yes - it could be done by setting PF_LESS_THROTTLE. But I think it would > > be

Re: [dm-devel] dm bufio: Reduce dm_bufio_lock contention

2018-06-22 Thread Michal Hocko
On Thu 21-06-18 21:17:24, Mikulas Patocka wrote: [...] > > But seriously, isn't the best way around the throttling issue to use > > PF_LESS_THROTTLE? > > Yes - it could be done by setting PF_LESS_THROTTLE. But I think it would > be better to change it just in one place than to add

[dm-devel] [PATCH] dm raid: don't use 'const' in function return

2018-06-22 Thread Geert Uytterhoeven
From: Arnd Bergmann A newly introduced function has 'const int' as the return type, but as "make W=1" reports, that has no meaning: drivers/md/dm-raid.c:510:18: error: type qualifiers ignored on function return type [-Werror=ignored-qualifiers] This changes the return type to plain 'int'.

[dm-devel] [PATCH 4.17.0-rc3 1/2] dm: Reduce line length

2018-06-22 Thread Ssemagoye Umar Munddu
Signed-off-by: Ssemagoye Umar Munddu --- drivers/md/dm.c | 187 +--- 1 file changed, 123 insertions(+), 64 deletions(-) diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 4ea404d..bb465e6 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@