Re: [PATCH 08/10] dm: add add_disk() error handling
- To: Luis Chamberlain <mcgrof@kernel.org>
- Cc: Christoph Hellwig <hch@infradead.org>, axboe@kernel.dk, martin.petersen@oracle.com, jejb@linux.ibm.com, kbusch@kernel.org, sagi@grimberg.me, adrian.hunter@intel.com, beanhuo@micron.com, ulf.hansson@linaro.org, avri.altman@wdc.com, swboyd@chromium.org, agk@redhat.com, snitzer@redhat.com, josef@toxicpanda.com, 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 08/10] dm: add add_disk() error handling
- From: Christoph Hellwig <hch@infradead.org>
- Date: Sat, 28 Aug 2021 08:35:57 +0100
- Message-id: <[🔎] YSnnXdKLvxEY8yay@infradead.org>
- In-reply-to: <[🔎] YSk1EhUIr9OjIoVv@bombadil.infradead.org>
- References: <20210823202930.137278-1-mcgrof@kernel.org> <20210823202930.137278-9-mcgrof@kernel.org> <[🔎] YSSP6ujNQttGN2sZ@infradead.org> <[🔎] YSk1EhUIr9OjIoVv@bombadil.infradead.org>
On Fri, Aug 27, 2021 at 11:55:14AM -0700, Luis Chamberlain wrote:
> > I think the add_disk should just return r. If you look at the
> > callers they eventualy end up in dm_table_destroy, which does
> > this cleanup.
>
> I don't see it. What part of dm_table_destroy() does this?
Sorry, dm_destroy, not dm_table_destroy. For dm_early_create it's
trivial as that calls both dm_table_destroy and dm_destroy in the error
path. The normal table_load case is a separate ioctl, but if that
fails userspace needs to call the DM_DEV_REMOVE_CMD to cleanup
the state - similar to any other failure.
Reply to: