From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751781AbcFYR4p (ORCPT ); Sat, 25 Jun 2016 13:56:45 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:34409 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751123AbcFYR4o (ORCPT ); Sat, 25 Jun 2016 13:56:44 -0400 MIME-Version: 1.0 In-Reply-To: <576D38C4.6050702@redhat.com> References: <1962682.lYRJ5o9hTF@adelgunde> <1466762976-12648-1-git-send-email-pranjas@gmail.com> <1466762976-12648-4-git-send-email-pranjas@gmail.com> <576D38C4.6050702@redhat.com> From: Pranay Srivastava Date: Sat, 25 Jun 2016 23:26:42 +0530 Message-ID: Subject: Re: [Nbd] [PATCH 3/3]nbd: make nbd device wait for its users To: Eric Blake Cc: Markus Pargmann , nbd-general@lists.sourceforge.net, linux-kernel@vger.kernel.org, Wouter Verhelst Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Eric, On Fri, Jun 24, 2016 at 7:12 PM, Eric Blake wrote: > On 06/24/2016 04:09 AM, Pranay Kr. Srivastava wrote: >> When a timeout occurs or a recv fails, then >> instead of abruplty killing nbd block device > > s/abruplty/abruptly/ > >> wait for it's users to finish. > > s/it's/its/ > >> >> This is more required when filesystem(s) like >> ext2 or ext3 don't expect their buffer heads to >> disappear while the filesystem is mounted. >> >> Each open of a nbd device is refcounted, while >> the userland program [nbd-client] doing the >> NBD_DO_IT ioctl would now wait for any other users >> of this device before invalidating the nbd device. >> >> A timedout or a disconnected device, if in use, can't >> be used until it has been resetted. The resetting happens > > s/resetted/reset/ > Thanks for going through the patch. Can I get some review on the code as well so I can fix and resend that too, along with fixes of grammatical errors. >> when all tasks having this bdev open closes this bdev. >> >> Signed-off-by: Pranay Kr. Srivastava >> --- >> drivers/block/nbd.c | 124 ++++++++++++++++++++++++++++++++++++++++------------ >> 1 file changed, 96 insertions(+), 28 deletions(-) >> > > > -- > Eric Blake eblake redhat com +1-919-301-3266 > Libvirt virtualization library http://libvirt.org > -- ---P.K.S