Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp799801pxb; Thu, 21 Oct 2021 09:41:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwP1pO0VVp2RmJ3by9LRvQ5UaWphkO+DF4phhUHDzlL1i//8ghu5E/I4SPPRyvXSV5mcnFb X-Received: by 2002:a17:906:af8f:: with SMTP id mj15mr2910203ejb.17.1634834488052; Thu, 21 Oct 2021 09:41:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634834488; cv=none; d=google.com; s=arc-20160816; b=h7WTVpKEt7MX7xUtVFyflKZDsIelJ4IznKI/jtAqgWUnEvwLuwEwUuRWnOPoSboDYG 5JpWp9vLakFtqissKynwYFFYqeI3aJRGTmmnSdL6kYjJp4RIGrvIF+7e16vj+dfRjLFL SOcJTV6LkoZd6GhEpBMQP+wQZrI1n2JiJYBdy2tAnRs8M7srAPolp+OxnMLXmhQSCa+Z Oxz+XrIAGnwB+XZlqr1I4GqfmJblq6Nk4w/W6HyW2Eu/zQDNCuAJg4EeAgVtl17T9YNI WZ5rygbeL+iH96H+X1icdy/i+15HaiRmWm5JomhpssxkSINfspyG3yGp3erUu6TNiHSM gNVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=+HTJWJrd9rZKk81dNjjaOacqrLI32yRAcBDJVKSMPKU=; b=JWSlJlgrIAsLIwUl01feyx2+FMSuL1Q71uebUrBcNd/FGsURl6izXTW1dJCSXN8+oy GnURX/rc/Miv+EpoBonQpp3FMwusx6RwXzeW9s2iAWM85xPoSdP/6as+YyZPqyKlBA/p 7ugyS8Dz/V0MQgomoCicxZ5V7OMcYJeNzMLgU2WoHFqxf3OjA8PoQg0N+7PineLzI7GN Caq6nDC3QF5ETLXLOCeB73iqd1gxWLcAazKRXSjt2+f2i6UyCWZ3yTBlZAfw2OKDOXpT y25r7lA2IYyvqzOiTo44KWKqRvp8F3ZAvexkOydyubZySNVIo+yFSiALQGW5VENV3VZg 1NDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=fDQKgsDz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b8si9423018edz.9.2021.10.21.09.41.02; Thu, 21 Oct 2021 09:41:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=fDQKgsDz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232119AbhJUQlZ (ORCPT + 99 others); Thu, 21 Oct 2021 12:41:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42320 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230103AbhJUQlW (ORCPT ); Thu, 21 Oct 2021 12:41:22 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43783C0613B9; Thu, 21 Oct 2021 09:39:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=+HTJWJrd9rZKk81dNjjaOacqrLI32yRAcBDJVKSMPKU=; b=fDQKgsDz6lz/2o0SgY00VzX+Dq AVM6dWMf6vomhDcR+uJaiANhzqqDW/KSK1SRfoPUmWVKLSbjJZGA1ZEuvVFjmEDXFAZ6xy1d/dPB+ H+Y1vzMxLr4gT766Fd9xwI0mLv92P97flZflO7UbnJ9gID7regIXJvm/7sc0sfBvKKZTibRcjwX9I S2qaowC3KN03Ms0HB4qSwdf8jc1aDB+pKxBlKaUyKtBgQ+eUWfuokUZv6x3u/x6UhcLqfAfjWQpKH GbGnFJo+S1cgErwXS8azOYZ2ogzfwj22prCFURukhk1nC2HeG6AQKpjQxZtmGKnO0OpY6RsYlRGS5 khIFBxrg==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdb5l-008OYu-UU; Thu, 21 Oct 2021 16:38:57 +0000 From: Luis Chamberlain To: axboe@kernel.dk, hch@lst.de, penguin-kernel@i-love.sakura.ne.jp, schmitzmic@gmail.com, efremov@linux.com, song@kernel.org, jejb@linux.ibm.com, martin.petersen@oracle.com, viro@zeniv.linux.org.uk, hare@suse.de, jack@suse.cz, ming.lei@redhat.com, tj@kernel.org Cc: linux-raid@vger.kernel.org, linux-scsi@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Luis Chamberlain Subject: [PATCH v3 0/3] last batch of add_disk() error handling conversions Date: Thu, 21 Oct 2021 09:38:53 -0700 Message-Id: <20211021163856.2000993-1-mcgrof@kernel.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: Luis Chamberlain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is v3 series of the last patch set which should be considered once nvdimm/blk driver is removed, as Dan Williams noted it would be gone and once *all* add_disk() error handling patches have been merged. I rebased Tetsuo Handa's patch onto the latest linux-next as this series depends on it, and so I am sending it part of this series as without it, this won't apply. Tetsuo, does the rebase of your patch look OK? If it is not too much trouble, I'd like to ask for testing for the ataflop changes from Michael Schmitz, if possible, that is he'd just have to merge Tetsuo's rebased patch and the 2nd patch in this series. This is all rebased on linux-next tag 20211020. Changes in this v3: - we don't set ataflop registered to true when we fail, an issue spotted during review by Tetsuo - rebased to take into consideration Tetsuo's changes, both his old and the latest patch carried in this series - sets the floppy to null on failure from add_disk(), an issue spotted by Tetsuo during patch review - removes out label from ataflop as suggested by Finn Thain - we return the failure from floppy_alloc_disk as suggested by Finn Thain Luis Chamberlain (2): block: make __register_blkdev() return an error block: add __must_check for *add_disk*() callers Tetsuo Handa (1): ataflop: remove ataflop_probe_lock mutex block/bdev.c | 5 +++- block/genhd.c | 27 +++++++++++------ drivers/block/ataflop.c | 66 +++++++++++++++++++++++++---------------- drivers/block/brd.c | 7 +++-- drivers/block/floppy.c | 17 ++++++++--- drivers/block/loop.c | 11 +++++-- drivers/md/md.c | 12 ++++++-- drivers/scsi/sd.c | 3 +- include/linux/genhd.h | 10 +++---- 9 files changed, 105 insertions(+), 53 deletions(-) -- 2.30.2