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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C7FA5C433F5 for ; Wed, 6 Oct 2021 13:18:11 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) (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 26C6B610C8 for ; Wed, 6 Oct 2021 13:18:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 26C6B610C8 Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1633526290; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=gAWqEMIq8B6bx/AE8D3dtS+E827RMM2TSNFLnDdHFpM=; b=XN4LAYgs/cjqWBE7iiEXAvFVL+89eCORRC4XwgsDMUd1r09WDfD8tm2i5JuLRLV9r+jpJ2 I/T0G70W14uWg0N5BjolB43gl1scYUjxGlEW6HSwNzQEACO8z/+uPa1FFGavkqfnT49XcA l8z4PHWJZzvTr54e+QKOAqyu+mwU76w= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-439-npU1wC75MWWfmeqoMY8ZNg-1; Wed, 06 Oct 2021 09:18:06 -0400 X-MC-Unique: npU1wC75MWWfmeqoMY8ZNg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 141B6835DE0; Wed, 6 Oct 2021 13:18:02 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0D76219723; Wed, 6 Oct 2021 13:18:00 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id E7FEA180598A; Wed, 6 Oct 2021 13:17:56 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 196DHsBj014164 for ; Wed, 6 Oct 2021 09:17:54 -0400 Received: by smtp.corp.redhat.com (Postfix) id 299A32157F3D; Wed, 6 Oct 2021 13:17:54 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast03.extmail.prod.ext.rdu2.redhat.com [10.11.55.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 23D252157F3B for ; Wed, 6 Oct 2021 13:17:54 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0A32F811E76 for ; Wed, 6 Oct 2021 13:17:54 +0000 (UTC) Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-1-InbcGAvKMS21Q38DpME9cA-1; Wed, 06 Oct 2021 09:17:52 -0400 X-MC-Unique: InbcGAvKMS21Q38DpME9cA-1 Received: by mail-qv1-f72.google.com with SMTP id 4-20020a05621420a400b003831d93e2b5so655184qvd.12 for ; Wed, 06 Oct 2021 06:17:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=+zbCfVnHe3hEOXNTzkBOuBqFXs5HnnXgmi37Lbo5cf0=; b=gQrQdd4gPFOk+dosaXeLoj9dxefFUbxrbEJw/m0iNEWbr02E6GkMPfzCn7exWP2et/ CtiTUPsUwKH4jy3HlkYiGuWuOEV+WGT6hbG85LIXLvHSDRSmD8DtwU+tlPRNbgQ8y7oI LSlNSoY82QRQUS3z+Z00zh2SYJY54hElp5tbGvRQokl32LXNcSmd3Y3oeXaNUyYNp/7z YK6ZfFCG/gnBm4YIlxOah5hEFYgwEaF4cKEcomMtaJ1YXdiWU2eI50j7LkAfFFBozjp+ /AY0NtTAe6flsQIoJutkG108MCHQNYqt/vWxepHV+sPZaXVlcDJH/+fVGCBBTRHMw6gs yM9A== X-Gm-Message-State: AOAM531mz5cJALdiJq/7xysUujkg9SSbY+Jr00Eg4rb/F06XJvNAbJbH TeMikaw8SMUbMdjCWw6ujBcwmv589cbMjU6Tb1sdZA5lj7VCwlyW0wp8QikT7SUK/7wfPgwDwly 7scHGFIF4r19u7Q== X-Received: by 2002:a05:622a:180f:: with SMTP id t15mr25944901qtc.314.1633526271473; Wed, 06 Oct 2021 06:17:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJ/dfz8opFCb2v5qUfLE0aMcIttTRFyUR16Rj5nDfAcBalXCGeyEeOx/El3NjgM1QYp0hnaw== X-Received: by 2002:a05:622a:180f:: with SMTP id t15mr25944862qtc.314.1633526271274; Wed, 06 Oct 2021 06:17:51 -0700 (PDT) Received: from localhost (pool-68-160-176-52.bstnma.fios.verizon.net. [68.160.176.52]) by smtp.gmail.com with ESMTPSA id r17sm12574405qtx.17.2021.10.06.06.17.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Oct 2021 06:17:50 -0700 (PDT) Date: Wed, 6 Oct 2021 09:17:50 -0400 From: Mike Snitzer To: axboe@kernel.dk, martin.petersen@oracle.com, jejb@linux.ibm.com, sagi@grimberg.me, adrian.hunter@intel.com, beanhuo@micron.com, ulf.hansson@linaro.org, avri.altman@wdc.com, swboyd@chromium.org, agk@redhat.com, josef@toxicpanda.com Message-ID: References: <20210927215958.1062466-1-mcgrof@kernel.org> <20210927215958.1062466-5-mcgrof@kernel.org> MIME-Version: 1.0 In-Reply-To: <20210927215958.1062466-5-mcgrof@kernel.org> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: dm-devel@redhat.com Cc: linux-block@vger.kernel.org, bvanassche@acm.org, linux-scsi@vger.kernel.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, ming.lei@redhat.com, hch@infradead.org, dm-devel@redhat.com, nbd@other.debian.org Subject: Re: [dm-devel] [PATCH v4 4/6] dm: add add_disk() error handling X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dm-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Mon, Sep 27 2021 at 5:59P -0400, Luis Chamberlain wrote: > We never checked for errors on add_disk() as this function > returned void. Now that this is fixed, use the shiny new > error handling. > > There are two calls to dm_setup_md_queue() which can fail then, > one on dm_early_create() and we can easily see that the error path > there calls dm_destroy in the error path. The other use case is on > the ioctl table_load case. If that fails userspace needs to call > the DM_DEV_REMOVE_CMD to cleanup the state - similar to any other > failure. > > Reviewed-by: Hannes Reinecke > Signed-off-by: Luis Chamberlain Reviewed-by: Mike Snitzer -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E04B8C433EF for ; Wed, 6 Oct 2021 13:17:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BED9861131 for ; Wed, 6 Oct 2021 13:17:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231608AbhJFNTq (ORCPT ); Wed, 6 Oct 2021 09:19:46 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:41921 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231378AbhJFNTp (ORCPT ); Wed, 6 Oct 2021 09:19:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1633526273; 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=+zbCfVnHe3hEOXNTzkBOuBqFXs5HnnXgmi37Lbo5cf0=; b=YMqDlv12XO2LnjUUBU7lDeQni7BKIxaMyHTQqVWPWXft4KFCfOMSqL12RVnRMouNTETfmf jrWOdwRjrRby3Jy0hPeDmK14VgYTF7la6A9qFIuKrtNXAXeMna7parq+IOeYWqalHw6Byz QcrNR6gRllLs4ajMGeE0CkPiRWDi6sI= Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-306-0o07qPvkOlqKkGRitzNroQ-1; Wed, 06 Oct 2021 09:17:52 -0400 X-MC-Unique: 0o07qPvkOlqKkGRitzNroQ-1 Received: by mail-qv1-f69.google.com with SMTP id o90-20020a0c85e3000000b0038310a20003so2710864qva.1 for ; Wed, 06 Oct 2021 06:17:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=+zbCfVnHe3hEOXNTzkBOuBqFXs5HnnXgmi37Lbo5cf0=; b=gKgzICqqBgVRr3yyQ0LPa3KgclWH/2t4arakb//+f2NBv58NlvseS8tf42Sr97PHMT vbZB755L3HeOD8wrEbQ9ZPFK/JIaCG8CyNqCwAbooVI/iRwXFvHssVZOELDl+NAD0gxC xmpu2MN4qPL3qMymQHdT2MK66+NVGsLMncgDKuDSHmWthZQVZJBVLUVHETk/z4O39m7o IVF46x9o7wgSrsvdQn7atbcmpWhySaC2uJixC2DiLqT/wb7f1YoT1G0HB0I0htDTkuuG 1zFjs8nZHwX63j3Pp8kn6keaSQOOzKVG6WKWrAb/oNiq5ACCZpuajqC3rPFFY9ymjzcs uYxA== X-Gm-Message-State: AOAM533rmHns0nYUwGL0K+Qg5ppMiCloEc0AKyiOkreX4rlJcxNQFIw5 BUIebHE8iVrDMrDFmLpVMiZRywx46bm7ae7K+8IuZakakHGXyc9kwqR+weyNiswUE8ENO/92dkx o/cVqN8SP8/8zw6BRU4/q8w== X-Received: by 2002:a05:622a:180f:: with SMTP id t15mr25944894qtc.314.1633526271470; Wed, 06 Oct 2021 06:17:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJ/dfz8opFCb2v5qUfLE0aMcIttTRFyUR16Rj5nDfAcBalXCGeyEeOx/El3NjgM1QYp0hnaw== X-Received: by 2002:a05:622a:180f:: with SMTP id t15mr25944862qtc.314.1633526271274; Wed, 06 Oct 2021 06:17:51 -0700 (PDT) Received: from localhost (pool-68-160-176-52.bstnma.fios.verizon.net. [68.160.176.52]) by smtp.gmail.com with ESMTPSA id r17sm12574405qtx.17.2021.10.06.06.17.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Oct 2021 06:17:50 -0700 (PDT) Date: Wed, 6 Oct 2021 09:17:50 -0400 From: Mike Snitzer To: axboe@kernel.dk, martin.petersen@oracle.com, jejb@linux.ibm.com, sagi@grimberg.me, adrian.hunter@intel.com, beanhuo@micron.com, ulf.hansson@linaro.org, avri.altman@wdc.com, swboyd@chromium.org, agk@redhat.com, josef@toxicpanda.com Cc: hch@infradead.org, hare@suse.de, bvanassche@acm.org, ming.lei@redhat.com, linux-scsi@vger.kernel.org, linux-nvme@lists.infradead.org, linux-mmc@vger.kernel.org, dm-devel@redhat.com, nbd@other.debian.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 4/6] dm: add add_disk() error handling Message-ID: References: <20210927215958.1062466-1-mcgrof@kernel.org> <20210927215958.1062466-5-mcgrof@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210927215958.1062466-5-mcgrof@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org On Mon, Sep 27 2021 at 5:59P -0400, Luis Chamberlain wrote: > We never checked for errors on add_disk() as this function > returned void. Now that this is fixed, use the shiny new > error handling. > > There are two calls to dm_setup_md_queue() which can fail then, > one on dm_early_create() and we can easily see that the error path > there calls dm_destroy in the error path. The other use case is on > the ioctl table_load case. If that fails userspace needs to call > the DM_DEV_REMOVE_CMD to cleanup the state - similar to any other > failure. > > Reviewed-by: Hannes Reinecke > Signed-off-by: Luis Chamberlain Reviewed-by: Mike Snitzer 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4A403C433EF for ; Wed, 6 Oct 2021 13:21:28 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 0FF5461130 for ; Wed, 6 Oct 2021 13:21:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0FF5461130 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=B5pl4sL6St0Umwod3410tyOrfhG6IxRmO09AcSzdAgQ=; b=UXnqAIe3fXUnY1 gHI/BQB5LXroz8lcU6J8QqCWa1UHA98+KK7rsYVFD45m0JZk0RPYfZIN2Lm1FaUp5u6lAw3qGS+I+ +82i5QRY2NqJ1BJV3ee76H0119PbAWiDpW/R4GuC8y9h/AH4o4KmpbcVCFVkgNM9CtEbarDd7PKKm Ezpkpax9MNBRBaIjFfxegrn+FDImCof876nUwPoDUCkmB/2XF4jxGmA94Zknp9WorNH9NWabBh+AY GzTio4+WFhM6nBe7CuUIFPJ4Brp34t3ulp0RBMInv/6moOvJi59hRIm7NmXKdc9wFTz0UR1BTV4dx 5iNIIBYnUdZGWGatI8Tg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mY6qB-00EMdT-OY; Wed, 06 Oct 2021 13:20:11 +0000 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mY6q8-00EMcE-EP for linux-nvme@lists.infradead.org; Wed, 06 Oct 2021 13:20:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1633526405; 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=+zbCfVnHe3hEOXNTzkBOuBqFXs5HnnXgmi37Lbo5cf0=; b=dDOVndOxjbd1BpuIMMr0vRddUX1gKi90fG+5nEXoNii96xYuUVPhDgtQKHYeFYvlW575tr Fs+VB3m/R1KvsRPG9fBZIgGXzaf1Rz5tWf2kSbJ5qqoOXyaLcZFrotFjEZK03i5NVLOw0+ TImEp244iU5B3JCC2al2BkVL4qQOFZ8= Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-237-zsWxqq20M3-pw2_SdmsXzA-1; Wed, 06 Oct 2021 09:17:52 -0400 X-MC-Unique: zsWxqq20M3-pw2_SdmsXzA-1 Received: by mail-qv1-f72.google.com with SMTP id gi5-20020a056214248500b00382f7a7c7e6so2623295qvb.21 for ; Wed, 06 Oct 2021 06:17:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=+zbCfVnHe3hEOXNTzkBOuBqFXs5HnnXgmi37Lbo5cf0=; b=BwRlUJRBcxw2PiHHv8F40VTmGTtxJLOY0zelaEdRjd/8rFjtu3AnRxOV1ORPh/gFaM g6+l6QKJ6tWbUGviTWzAOspCbwjuoPdHuhn1oN41hpc0iun16wD5u57QgVjULa6if520 zE3RbuFWg54vB4EqfXUjGTVHTAB/jZ+oRmAjCNJlbnjTPrXfto8csKDo/6httyjx2Pls kprE9wit1/dpJ+giQRbWBI7uZd3Z26PK9C84O6RzGHdMgjD5SC4amu/gEz2ezZMc+rob iLFvxIkUILLCDjKR3Ytvgo+kraaWdF6is5pVwBovFdS4yJ9l9TvrWJyMdhcwSGmEovIs n1Cg== X-Gm-Message-State: AOAM531c4CT1DOJWOzXfkwWXUYVOq3idi/tpc8tAH96j1TXKFLItBHu9 9ns0ndNAP/499iSTwbPREM58QrIjvCwP3ifPEQziY0y1ur5++l5KNZDAqs6dzp5Sffk78VqIkzR LlfldnoR4JoHVl91miXjoahOnJw== X-Received: by 2002:a05:622a:180f:: with SMTP id t15mr25944890qtc.314.1633526271468; Wed, 06 Oct 2021 06:17:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJ/dfz8opFCb2v5qUfLE0aMcIttTRFyUR16Rj5nDfAcBalXCGeyEeOx/El3NjgM1QYp0hnaw== X-Received: by 2002:a05:622a:180f:: with SMTP id t15mr25944862qtc.314.1633526271274; Wed, 06 Oct 2021 06:17:51 -0700 (PDT) Received: from localhost (pool-68-160-176-52.bstnma.fios.verizon.net. [68.160.176.52]) by smtp.gmail.com with ESMTPSA id r17sm12574405qtx.17.2021.10.06.06.17.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Oct 2021 06:17:50 -0700 (PDT) Date: Wed, 6 Oct 2021 09:17:50 -0400 From: Mike Snitzer To: axboe@kernel.dk, martin.petersen@oracle.com, jejb@linux.ibm.com, sagi@grimberg.me, adrian.hunter@intel.com, beanhuo@micron.com, ulf.hansson@linaro.org, avri.altman@wdc.com, swboyd@chromium.org, agk@redhat.com, josef@toxicpanda.com Cc: hch@infradead.org, hare@suse.de, bvanassche@acm.org, ming.lei@redhat.com, linux-scsi@vger.kernel.org, linux-nvme@lists.infradead.org, linux-mmc@vger.kernel.org, dm-devel@redhat.com, nbd@other.debian.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 4/6] dm: add add_disk() error handling Message-ID: References: <20210927215958.1062466-1-mcgrof@kernel.org> <20210927215958.1062466-5-mcgrof@kernel.org> MIME-Version: 1.0 In-Reply-To: <20210927215958.1062466-5-mcgrof@kernel.org> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=snitzer@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211006_062008_604437_D724BD04 X-CRM114-Status: GOOD ( 12.59 ) X-BeenThere: linux-nvme@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-nvme" Errors-To: linux-nvme-bounces+linux-nvme=archiver.kernel.org@lists.infradead.org On Mon, Sep 27 2021 at 5:59P -0400, Luis Chamberlain wrote: > We never checked for errors on add_disk() as this function > returned void. Now that this is fixed, use the shiny new > error handling. > > There are two calls to dm_setup_md_queue() which can fail then, > one on dm_early_create() and we can easily see that the error path > there calls dm_destroy in the error path. The other use case is on > the ioctl table_load case. If that fails userspace needs to call > the DM_DEV_REMOVE_CMD to cleanup the state - similar to any other > failure. > > Reviewed-by: Hannes Reinecke > Signed-off-by: Luis Chamberlain Reviewed-by: Mike Snitzer _______________________________________________ Linux-nvme mailing list Linux-nvme@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-nvme