From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F35DFC47094 for ; Thu, 10 Jun 2021 09:19:39 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B2408613ED for ; Thu, 10 Jun 2021 09:19:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B2408613ED Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:48208 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lrGqg-00080b-Rd for qemu-devel@archiver.kernel.org; Thu, 10 Jun 2021 05:19:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58240) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lrGpW-000771-FU for qemu-devel@nongnu.org; Thu, 10 Jun 2021 05:18:26 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:27838) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lrGpT-0005mF-C1 for qemu-devel@nongnu.org; Thu, 10 Jun 2021 05:18:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623316702; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=t6DnKYYZTfBefPnZWtd6voBCBTIR3xby6X84E2unql8=; b=PxBegSmp1IKdhQIKe6aYyeOayewOFa6Hia6CxCH6ZtMVxxH5zEk3GcWfzVD1mj0//HVkoQ xMe8gfKbDc4dtq8wVpkzpyASXMuSvojBIn4Auw1ys1HfJg5YDvBfbkA7C8o0YUueQQ1RqY Pc0/a89iuEFTuC1sSzeuRdxdCsH+9bU= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-273-ELznpL4dMImLsgwx7hOGuw-1; Thu, 10 Jun 2021 05:18:21 -0400 X-MC-Unique: ELznpL4dMImLsgwx7hOGuw-1 Received: by mail-ed1-f72.google.com with SMTP id s25-20020aa7c5590000b0290392e051b029so8848089edr.11 for ; Thu, 10 Jun 2021 02:18:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=t6DnKYYZTfBefPnZWtd6voBCBTIR3xby6X84E2unql8=; b=chFkfc6SJVh5FCl6KGhb6y8yl2lGHwHdj2mGPMHuDCUYHFx3h2XT0/8twqRPeEtfVb WrYxt637+0KPR1Bl6y3jjmPaQMwegCfcPYMQslQZ9lNZGiZx7hAsdrYeJxwvhMuX+AXJ GtAYTAygDyARHvG4u+ndKIvNjrTaVJcYy4pi7iYz5+ra0z1fcQQxyJoKXr6TvfA1AN38 ycWC7hJVKX0RniMWtOE3U5Q0OIhxR19k3+kDy5n8HIINUoK8DHF4aecqrsHmNhVgsdVT C+RJDdVj4p+I8vJLyEPAVgE2bNxL46ZGWIlQMi9dMXxkZ/MOHxOkRv1hPA7WCiRZHJvA a+HA== X-Gm-Message-State: AOAM5308LhE88NcLtuMxUu0R69+vtQGKAUTQ2eoZXRaZ5NONOCgZ9vxq 4rnw4bVaPyDRDkYI2XgLbVBEcloDz1M4Syb4fZdwRilNiOr/+8OXygC3wrOKkRKpW4uPPtC1pSd 7bJtyR2oHIpmrw8c= X-Received: by 2002:a17:906:264c:: with SMTP id i12mr3530062ejc.101.1623316700470; Thu, 10 Jun 2021 02:18:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwzseFIlwF5rrL5r1dMuhDUNUtNCvNo8T9gVsZjwY7ge7Brehdq4RqLULVYZjH24RNigliXGQ== X-Received: by 2002:a17:906:264c:: with SMTP id i12mr3530045ejc.101.1623316700289; Thu, 10 Jun 2021 02:18:20 -0700 (PDT) Received: from steredhat (host-79-18-148-79.retail.telecomitalia.it. [79.18.148.79]) by smtp.gmail.com with ESMTPSA id t18sm1044207edw.47.2021.06.10.02.18.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Jun 2021 02:18:20 -0700 (PDT) Date: Thu, 10 Jun 2021 11:18:17 +0200 From: Stefano Garzarella To: Kevin Wolf Subject: Re: [PATCH 6/7] vhost-user-blk: Factor out vhost_user_blk_realize_connect() Message-ID: <20210610091817.ijuuyt7n5hreiupi@steredhat> References: <20210609154658.350308-1-kwolf@redhat.com> <20210609154658.350308-7-kwolf@redhat.com> MIME-Version: 1.0 In-Reply-To: <20210609154658.350308-7-kwolf@redhat.com> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=sgarzare@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline Received-SPF: pass client-ip=216.205.24.124; envelope-from=sgarzare@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.199, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org, mst@redhat.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Wed, Jun 09, 2021 at 05:46:57PM +0200, Kevin Wolf wrote: >This function is the part that we will want to retry if the connection >is lost during initialisation, so factor it out to keep the following >patch simpler. > >The error path for vhost_dev_get_config() forgot disconnecting the >chardev, add this while touching the code. > >Signed-off-by: Kevin Wolf >--- > hw/block/vhost-user-blk.c | 48 ++++++++++++++++++++++++++------------- > 1 file changed, 32 insertions(+), 16 deletions(-) Reviewed-by: Stefano Garzarella