Re: [Nbd] [PATCH] nbd: new nbd sysfs entries
- To: Paul Clements <paul.clements@...856...>
- Cc: nbd-general@lists.sourceforge.net, andrew morton <akpm@...133...>, kernel list <linux-kernel@...25...>
- Subject: Re: [Nbd] [PATCH] nbd: new nbd sysfs entries
- From: Greg KH <greg@...926...>
- Date: Wed, 3 Aug 2011 16:50:36 -0700
- Message-id: <20110803235036.GA18947@...926...>
- In-reply-to: <CAECXXi5Q=NwrD3AsnUp41cX1PpM8Qf468-f_ENi8LDpfgyrotA@...18...>
- References: <CAECXXi5Q=NwrD3AsnUp41cX1PpM8Qf468-f_ENi8LDpfgyrotA@...18...>
On Wed, Aug 03, 2011 at 07:32:39PM -0400, Paul Clements wrote:
> Description: Add 3 new sysfs entries to nbd.
>
> # cat /sys/block/nbd6/nbd/peer
> 127.0.0.1
> # cat /sys/block/nbd6/nbd/flags
> 0
> # cat /sys/block/nbd6/nbd/xmit_timeout
> 6
Any new sysfs file (or removal or modification) also requires a matching
Documentation/ABI/ file as well. Please include it in this patch (if it
ends up surviving...)
> This patch depends on patch nbd-sysfs-framework.diff
I didn't like that one, it was wrong and I also think you caused a
reference count issue by adding a kobject to that structure...
> Description: Add 3 new sysfs entries to nbd.
>
> # cat /sys/block/nbd6/nbd/peer
> 127.0.0.1
> # cat /sys/block/nbd6/nbd/flags
> 0
> # cat /sys/block/nbd6/nbd/xmit_timeout
> 6
>
> This patch depends on patch nbd-sysfs-framework.diff
>
> From: Paul Clements <paul.clements@...124...>
> Signed-off-by: Paul Clements <paul.clements@...124...>
> ---
>
> nbd.c | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
> 1 file changed, 77 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
> index 23f3619..44cd41d 100644
> --- a/drivers/block/nbd.c
> +++ b/drivers/block/nbd.c
> @@ -136,7 +136,7 @@ static void sock_shutdown(struct nbd_device *lo, int lock)
> mutex_unlock(&lo->tx_lock);
> }
>
> -static void nbd_xmit_timeout(unsigned long arg)
> +static void xmit_timeout(unsigned long arg)
Why change the name of this function? You now have a function, field,
and sysfs file with that same name, talk about a way to cause confusion
when reading the code :(
greg k-h
Reply to: