Re: [PATCH 0/5] nbd improvements

2016-09-15 Thread Markus Pargmann
Hi Jens, On 2016 M09 8, Thu 14:13:46 CEST Jens Axboe wrote: > On 09/08/2016 01:33 PM, Josef Bacik wrote: > > This is a patch series aimed at bringing NBD into 2016. The two big > > components of this series is converting nbd over to using blkmq and > > then allowing us to provide more than one co

Re: [PATCH v5 3/4] make nbd device wait for its users

2016-07-20 Thread Markus Pargmann
Hi, On Saturday 16 July 2016 16:06:36 Pranay Kr Srivastava wrote: > When a timeout occurs or a recv fails, then > instead of abruptly killing nbd block device > wait for its users to finish. > > This is more required when filesystem(s) like > ext2 or ext3 don't expec

Re: [PATCH v4 3/5]nbd: make nbd device wait for its users

2016-07-13 Thread Markus Pargmann
On Sunday 10 July 2016 21:32:07 Pranay Srivastava wrote: > On Sun, Jul 10, 2016 at 6:32 PM, Markus Pargmann wrote: > > On 2016 M06 30, Thu 14:02:03 CEST Pranay Kr. Srivastava wrote: > >> When a timeout occurs or a recv fails, then > >> instead of abruplty killing nbd

Re: [PATCH v4 2/5]nbd: fix might_sleep warning on socket shutdown

2016-07-13 Thread Markus Pargmann
On Sunday 10 July 2016 21:03:05 Pranay Srivastava wrote: > On Sunday, July 10, 2016, Markus Pargmann wrote: > > Hi, > > > > On 2016 M06 30, Thu 14:02:02 CEST Pranay Kr. Srivastava wrote: > >> spinlocked ranges should be small and not contain calls into huge > &g

Re: [PATCH v4 3/5]nbd: make nbd device wait for its users

2016-07-10 Thread Markus Pargmann
On 2016 M06 30, Thu 14:02:03 CEST Pranay Kr. Srivastava wrote: > When a timeout occurs or a recv fails, then > instead of abruplty killing nbd block device > wait for its users to finish. > > This is more required when filesystem(s) like > ext2 or ext3 don't expect their buffer heads to > disappea

Re: [PATCH v4 2/5]nbd: fix might_sleep warning on socket shutdown

2016-07-10 Thread Markus Pargmann
Mikulas Patocka > Signed-off-by: Markus Pargmann > > Changelog: > Pranay Kr. Srivastava: > > 1) Use spin_lock instead of irq version for sock_shutdown. > > 2) Use system work queue to actually trigger the shutdown of > socket. This solves the issue when kernel_sendmsg is

Re: [PATCH v3 1/3]nbd: fix might_sleep warning on socket shutdown

2016-06-29 Thread Markus Pargmann
a > Signed-off-by: Markus Pargmann > > Changelog: > Pranay Kr. Srivastava: > > 1) Use spin_lock instead of irq version for sock_shutdown. > > 2) Use system work queue to actually trigger the shutdown of >socket. This solves the issue when kernel_sendmsg is cur

Re: [PATCH 3/3]nbd: make nbd device wait for its users

2016-06-29 Thread Markus Pargmann
Hi, On Friday 24 June 2016 13:09:36 Pranay Kr. Srivastava wrote: > When a timeout occurs or a recv fails, then > instead of abruplty killing nbd block device > wait for it's users to finish. > > This is more required when filesystem(s) like > ext2 or ext3 don't expect their buffer heads to > disa

Re: [PATCH 1/2] nbd: make nbd device wait for its users

2016-06-28 Thread Markus Pargmann
Hi, On Saturday 25 June 2016 23:22:06 Pranay Srivastava wrote: > On Fri, Jun 24, 2016 at 2:59 PM, Markus Pargmann wrote: > > From: "Pranay Kr. Srivastava" > > > > When a timeout occurs or a recv fails, then instead of abruplty killing > > nbd block

[PATCH 2/2] nbd: Disallow ioctls on disconnected block device

2016-06-24 Thread Markus Pargmann
/writing from a different backend device. For timeouts it is still possible to setup a new socket so that the connection may be refreshed without creating problems for all users. Signed-off-by: Markus Pargmann --- drivers/block/nbd.c | 30 -- 1 file changed, 24

[PATCH 1/2] nbd: make nbd device wait for its users

2016-06-24 Thread Markus Pargmann
left] Signed-off-by: Markus Pargmann --- Hi, I used your patch and changed it a bit based on my ideas. The general difference is that this keeps the block device open. After all users left, the device is reset. The followup patch then restricts access to ioctls after a disconnect. I wanted to av

Re: [PATCH v2 4/5]nbd: make nbd device wait for its users.

2016-06-14 Thread Markus Pargmann
Hi Pranay, On Tuesday 14 June 2016 15:03:40 Pranay Srivastava wrote: > Hi Markus, > > On Tue, Jun 14, 2016 at 2:29 PM, Markus Pargmann wrote: > > > > On Thursday 02 June 2016 13:25:00 Pranay Kr. Srivastava wrote: > > > When a timeout occurs or a recv fails,

Re: [PATCH v2 4/5]nbd: make nbd device wait for its users.

2016-06-14 Thread Markus Pargmann
On Thursday 02 June 2016 13:25:00 Pranay Kr. Srivastava wrote: > When a timeout occurs or a recv fails, then > instead of abruplty killing nbd block device > wait for it's users to finish. > > This is more required when filesystem(s) like > ext2 or ext3 don't expect their buffer heads to > disappe

Re: [PATCH v2 1/5] nbd: fix might_sleep warning on socket shutdown.

2016-06-14 Thread Markus Pargmann
Mikulas Patocka > Signed-off-by: Markus Pargmann > > Changelog: > Pranay Kr. Srivastava: > > 1) Use spin_lock instead of irq version for sock_shutdown. > > 2) Use system work queue to actually trigger the shutdown of >socket. This solves the issue when kernel_sendmsg

Re: [PATCH] nbd: fix race in ioctl

2016-05-30 Thread Markus Pargmann
blkdev.h > > It would seem that the race was introduced in the process of moving nbd > from BKL to unlocked ioctls. > > By setting nbd->task_recv while the mutex is held, we can prevent other > processes from running concurrently (since nbd->task_recv is also checked > whi

Re: [PATCH 0/4]nbd: fixes for nbd

2016-05-30 Thread Markus Pargmann
Hi, On Tuesday 24 May 2016 14:26:24 Pranay Kr. Srivastava wrote: > This patch series fixes the following > > 1) fix might_sleep warning on socket shutdown: >Fix sock_shutdown to avoid calling kernel_sock_shutdown >while holding spin_lock. > > 2)fix various coding standard warnings >M

Re: [PATCH 1/4] fix might_sleep warning on socket shutdown.

2016-05-30 Thread Markus Pargmann
tocka > Signed-off-by: Markus Pargmann > > Changelog: > Pranay Kr. Srivastava: > > 1) Use spin_lock instead of irq version for sock_shutdown. > > 2) Use system work queue to actually trigger the shutdown of >socket. This solves the issue when kernel_sendmsg is cur

Re: [PATCH 3/4] make nbd device wait for its users.

2016-05-30 Thread Markus Pargmann
Hi, sorry I couldn't fit the review into last week. On Tuesday 24 May 2016 14:26:27 Pranay Kr. Srivastava wrote: > When a timeout occurs or a recv fails, then > instead of abruplty killing nbd block device > wait for it's users to finish. > > This is more required when filesystem(s) like > ext2

Re: [PATCH v4 01/18] nbd: Fix might_sleep warning on xmit timeout

2016-05-20 Thread Markus Pargmann
On Friday 20 May 2016 02:05:36 Pranay Srivastava wrote: > On Thu, May 19, 2016 at 11:52 AM, Markus Pargmann wrote: > > Hi, > > > > On Wed, May 11, 2016 at 11:18:29AM +0300, Pranay Kr. Srivastava wrote: > >> This patch fixes the warning generated when a timeout

Re: [PATCH v4 18/18] make nbd device wait for its users in case of timeout

2016-05-18 Thread Markus Pargmann
Hi, On Thu, May 12, 2016 at 08:49:00PM +0530, Pranay Srivastava wrote: > On Thu, May 12, 2016 at 2:49 PM, Markus Pargmann wrote: > > Hi, > > > > On Wednesday 11 May 2016 11:18:46 Pranay Kr. Srivastava wrote: > >> When a timeout occurs or a recv fails, then > &

Re: [Nbd] [PATCH] NBD: replace kill_bdev() with __invalidate_device()

2016-05-18 Thread Markus Pargmann
Hi Wouter, On Sun, May 15, 2016 at 02:55:39PM +0200, Wouter Verhelst wrote: > Hi Markus, > > On Thu, May 12, 2016 at 11:53:01AM +0200, Markus Pargmann wrote: > > On Thursday 28 April 2016 18:27:34 Wouter Verhelst wrote: > > > However, at some point I agreed with Paul (you

Re: [PATCH v4 01/18] nbd: Fix might_sleep warning on xmit timeout

2016-05-18 Thread Markus Pargmann
Hi, On Wed, May 11, 2016 at 11:18:29AM +0300, Pranay Kr. Srivastava wrote: > This patch fixes the warning generated when a timeout occurs > on the request and socket is closed from a non-sleep context > by > > 1. Moving the socket closing on a timeout to nbd_thread_send What happens if a send bl

Re: [PATCH] nbd: Move socket shutdown out of spinlock

2016-05-12 Thread Markus Pargmann
Hi, On Thursday 12 May 2016 16:42:31 Pranay Srivastava wrote: > Hi Markus, > > > On Thu, May 12, 2016 at 3:13 PM, Markus Pargmann wrote: > > spinlocked ranges should be small and not contain calls into huge > > subfunctions. Fix my mistake and just get the pointer to t

Re: [Nbd] [PATCH] NBD: replace kill_bdev() with __invalidate_device()

2016-05-12 Thread Markus Pargmann
Hi, On Thursday 28 April 2016 18:27:34 Wouter Verhelst wrote: > On Thu, Apr 28, 2016 at 11:00:20AM +0200, Markus Pargmann wrote: > > Hi, > > > > On Saturday 23 April 2016 07:47:21 Ratna Manoj wrote: > > > Thanks for the review. > > > > > > Atl

[PATCH] nbd: Move socket shutdown out of spinlock

2016-05-12 Thread Markus Pargmann
spinlocked ranges should be small and not contain calls into huge subfunctions. Fix my mistake and just get the pointer to the socket instead of doing everything with spinlock held. Reported-by: Mikulas Patocka Signed-off-by: Markus Pargmann --- drivers/block/nbd.c | 18 ++ 1

Re: [PATCH v4 01/18] nbd: Fix might_sleep warning on xmit timeout

2016-05-12 Thread Markus Pargmann
Hi, On Wednesday 11 May 2016 11:18:29 Pranay Kr. Srivastava wrote: > This patch fixes the warning generated when a timeout occurs > on the request and socket is closed from a non-sleep context > by > > 1. Moving the socket closing on a timeout to nbd_thread_send > > 2. Make sock lock to be a mut

Re: [Nbd] Fwd: [PATCH v4 02/18] nbd: fix checkpatch trailing space warning.

2016-05-12 Thread Markus Pargmann
Hi, On Wednesday 11 May 2016 07:46:25 Eric Blake wrote: > On 05/11/2016 03:38 AM, Pranay Srivastava wrote: > > > > > The series contained some checkpatch changes so I had included you as well. > > > >> know why you are sending them to me), but I know I do not accept patches > >> without any cha

Re: [PATCH v4 18/18] make nbd device wait for its users in case of timeout

2016-05-12 Thread Markus Pargmann
Hi, On Wednesday 11 May 2016 11:18:46 Pranay Kr. Srivastava wrote: > When a timeout occurs or a recv fails, then > instead of abruplty killing nbd block device > wait for it's users to finish. > > This is more required when filesystem(s) like > ext2 or ext3 don't expect their buffer heads to > di

Re: [PATCH v4 07/18] nbd: fix checkpatch split string warning.

2016-05-12 Thread Markus Pargmann
Hi, On Wednesday 11 May 2016 11:18:35 Pranay Kr. Srivastava wrote: > Signed-off-by: Pranay Kr. Srivastava > --- > drivers/block/nbd.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c > index 6a4dc3a..7a5b8ef 100644 > --- a/driv

Re: [PATCH] NBD: replace kill_bdev() with __invalidate_device()

2016-04-28 Thread Markus Pargmann
til all blockdevice users are gone. This would avoid any issues with writing/reading data to a wrong server. Best Regards, Markus > > Ratna. > > > On Wed, Apr 20, 2016 at 4:36 PM, Markus Pargmann wrote: > > > Hi, > > > > On Thursday 24 March 2

Re: [PATCH] NBD: replace kill_bdev() with __invalidate_device()

2016-04-20 Thread Markus Pargmann
Hi, On Thursday 24 March 2016 07:04:10 Ratna Manoj wrote: > From: Ratna Manoj Bolla > > When a filesystem is mounted on a nbd device and on a disconnect, because > of kill_bdev(), and resetting bdev size to zero, buffer_head mappings are > getting destroyed under mounted filesystem. > > After

Re: Warning when unloading network block device

2016-04-20 Thread Markus Pargmann
Hi, On Friday 15 April 2016 18:30:32 Mikulas Patocka wrote: > Hi > > The patch 23272a6754b81ff6503e09c743bb4ceeeab39997 (nbd: Remove signal > usage) triggers a warning in nbd when the network block device is unloaded > - WARN_ON_ONCE(in_irq() || irqs_disabled()) in the function > __local_bh_en

Re: [PATCH 1/1] iio: gyro: bmg160: fix buffer read values

2016-04-06 Thread Markus Pargmann
Hi, On Monday 28 March 2016 20:15:46 Irina Tirdea wrote: > When reading gyroscope axes using iio buffers, the values > returned are always 0. In the interrupt handler, the return > value of the read operation is returned to the user instead > of the value read. Return the value read to the user. >

Re: [PATCH 4/5] gpio: of: Add support to have multiple gpios in gpio-hog

2016-03-10 Thread Markus Pargmann
On Thursday 10 March 2016 12:37:32 Laxman Dewangan wrote: > > On Wednesday 09 March 2016 10:47 PM, Stephen Warren wrote: > > On 03/09/2016 06:20 AM, Laxman Dewangan wrote: > >> > >> On Wednesday 09 March 2016 11:58 AM, Markus Pargmann wrote: > >>> * P

Re: [PATCH 4/5] gpio: of: Add support to have multiple gpios in gpio-hog

2016-03-08 Thread Markus Pargmann
Hi, On Tue, Mar 08, 2016 at 05:32:07PM +0530, Laxman Dewangan wrote: > The child node for gpio hogs under gpio controller's node > provide the mechanism to automatic GPIO request and > configuration as part of the gpio-controller's driver > probe function. > > Currently, property "gpio" takes one

Re: [PATCH] iio: adc: imx25-gcq: fix do_div

2016-03-07 Thread Markus Pargmann
Hi, On Saturday 05 March 2016 18:43:11 Jonathan Cameron wrote: > On 03/03/16 12:51, Sudip Mukherjee wrote: > > We are getting build failure with tilepro allmodconfig with the error: > > > > drivers/iio/adc/fsl-imx25-gcq.c:236:4: note: in expansion of macro 'do_div' > > do_div(priv->channel_vref_m

Re: [PATCH 1/3] Device tree binding documentation for gpio-switch

2016-03-07 Thread Markus Pargmann
On Wednesday 02 March 2016 10:03:27 Rob Herring wrote: > Reviving this thread... > > On Tue, Dec 15, 2015 at 3:09 AM, Markus Pargmann wrote: > > Hi, > > > > On Monday 14 December 2015 09:45:48 Rob Herring wrote: > >> On Mon, Dec 14, 2015 at 8:28 AM, Linus Wall

Re: [PULL] NBD for 4.6

2016-03-03 Thread Markus Pargmann
Hi, On Thursday, March 03, 2016 06:53:28 AM Jens Axboe wrote: > On 03/03/2016 12:48 AM, Markus Pargmann wrote: > > Hi Jens, > > > > On Sunday, February 21, 2016 03:01:20 PM Markus Pargmann wrote: > >> Hi Jens, > >> > >> This pull request contains

Re: [PULL] NBD for 4.6

2016-03-02 Thread Markus Pargmann
Hi Jens, On Sunday, February 21, 2016 03:01:20 PM Markus Pargmann wrote: > Hi Jens, > > This pull request contains 7 patches for 4.6. any news on this pull request? Best Regards, Markus > > Patch 1 fixes some unnecessarily complicated code I introduced some versions &g

Re: [Nbd] [PATCH] nbd: ratelimit error messages from disconnected devices

2016-02-21 Thread Markus Pargmann
Hi, On Tuesday 16 February 2016 14:33:01 Dmitry Monakhov wrote: > ndb can be explicitly disconnected via NBD_DISCONNECT while > active user still exists this result in massive spam to logs. > Let's ratelimits such messages. > > Signed-off-by: Dmitry Monakhov > --- > drivers/block/nbd.c | 6 +++-

Re: [PATCH] mfd: fsl-imx25-tsadc: select IRQ_DOMAIN

2016-02-21 Thread Markus Pargmann
#x27; [-Werror=implicit-function-declaration] > > This adds a 'select IRQ_DOMAIN' code, like we have it in all other > drivers with this requirement. > > Signed-off-by: Arnd Bergmann > Fixes: e2fccf5c1515 ("mfd: fsl-imx25-tsadc: Register touchscreen ADC driver&q

[PATCH 2/7] nbd: Remove signal usage

2016-02-21 Thread Markus Pargmann
threads. Cc: Oleg Nesterov Cc: Christoph Hellwig Signed-off-by: Markus Pargmann Reviewed-by: Christoph Hellwig --- drivers/block/nbd.c | 126 1 file changed, 48 insertions(+), 78 deletions(-) diff --git a/drivers/block/nbd.c b/drivers

[PATCH 3/7] nbd: Timeouts are not user requested disconnects

2016-02-21 Thread Markus Pargmann
It may be useful to know in the client that a connection timed out. The current code returns success for a timeout. This patch reports the error code -ETIMEDOUT for a timeout. Signed-off-by: Markus Pargmann --- drivers/block/nbd.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions

[PATCH 1/7] nbd: Fix debugfs error handling

2016-02-21 Thread Markus Pargmann
ad to debugfs files in wrong places. Signed-off-by: Markus Pargmann --- drivers/block/nbd.c | 55 ++--- 1 file changed, 14 insertions(+), 41 deletions(-) diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index e4c5cc107934..d61a04155d99 100644

[PATCH 5/7] nbd: Move flag parsing to a function

2016-02-21 Thread Markus Pargmann
nbd changes properties of the blockdevice depending on flags that were received. This patch moves this flag parsing into a separate function nbd_parse_flags(). Signed-off-by: Markus Pargmann --- drivers/block/nbd.c | 22 +- 1 file changed, 13 insertions(+), 9 deletions

[PATCH 7/7] nbd: Create size change events for userspace

2016-02-21 Thread Markus Pargmann
rated. Signed-off-by: Markus Pargmann --- drivers/block/nbd.c | 79 +++-- 1 file changed, 58 insertions(+), 21 deletions(-) diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index 4c5d94146aa3..f6b51d76e578 100644 --- a/drivers/block/nbd.c +++ b/dr

[PATCH 6/7] nbd: ratelimit error msgs after socket close

2016-02-21 Thread Markus Pargmann
8a542b427 ("nbd: fix I/O hang on disconnected nbds") Signed-off-by: Dan Streetman Signed-off-by: Markus Pargmann --- drivers/block/nbd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index b67500d5b338..4c5d94146aa3 1

[PULL] NBD for 4.6

2016-02-21 Thread Markus Pargmann
) NBD for 4.6 Dan Streetman (1): nbd: ratelimit error msgs after socket close Markus Pargmann (6): nbd: Fix debugfs error handling nbd: Remove signal usage nbd

[PATCH 4/7] nbd: Cleanup reset of nbd and bdev after a disconnect

2016-02-21 Thread Markus Pargmann
Group all variables that are reset after a disconnect into reset functions. This patch adds two of these functions, nbd_reset() and nbd_bdev_reset(). Signed-off-by: Markus Pargmann --- drivers/block/nbd.c | 40 +--- 1 file changed, 29 insertions(+), 11

Re: [PATCH] iio: adc/imx25-gcq: move incorrect do_div

2016-02-15 Thread Markus Pargmann
ADC driver") Thanks for fixing this. Reviewed-by: Markus Pargmann Best Regards, Markus > --- > drivers/iio/adc/fsl-imx25-gcq.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/iio/adc/fsl-imx25-gcq.c b/drivers/iio/adc/fsl-imx25-gcq.c >

Re: [PATCH] nbd: Fix return value check for debugfs_create_*()

2016-02-12 Thread Markus Pargmann
Hi, On Friday, February 05, 2016 09:48:21 PM weiyj...@163.com wrote: > From: Wei Yongjun > > In case of error, the function debugfs_create_*() returns NULL > pointer not ERR_PTR() if debugfs is enabled. The IS_ERR() test > in the return value check should be replaced with NULL test. I tried to

Re: [PATCH v2] nbd: Issue a uevent when disconnecting

2016-02-12 Thread Markus Pargmann
Hi Wouter, On Friday, February 05, 2016 10:42:41 AM Wouter Verhelst wrote: > Hi Markus, > > On Fri, Feb 05, 2016 at 10:03:41AM +0100, Markus Pargmann wrote: > > Hi Wouter, > > > > On Tuesday, February 02, 2016 04:27:00 PM Wouter Verhelst wrote: > > > There

[PATCH] nbd: Create size change events for userspace

2016-02-05 Thread Markus Pargmann
rated. Signed-off-by: Markus Pargmann --- drivers/block/nbd.c | 80 +++-- 1 file changed, 59 insertions(+), 21 deletions(-) diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index 4c5d94146aa3..f3682882822a 100644 --- a/drivers/block/nbd.c +++ b/dr

Re: [PATCH v2] nbd: Issue a uevent when disconnecting

2016-02-05 Thread Markus Pargmann
Hi Wouter, On Tuesday, February 02, 2016 04:27:00 PM Wouter Verhelst wrote: > There already is a uevent by default when closing a device upon connect > of the device. However, the same isn't true on disconnect. > > This makes it hard for userspace to keep track of whether a device is > connected,

Re: [PATCH] nbd: ratelimit error msgs after socket close

2016-02-05 Thread Markus Pargmann
Hi Dan, On Tuesday, February 02, 2016 12:07:04 PM Dan Streetman wrote: > Hi Markus, > > just checking if you had any comments on this patch? > > On Thu, Jan 14, 2016 at 1:42 PM, Dan Streetman > wrote: > > Make the "Attempted send on closed socket" error messages generated in > > nbd_request_han

Re: [PATCH v8 6/7] mtd: nand: gpmi: correct bitflip for erased NAND page

2016-02-02 Thread Markus Pargmann
Hi, On Saturday, January 23, 2016 03:01:47 PM Brian Norris wrote: > + Markus Pargmann > > On Wed, Dec 02, 2015 at 04:47:45PM -0600, Han Xu wrote: > > i.MX6QP and i.MX7D BCH module integrated a new feature to detect the > > bitflip number for erased NAND page. So for these

Re: [PATCH v3] pstore-ram: add Device Tree bindings

2016-01-27 Thread Markus Pargmann
Hi, sorry for the late response. On Thu, Jan 07, 2016 at 03:40:56PM -0800, Greg Hackmann wrote: > ramoops is one of the remaining places where ARM vendors still rely on > board-specific shims. Device Tree lets us replace those shims with > generic code. > > These bindings mirror the ramoops mod

[PATCH 2/5] nbd: Remove signal usage

2016-01-02 Thread Markus Pargmann
threads. Cc: Oleg Nesterov Cc: Christoph Hellwig Signed-off-by: Markus Pargmann --- drivers/block/nbd.c | 126 1 file changed, 48 insertions(+), 78 deletions(-) diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index b9e4179a950a

[PATCH 4/5] nbd: Cleanup reset of nbd and bdev after a disconnect

2016-01-02 Thread Markus Pargmann
Group all variables that are reset after a disconnect into reset functions. This patch adds two of these functions, nbd_reset() and nbd_bdev_reset(). Signed-off-by: Markus Pargmann --- drivers/block/nbd.c | 40 +--- 1 file changed, 29 insertions(+), 11

[PATCH 5/5] nbd: Move flag parsing to a function

2016-01-02 Thread Markus Pargmann
nbd changes properties of the blockdevice depending on flags that were received. This patch moves this flag parsing into a separate function nbd_parse_flags(). Signed-off-by: Markus Pargmann --- drivers/block/nbd.c | 22 +- 1 file changed, 13 insertions(+), 9 deletions

[PATCH 1/5] nbd: Fix debugfs error handling

2016-01-02 Thread Markus Pargmann
ad to debugfs files in wrong places. Signed-off-by: Markus Pargmann --- drivers/block/nbd.c | 61 - 1 file changed, 18 insertions(+), 43 deletions(-) diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index 93b3f99b6865..b9e4179a950a 100644

[PULL] NBD changes

2016-01-02 Thread Markus Pargmann
Markus Pargmann (5): nbd: Fix debugfs error handling nbd: Remove signal usage nbd: Timeouts are not user requested disconnects nbd: Cleanup reset of nbd and bdev after a disconnect nbd: Move flag parsing to

[PATCH 3/5] nbd: Timeouts are not user requested disconnects

2016-01-02 Thread Markus Pargmann
It may be useful to know in the client that a connection timed out. The current code returns success for a timeout. This patch reports the error code -ETIMEDOUT for a timeout. Signed-off-by: Markus Pargmann --- drivers/block/nbd.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions

Re: [PATCH 1/3] Device tree binding documentation for gpio-switch

2015-12-15 Thread Markus Pargmann
Fri, Dec 4, 2015 at 6:31 PM, Martyn Welch > >>> wrote: > > [...] > > >>> Markus Pargmann also did a series that add initial values to > >>> hogs, which is the inverse usecase of this, where you want to > >>> *output* something by default, then

[PATCH v2 3/4] nbd: Cleanup reset of nbd and bdev after a disconnect

2015-12-14 Thread Markus Pargmann
Group all variables that are reset after a disconnect into reset functions. This patch adds two of these functions, nbd_reset() and nbd_bdev_reset(). Signed-off-by: Markus Pargmann --- drivers/block/nbd.c | 40 +--- 1 file changed, 29 insertions(+), 11

[PATCH v2 1/4] nbd: Remove signal usage

2015-12-14 Thread Markus Pargmann
threads. Cc: Oleg Nesterov Cc: Christoph Hellwig Signed-off-by: Markus Pargmann --- drivers/block/nbd.c | 126 1 file changed, 48 insertions(+), 78 deletions(-) diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index b9e4179a950a

[PATCH v2 4/4] nbd: Move flag parsing to a function

2015-12-14 Thread Markus Pargmann
nbd changes properties of the blockdevice depending on flags that were received. This patch moves this flag parsing into a separate function nbd_parse_flags(). Signed-off-by: Markus Pargmann --- drivers/block/nbd.c | 22 +- 1 file changed, 13 insertions(+), 9 deletions

[PATCH v2 2/4] nbd: Timeouts are not user requested disconnects

2015-12-14 Thread Markus Pargmann
It may be useful to know in the client that a connection timed out. The current code returns success for a timeout. This patch reports the error code -ETIMEDOUT for a timeout. Signed-off-by: Markus Pargmann --- drivers/block/nbd.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions

[PATCH v2 0/4] nbd: Remove signal usage

2015-12-14 Thread Markus Pargmann
Hi, v2 fixes a locking problem with the sock_lock and timers in the first patch. Best Regards, Markus Markus Pargmann (4): nbd: Remove signal usage nbd: Timeouts are not user requested disconnects nbd: Cleanup reset of nbd and bdev after a disconnect nbd: Move flag parsing to a

Re: [PATCH 1/4] nbd: Remove signal usage

2015-11-10 Thread Markus Pargmann
Hi, On Tuesday 10 November 2015 04:46:18 Al Viro wrote: > On Thu, Oct 29, 2015 at 04:42:37PM +0100, Markus Pargmann wrote: > > del_timer_sync(&nbd->timeout_timer); > > + > > +out: > > + spin_unlock_irq(&nbd->sock_lock); > > ... and in its c

Re: [PATCH 0/4] nbd: Remove signal usage

2015-11-09 Thread Markus Pargmann
Hi Oleg, On Sunday 01 November 2015 20:05:00 Oleg Nesterov wrote: > Hi Markus, > > Sorry again for delay. I was offlist. again. Sorry I hadn't too much time last week. > > On 10/29, Markus Pargmann wrote: > > > > Hi, > > > > this is a try to remo

[PATCH 1/4] nbd: Remove signal usage

2015-10-29 Thread Markus Pargmann
threads. Cc: Oleg Nesterov Cc: Christoph Hellwig Signed-off-by: Markus Pargmann --- drivers/block/nbd.c | 119 +++- 1 file changed, 42 insertions(+), 77 deletions(-) diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index b9e4179a950a

[PATCH 3/4] nbd: Cleanup reset of nbd and bdev after a disconnect

2015-10-29 Thread Markus Pargmann
Group all variables that are reset after a disconnect into reset functions. This patch adds two of these functions, nbd_reset() and nbd_bdev_reset(). Signed-off-by: Markus Pargmann --- drivers/block/nbd.c | 39 --- 1 file changed, 28 insertions(+), 11

[PATCH 4/4] nbd: Move flag parsing to a function

2015-10-29 Thread Markus Pargmann
nbd changes properties of the blockdevice depending on flags that were received. This patch moves this flag parsing into a separate function nbd_parse_flags(). Signed-off-by: Markus Pargmann --- drivers/block/nbd.c | 22 +- 1 file changed, 13 insertions(+), 9 deletions

[PATCH 2/4] nbd: Timeouts are not user requested disconnects

2015-10-29 Thread Markus Pargmann
It may be useful to know in the client that a connection timed out. The current code returns success for a timeout. This patch reports the error code -ETIMEDOUT for a timeout. Signed-off-by: Markus Pargmann --- drivers/block/nbd.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions

[PATCH 0/4] nbd: Remove signal usage

2015-10-29 Thread Markus Pargmann
Hi, this is a try to remove all the signals from NBD. The first patch replaces the signals. The other patches are some cleanups I made on the way. This should solve the kthread_run() problems as well. Best Regards, Markus Markus Pargmann (4): nbd: Remove signal usage nbd: Timeouts are

Re: [PATCH 1/1] kthread: introduce kthread_get_run() to fix __nbd_ioctl()

2015-10-27 Thread Markus Pargmann
Hi, On Mon, Oct 26, 2015 at 05:26:42PM -0700, Christoph Hellwig wrote: > On Sun, Oct 25, 2015 at 03:27:13PM +0100, Oleg Nesterov wrote: > > It is not safe to use the task_struct returned by kthread_run(threadfn) > > if threadfn() can exit before the "owner" does kthread_stop(), nothing > > protect

Re: [PATCH -mm 3/3] nbd: don't abuse irqsave/irqrestore while taking nbd->tasks_lock

2015-10-26 Thread Markus Pargmann
On Sun, Oct 25, 2015 at 04:26:41PM +0100, Oleg Nesterov wrote: > Both nbd_thread_recv() and nbd_thread_send() are might_sleep() and > called with irqs enabled(), irqsave/irqrestore make no sense and imo > look confusing. Thanks, applied. Regards, Markus > > Signed-off-by: Oleg Nesterov > ---

Re: [PATCH -mm 1/3] nbd: nbd_thread_send: remove the unnecessary kernel_dequeue_signal()

2015-10-26 Thread Markus Pargmann
On Sun, Oct 25, 2015 at 04:26:37PM +0100, Oleg Nesterov wrote: > nbd_thread_send() does kernel_dequeue_signal() at the end for no reason, > it is fine to exit with the pending SIGKILL. > > Not sure it really needs another kernel_dequeue_signal() inside the > main loop, we know that signal_pending(

Re: [PATCH -mm 2/3] nbd: nbd_thread_recv: remove the buggy kernel_dequeue_signal()

2015-10-26 Thread Markus Pargmann
Hi Oleg, On Sun, Oct 25, 2015 at 04:26:39PM +0100, Oleg Nesterov wrote: > nbd_thread_recv() is called by userspace, it is very wrong to dequeue > and throw out a signal. This signal handling for a userspace process is implicitly implemented for several years already through the timeout handling.

Re: [PATCH 1/1] kthread: introduce kthread_get_run() to fix __nbd_ioctl()

2015-10-26 Thread Markus Pargmann
a killed nbd_thread_send() can exit, free > its task_struct, and then kthread_stop() can use the freed/reused memory. > > Add the new trivial helper, kthread_get_run(). Hopefully it will have more > users, this patch changes __nbd_ioctl() as an example. Thanks. Acked-by: Markus Par

Re: + signal-turn-dequeue_signal_lock-into-kernel_dequeue_signal.patch added to -mm tree

2015-10-24 Thread Markus Pargmann
Hi Oleg, On Sat, Oct 24, 2015 at 09:48:26PM +0200, Oleg Nesterov wrote: > Hi Markus, > > s/mm-commits/lkml/ > > On 10/24, Markus Pargmann wrote: > > > > On Mon, Oct 05, 2015 at 02:19:27PM -0700, a...@linux-foundation.org wrote: > > > > > > Sub

Re: [RFC V3] regmap: change bool to 1 bit variable in struct regmap

2015-10-12 Thread Markus Pargmann
Hi, On Fri, Oct 09, 2015 at 03:51:22PM +0800, yalin wang wrote: > This patch change some bool variables in struct regmap { } > to be u8 v : 1 type, so that we can shrink the sizeof of struct regmap. > > Signed-off-by: yalin wang > --- > drivers/base/regmap/internal.h | 39 +++--

[PATCH] nbd: Add locking for tasks

2015-10-06 Thread Markus Pargmann
avoid killing tasks that already left the NBD thread functions. This lock is only acquired if a timeout occures or the nbd device starts/stops. Reported-by: Ben Hutchings Signed-off-by: Markus Pargmann --- drivers/block/nbd.c | 36 ++-- 1 file changed, 30

Re: [PATCH 01/10] nbd: Fix timeout detection

2015-09-30 Thread Markus Pargmann
Hi, On Mon, Sep 28, 2015 at 01:27:44AM +0100, Ben Hutchings wrote: > On Mon, 2015-08-17 at 08:20 +0200, Markus Pargmann wrote: > > At the moment the nbd timeout just detects hanging tcp operations. This > > is not enough to detect a hanging or bad connection as expected o

Re: [PATCH v3 0/4] iio: bmc150 regmap and SPI

2015-09-24 Thread Markus Pargmann
Hi Irina, On Wed, Sep 23, 2015 at 12:46:04PM +, Tirdea, Irina wrote: > > > > -Original Message- > > From: Markus Pargmann [mailto:m...@pengutronix.de] > > Sent: 21 September, 2015 13:55 > > To: Jonathan Cameron > > Cc: Srinivas Pandruvad

Re: [PATCH 3.10 02/20] iio: bmg160: IIO_BUFFER and IIO_TRIGGERED_BUFFER are required

2015-09-23 Thread Markus Pargmann
Hi, On Tue, Sep 22, 2015 at 11:30:25PM +0100, Luis Henriques wrote: > On Sat, Sep 19, 2015 at 10:27:17AM -0700, Greg Kroah-Hartman wrote: > > 3.10-stable review patch. If anyone has any objections, please let me know. > > > > -- > > > > From:

Re: [Nbd] NBD: Disconnect connection/kill NBD server cause kernel bug even kernel hang

2015-09-23 Thread Markus Pargmann
Hi, Thanks for the pointer Paul. On Mon, Sep 21, 2015 at 05:33:21PM -0700, Sheng Yang wrote: > Thank you Paul! That's exactly the issue I met. I've read the whole > thread and got a general idea of the issue. > > I try to summarize it and please correct me if I'm wrong: > > 1. The issue is the

[PATCH v3 4/4] iio: bmc150: Add SPI driver

2015-09-21 Thread Markus Pargmann
Add a simple SPI driver which initializes the spi regmap for the bmc150 core driver. Signed-off-by: Markus Pargmann --- drivers/iio/accel/Kconfig| 5 +++ drivers/iio/accel/Makefile | 1 + drivers/iio/accel/bmc150-accel-spi.c | 80 3

[PATCH v3 1/4] iio: bmc150: Use i2c regmap

2015-09-21 Thread Markus Pargmann
This replaces all usage of direct i2c accesses with regmap accesses. Signed-off-by: Markus Pargmann --- drivers/iio/accel/Kconfig| 2 + drivers/iio/accel/bmc150-accel.c | 225 +-- 2 files changed, 99 insertions(+), 128 deletions(-) diff --git a

[PATCH v3 2/4] iio: bcm150: Remove i2c_client from private data

2015-09-21 Thread Markus Pargmann
i2c_client struct is now only used for debugging output. We can use the device struct as well so we can remove all struct i2c_client usage. Signed-off-by: Markus Pargmann Acked-by: Jonathan Cameron --- drivers/iio/accel/bmc150-accel.c | 116 +++ 1 file

[PATCH v3 3/4] iio: bmc150: Split the driver into core and i2c

2015-09-21 Thread Markus Pargmann
Signed-off-by: Markus Pargmann --- drivers/iio/accel/Kconfig | 9 +- drivers/iio/accel/Makefile | 3 +- .../accel/{bmc150-accel.c => bmc150-accel-core.c} | 85 - drivers/iio/accel/bmc150-accel-i2c.c |

[PATCH v3 0/4] iio: bmc150 regmap and SPI

2015-09-21 Thread Markus Pargmann
code path and the i2c code path. Tests would be appreciated. @Srinivas: As there were some rebase conflicts on the first patch, I removed your reviewed-by tag again for the moment. Best regards, Markus Markus Pargmann (4): iio: bmc150: Use i2c regmap iio: bcm150: Remove i2c_client from pr

Re: [PATCH v2 0/4] iio: bmc150 regmap and SPI

2015-09-16 Thread Markus Pargmann
Hi Irina, On Wed, Sep 09, 2015 at 02:30:30PM +, Tirdea, Irina wrote: > > > > -Original Message- > > From: Markus Pargmann [mailto:m...@pengutronix.de] > > Sent: 20 August, 2015 15:50 > > To: Jonathan Cameron > > Cc: Srinivas Pandruvada; Tirdea, I

Re: [PATCH v2 4/4] iio: bmc150: Add SPI driver

2015-09-16 Thread Markus Pargmann
On Tue, Sep 01, 2015 at 07:10:57AM -0700, Srinivas Pandruvada wrote: > On Mon, 2015-08-31 at 17:18 +0100, Jonathan Cameron wrote: > > On 20/08/15 13:49, Markus Pargmann wrote: > > > Add a simple SPI driver which initializes the spi regmap for the > > &g

Re: [PATCH v4 1/2] iio: bmg160: Separate i2c and core driver

2015-09-14 Thread Markus Pargmann
Hi Jonathon, Sorry for the late response I was on vacation. On Mon, Aug 31, 2015 at 05:05:11PM +0100, Jonathan Cameron wrote: > On 19/08/15 13:12, Markus Pargmann wrote: > > This patch separates the core driver using regmap and the i2c driver > > which creates the i2c regmap. Also

[PATCH v4 2/4] regmap: regmap max_raw_read/write getter functions

2015-08-30 Thread Markus Pargmann
chunks otherwise samples are dropped. Signed-off-by: Markus Pargmann --- drivers/base/regmap/regmap.c | 22 ++ include/linux/regmap.h | 2 ++ 2 files changed, 24 insertions(+) diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index 7674ceb61251

[PATCH v4 3/4] regmap: Add raw_write/read checks for max_raw_write/read sizes

2015-08-30 Thread Markus Pargmann
Check in regmap_raw_read() and regmap_raw_write() for correct maximum sizes of the operations. Return -E2BIG if this size is not supported because it is too big. Also this patch causes an uninitialized variable warning so it initializes ret (although not necessary). Signed-off-by: Markus

[PATCH v4 0/4] regmap: i2c block support

2015-08-30 Thread Markus Pargmann
Hi, Rebased the series against your for-next branch. I hope this is the right one. Best Regards, Markus Markus Pargmann (4): regmap: Introduce max_raw_read/write for regmap_bulk_read/write regmap: regmap max_raw_read/write getter functions regmap: Add raw_write/read checks for

[PATCH v4 4/4] regmap-i2c: Add smbus i2c block support

2015-08-30 Thread Markus Pargmann
This allows to read/write up to 32 bytes of data and is to be prefered if supported before the register read/write smbus support. Signed-off-by: Markus Pargmann --- drivers/base/regmap/regmap-i2c.c | 49 1 file changed, 49 insertions(+) diff --git a

  1   2   3   4   5   >