Re: [RFC 3/4] nbd: Create helper functions for ioctls

2015-01-28 Thread Paul Clements
Markus, Comments below... On Tue, Jan 13, 2015 at 8:44 AM, Markus Pargmann wrote: > This patch prepares the nbd code for the nbd-root device patch. It > moves the ioctl code into separate functions so they can be called > directly. The patch creates nbd_set_total_size(), nbd_set_blksize(), > nbd

Re: [PATCH] MAINTAINERS: Update NBD maintainer

2015-01-28 Thread Paul Clements
) > > diff --git a/MAINTAINERS b/MAINTAINERS > index 2ebb056cbe0a..4a83259e7f45 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -6583,9 +6583,10 @@ F: include/uapi/linux/netrom.h > F: net/netrom/ > > NETWORK BLOCK DEVICE (NBD) > -M: Paul Clements >

Re: [PATCH v2] nbd: fix possible memory leak

2015-01-27 Thread Paul Clements
On Tue, Jan 27, 2015 at 7:38 AM, Sudip Mukherjee wrote: > we have already allocated memory for nbd_dev, but we were not > releasing that memory and just returning the error value. > > Signed-off-by: Sudip Mukherjee Looks good to me. Acked-by: Paul Clements > --- > > v2

Re: [PATCH] nbd: fix possible memory leak

2015-01-26 Thread Paul Clements
Sudip, On Tue, Jan 13, 2015 at 12:19 PM, Sudip Mukherjee wrote: > we have already allocated memory for nbd_dev, but we were not > releasing that memory and just returning the error value. > > Signed-off-by: Sudip Mukherjee > --- > > Hi Paul, > after seeing your mail about maintainers, just start

Re: [RFC 2/4] nbd: Split 'DO_IT' into three functions

2015-01-26 Thread Paul Clements
Markus, This refactor looks OK with the exception of one thing... On Tue, Jan 13, 2015 at 8:44 AM, Markus Pargmann wrote: > /* Must be called with tx_lock held */ > > static int __nbd_ioctl(struct block_device *bdev, struct nbd_device *nbd, > @@ -684,61 +773,8 @@ static int __nbd_ioctl(struct

Re: NBD Maintainer

2015-01-13 Thread Paul Clements
On Tue, Jan 13, 2015 at 11:14 AM, Andrey Utkin wrote: > Hi Paul, > could you please describe > - how wide is NBD usage today (any estimation is ok), It depends somewhat on who you consider to be users. There are two groups of NBD "users": 1) integrators and admins (who work directly with nbd) 2

NBD Maintainer

2015-01-13 Thread Paul Clements
All, I've maintained the NBD driver since 2003, but alas, I no longer have the time and energy to continue maintaining it. If someone would like to take over, let me know. Thanks, Paul -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...

Re: [PATCHv2] nbd: Zero from and len fields in NBD_CMD_DISCONNECT.

2014-05-26 Thread Paul Clements
On Sun, May 25, 2014 at 6:22 PM, Hani Benhabiles wrote: > Len field is already set to zero, but not the from field which is sent as > 0xfe00. This makes no sense, and may cause confuse server > implementations doing sanity checks (qemu-nbd is an example.) > > Signed-off-by: Hani Benhab

Re: [PATCH] nbd: Zero from and len fields in NBD_CMD_DISCONNECT.

2014-05-25 Thread Paul Clements
On Sun, May 25, 2014 at 6:18 AM, Hani Benhabiles wrote: > On Sun, May 18, 2014 at 10:11:13AM +0100, Hani Benhabiles wrote: >> On Fri, May 16, 2014 at 10:56:33PM -0400, Paul Clements wrote: >> > Agreed. But better yet, the request structure should just be zeroed when &

Re: [PATCH] nbd: correct disconnect behavior

2013-06-27 Thread Paul Clements
On Thu, Jun 27, 2013 at 6:28 PM, Andrew Morton wrote: > On Thu, 27 Jun 2013 18:20:37 -0400 Paul Clements > wrote: > OK, but. "Would it be safer to clear ->disconnect in NBD_DO_IT?" About the same in terms of safety. Both ioctls have to be called to set up the device and

Re: [PATCH] nbd: correct disconnect behavior

2013-06-27 Thread Paul Clements
On Wed, Jun 26, 2013 at 7:21 PM, Andrew Morton wrote: > > On Wed, 19 Jun 2013 17:09:18 -0400 (EDT) Paul Clements > wrote: > > This sounds like something which users of 3.10 and earlier kernels > might want, so I added the Cc:stable tag. Please let me know if > you disag

[PATCH] nbd: correct disconnect behavior

2013-06-19 Thread Paul Clements
n (if an error occurred) or disconnect (if the user requested it). Signed-off-by: Paul Clements --- drivers/block/nbd.c |5 + include/linux/nbd.h |1 + 2 files changed, 6 insertions(+) diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index 7fecc78..8b7664d 100644 --- a/drivers/

[PATCH] nbd: remove bogus BUG_ON in NBD_CLEAR_QUE

2013-06-18 Thread Paul Clements
: Paul Clements --- nbd.c |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index 7fecc78..21ba264 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c @@ -750,7 +750,6 @@ static int __nbd_ioctl(struct block_device *bdev, struct nbd_device *nbd

[PATCH] nbd: increase default and max request sizes

2013-04-02 Thread Paul Clements
fragmentation (4KB alignment) - reducing the number of requests (fewer round trips, less network overhead) Especially in high latency networks, larger request size can make a dramatic difference in performance. From: Michal Belczyk Signed-off-by: Paul Clements --- nbd.c |2 ++ 1 file changed, 2

Re: [PATCH 3/3] nbd: show read-only state in sysfs

2013-02-12 Thread Paul Clements
On Tue, Feb 12, 2013 at 11:06 AM, Paolo Bonzini wrote: > Pass the read-only flag to set_device_ro, so that it will be > visible to the block layer and in sysfs. Looks good > Cc: > Cc: Paul Clements > Cc: Andrew Morton > Signed-off-by: Paolo Bonzini > --- > dr

Re: [PATCH 2/3] nbd: fsync and kill block device on shutdown

2013-02-12 Thread Paul Clements
ads that hit on the page cache will return stale > data from the previously-accessible disk. Paolo, Thanks for this. A problem indeed... Acked-by: paul.cleme...@steeleye.com > Cc: > Cc: > Cc: Paul Clements > Cc: Andrew Morton > Signed-off-by: Paolo Bonzini > --- >

Re: [PATCH 1/3] nbd: support FLUSH requests

2013-02-12 Thread Paul Clements
server can pass. If the flag is > enabled, we translate REQ_FLUSH requests into the NBD_CMD_FLUSH > command. > > Cc: > Cc: Paul Clements > Cc: Andrew Morton > Signed-off-by: Alex Bligh Looks good. Acked-by: paul.cleme...@steeleye.com -- To unsubscribe from this list: send

[PATCH 1/1] nbd: clear waiting_queue on shutdown

2012-08-31 Thread paul . clements
From: Paul Clements Signed-off-by: Paul Clements --- nbd.c |9 + 1 file changed, 9 insertions(+) diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index d07c9f7..0c03411 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c @@ -449,6 +449,14 @@ static void

[PATCH 0/1] nbd: fix dangling requests bug

2012-08-31 Thread paul . clements
This patch fixes a serious, but uncommon bug in nbd. This should probably be considered for backport to one or more stable branches. The bug occurs when there is heavy I/O going to the nbd device while, at the same time, a failure (server, network) or manual disconnect of the nbd connection occurs

[PATCHv2 2/2] nbd: handle discard requests

2012-08-31 Thread paul . clements
needed. Signed-off-by: Paul Clements --- diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index c544bb4..a014169 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c @@ -98,6 +98,7 @@ static const char *nbdcmd_to_ascii(int cmd) case NBD_CMD_READ: return "read";

[PATCHv2 1/2] nbd: add set flags ioctl

2012-08-31 Thread paul . clements
of the nbd connection, the server sends its flags to the client. The client then uses NBD_SET_FLAGS to inform the kernel of the options. Also included is a one-line fix to debug output for the set-timeout ioctl. Signed-off-by: Paul Clements --- diff --git a/drivers/block/nbd.c b/drivers/block

[PATCHv2 0/2] nbd: add discard support

2012-08-31 Thread paul . clements
This patchset adds discard request support to nbd. This should be good for inclusion in next. The first patch adds a set-flags ioctl, allowing various option flags to be set on an nbd device. One of the new flags (NBD_FLAG_SEND_TRIM) tells the nbd client to send discard requests to the server. Th

Re: [PATCH 2/2] [RESEND] add discard support to nbd

2012-08-31 Thread Paul Clements
On Thu, Aug 30, 2012 at 6:03 PM, Andrew Morton wrote: > On Wed, 29 Aug 2012 08:41:02 -0400 > paul.cleme...@steeleye.com wrote: > >> Description: This patch adds discard support to nbd. When the nbd client >> system receives a discard request, this will be passed along to the nbd >> server system,

[PATCH 2/2] [RESEND] add discard support to nbd

2012-08-29 Thread paul . clements
, which is no longer needed. Signed-off-by: Paul Clements --- diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index c544bb4..a014169 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c @@ -98,6 +98,7 @@ static const char *nbdcmd_to_ascii(int cmd) case NBD_CMD_READ: return "

[PATCH 0/2] [RESEND] add discard support to nbd

2012-08-29 Thread paul . clements
[ ... resend, as my mailer garbled the last post ... ] This patchset adds discard request support to nbd. This should be good for inclusion in next. The first patch adds a set-flags ioctl, allowing various option flags to be set on an nbd device. One of the new flags tells the nbd client to send

[PATCH 1/2] [RESEND] add discard support to nbd

2012-08-29 Thread paul . clements
Description: This patch adds a set-flags ioctl, allowing various option flags to be set on an nbd device. Signed-off-by: Paul Clements --- diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index d07c9f7..c544bb4 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c @@ -78,6 +78,8

[PATCH 2/2] add discard support to nbd

2012-08-28 Thread Paul Clements
nbd-trim-discard-support.diff Description: Binary data

[PATCH 1/2] add discard support to nbd

2012-08-28 Thread Paul Clements
nbd-set-flags-ioctl.diff Description: Binary data

[PATCH 0/2] add discard support to nbd

2012-08-28 Thread Paul Clements
This patchset adds discard request support to nbd. This should be good for inclusion in next. The first patch adds a set-flags ioctl, allowing various option flags to be set on an nbd device. One of the new flags tells the nbd client to send discard requests to the server. The second patch adds ha

Re: [PATCH 1/1] NBD: make nbd default to deadline I/O scheduler

2008-02-09 Thread Paul Clements
of cfq doesn't provide much advantage to nbd [not being a real disk], and you end up going through the I/O scheduler on the nbd server anyway, so it makes sense that deadline is better with nbd) Signed-Off-By: Paul Clements <[EMAIL PROTECTED]> --- ./drivers/block/nbd.c.max_nbd_killed 200

Re: [PATCH 1/1] NBD: make nbd default to deadline I/O scheduler

2008-02-08 Thread Paul Clements
Jens Axboe wrote: On Fri, Feb 08 2008, Jens Axboe wrote: On Fri, Feb 08 2008, Paul Clements wrote: Andrew Morton wrote: On Fri, 8 Feb 2008 09:33:41 -0800 Randy Dunlap <[EMAIL PROTECTED]> wrote: On Fri, 08 Feb 2008 11:47:42 -0500 Paul Clements wrote: There have been numerous repo

Re: [PATCH 1/1] NBD: make nbd default to deadline I/O scheduler

2008-02-08 Thread Paul Clements
Andrew Morton wrote: On Fri, 8 Feb 2008 09:33:41 -0800 Randy Dunlap <[EMAIL PROTECTED]> wrote: On Fri, 08 Feb 2008 11:47:42 -0500 Paul Clements wrote: There have been numerous reports of problems with nbd and cfq. Deadline gives better performance for nbd, anyway, so let's use it

[PATCH 1/1] NBD: make nbd default to deadline I/O scheduler

2008-02-08 Thread Paul Clements
by default. Signed-Off-By: Paul Clements <[EMAIL PROTECTED]> --- ./drivers/block/nbd.c.max_nbd_killed 2008-02-07 16:46:24.0 -0500 +++ ./drivers/block/nbd.c 2008-02-08 11:38:47.0 -0500 @@ -667,6 +667,7 @@ static int __init nbd_init(void) put_disk(disk); goto out; } + el

Re: [PATCH 1/1] NBD: raise max number of nbd devices to 1024

2008-01-30 Thread Paul Clements
Andrew Morton wrote: On Tue, 29 Jan 2008 21:04:05 -0500 Paul Clements <[EMAIL PROTECTED]> wrote: Andrew Morton wrote: much nicer? OK, yes, I was going for quick and easy, but you've got a point... We do need to move the kcalloc into nbd_init instead of nbd_cleanup, though --

Re: [PATCH 1/1] NBD: raise max number of nbd devices to 1024

2008-01-29 Thread Paul Clements
Andrew Morton wrote: much nicer? OK, yes, I was going for quick and easy, but you've got a point... We do need to move the kcalloc into nbd_init instead of nbd_cleanup, though -- that works a little better. Patch is attached. Thanks for the suggestion. -- Paul Signed-Off-By:

[PATCH 1/1] NBD: raise max number of nbd devices to 1024

2008-01-29 Thread Paul Clements
The limit was 128. This changes it to 1024. -- Paul Signed-Off-By: Paul Clements <[EMAIL PROTECTED]> --- ./include/linux/nbd.h.TIMEOUT 2007-08-22 13:18:12.0 -0400 +++ ./include/linux/nbd.h 2008-01-29 14:35:17.0 -0500 @@ -35,7 +35,7 @@ enum { }; #define nbd_cmd(req)

Re: [PATCH 2/2] NBD: allow hung network I/O to be cancelled

2007-08-24 Thread Paul Clements
Mike Snitzer wrote: On 8/24/07, Paul Clements <[EMAIL PROTECTED]> wrote: This patch allows NBD I/O to be cancelled when a network outage occurs. Previously, I/O would just hang, and if enough I/O was hung in nbd, the system (at least user-level) would completely hang until a TCP t

[PATCH 2/2] NBD: allow hung network I/O to be cancelled

2007-08-24 Thread Paul Clements
MEOUT ioctl is not called, you get the old (I/O hang) behavior. Patch applies and was tested against 2.6.23-rc2-mm2. Thanks, Paul Signed-Off-By: Paul Clements <[EMAIL PROTECTED]> --- ./drivers/block/nbd.c.SIZE_ZERO 2007-08-16 13:08:06.0 -0400 +++ ./drivers/block/nbd.c 2007-

[PATCH 1/2] NBD: set uninitialized devices to size 0

2007-08-24 Thread Paul Clements
From now on, uninitialized nbd devices will have size zero, which prevents these errors. Patch applies and was tested against 2.6.23-rc2-mm2. Thanks, Paul Signed-Off-By: Paul Clements <[EMAIL PROTECTED]> --- ./drivers/block/nbd.c.ERROR_RETURNS 2007-08-15 15:41:19.0 -0400 +++ ./dr

Re: [RFD] Layering: Use-Case Composers (was: DRBD - what is it, anyways? [compare with e.g. NBD + MD raid])

2007-08-12 Thread Paul Clements
Iustin Pop wrote: On Sun, Aug 12, 2007 at 07:03:44PM +0200, Jan Engelhardt wrote: On Aug 12 2007 09:39, [EMAIL PROTECTED] wrote: now, I am not an expert on either option, but three are a couple things that I would question about the DRDB+MD option 1. when the remote machine is down, how does M

Re: [PATCH 2/2] nbd: change a parameter's type to remove a memcpy call

2007-07-19 Thread Paul Clements
Denis Cheng wrote: this memcpy looks so strange, in fact it's merely a pointer dereference, so I change the parameter's type to refer it more directly, this could make the memcpy not needed anymore. in the function nbd_read_stat where nbd_find_request is only once called, the parameter served sh

Re: [PATCH 1/2] nbd: use list_for_each_entry_safe to make it more consolidated and readable

2007-07-19 Thread Paul Clements
Denis Cheng wrote: Thus the traverse of the loop may delete nodes, use the safe version. Signed-off-by: Denis Cheng <[EMAIL PROTECTED]> --- drivers/block/nbd.c |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index c129510..

Re: raid1 with nbd member hangs MD on SLES10 and RHEL5

2007-06-14 Thread Paul Clements
Mike Snitzer wrote: On 6/14/07, Paul Clements <[EMAIL PROTECTED]> wrote: Mike Snitzer wrote: > Here are the steps to reproduce reliably on SLES10 SP1: > 1) establish a raid1 mirror (md0) using one local member (sdc1) and > one remote member (nbd0) > 2) power off the remot

Re: raid1 with nbd member hangs MD on SLES10 and RHEL5

2007-06-14 Thread Paul Clements
Mike Snitzer wrote: Here are the steps to reproduce reliably on SLES10 SP1: 1) establish a raid1 mirror (md0) using one local member (sdc1) and one remote member (nbd0) 2) power off the remote machine, whereby severing nbd0's connection 3) perform IO to the filesystem that is on the md0 device t

Re: raid1 with nbd member hangs MD on SLES10 and RHEL5

2007-06-14 Thread Paul Clements
Mike Snitzer wrote: Just a quick update; it is really starting to look like there is definitely an issue with the nbd kernel driver. I booted the SLES10 2.6.16.46-0.12-smp kernel with maxcpus=1 to test the theory that the nbd SMP fix that went into 2.6.16 was in some way causing this MD/NBD han

Re: raid1 with nbd member hangs MD on SLES10 and RHEL5

2007-06-14 Thread Paul Clements
Bill Davidsen wrote: Second, AFAIK nbd hasn't working in a while. I haven't tried it in ages, but was told it wouldn't work with smp and I kind of lost interest. If Neil thinks it should work in 2.6.21 or later I'll test it, since I have a machine which wants a fresh install soon, and is both

Re: [PATCH] nbd.c:sock_xmit: cleanup signal related code

2007-06-14 Thread Paul Clements
Oleg Nesterov wrote: sock_xmit() re-implements sigprocmask() and dequeue_signal_lock(). Yeah, that code was written before those existed. Thanks for the clean up. Note: I can't understand this dequeue_signal(), it can dequeue SIGKILL for the user-space task doing nbd_ioctl() ? So we can int

[PATCH] nbd: show nbd client pid in sysfs

2006-12-05 Thread Paul Clements
This simple patch allows nbd to expose the nbd-client daemon's PID in /sys/block/nbd/pid. This is helpful for tracking connection status of a device and for determining which nbd devices are currently in use. Tested against 2.6.19. Thanks, Paul --- ./drivers/block/nbd.c Wed Nov 29 16:57:

[PATCH 2.4.29] nbd: fix ioctl permissions

2005-01-23 Thread Paul Clements
Hi Marcelo, Here's a patch for nbd that Rogier recently sent me. It allows non-root to do BLKGETSIZE, et al. on nbd devices, which he needs for his data recovery applications. Tested against 2.4.29. Please apply. Thanks, Paul From: Rogier Wolff <[EMAIL PROTECTED]> Signed-Off-By: Pa

kernel panic on 2.2.14 in sg driver

2000-11-16 Thread Paul Clements
I am seeing a kernel panic on 2.2.14. It looks like 2.2.16 also has the same problem. Details: I have been able to reproduce a kernel panic several times with kdb compiled in and some added printk debug messages and I have now pinpointed the problem. The panic occurs when the following call is

Re: Raid 1/upgrade to 2.2.16

2000-08-29 Thread Paul Clements
David Lang wrote: > > One thing is that Redhat patches their kernels so the stock kernels > willnot work with the tools that redhat ships. > > another problem appears to be the fact that your new kernel is attempting > to load the modules created for the old kernel. > Yes. You need to run mkini