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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 35610C7EE30 for ; Fri, 3 Mar 2023 02:25:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229703AbjCCCZp (ORCPT ); Thu, 2 Mar 2023 21:25:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229659AbjCCCZo (ORCPT ); Thu, 2 Mar 2023 21:25:44 -0500 Received: from out30-99.freemail.mail.aliyun.com (out30-99.freemail.mail.aliyun.com [115.124.30.99]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9971B460A4; Thu, 2 Mar 2023 18:25:42 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R181e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046060;MF=ziyangzhang@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0Vcz9kbA_1677810339; Received: from 30.97.56.172(mailfrom:ZiyangZhang@linux.alibaba.com fp:SMTPD_---0Vcz9kbA_1677810339) by smtp.aliyun-inc.com; Fri, 03 Mar 2023 10:25:40 +0800 Message-ID: <32db6601-8cb2-da04-fad1-82c17eb96a6e@linux.alibaba.com> Date: Fri, 3 Mar 2023 10:25:39 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [RFC PATCH 10/12] block: ublk_drv: mark device as LIVE before adding disk Content-Language: en-US To: Ming Lei Cc: linux-block@vger.kernel.org, Miklos Szeredi , io-uring@vger.kernel.org, Jens Axboe , Xiaoguang Wang , Bernd Schubert References: <20230301140611.163055-1-ming.lei@redhat.com> <20230301140611.163055-11-ming.lei@redhat.com> From: Ziyang Zhang In-Reply-To: <20230301140611.163055-11-ming.lei@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org On 2023/3/1 22:06, Ming Lei wrote: > IO can be started before add_disk() returns, such as reading parititon table, > then the monitor work should work for making forward progress. > > So mark device as LIVE before adding disk, meantime change to > DEAD if add_disk() fails. > > Signed-off-by: Ming Lei > --- Reviewed-by: Ziyang Zhang