[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Nbd] [PATCH] nbd: new nbd sysfs entries



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: