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 86B77CE7A95 for ; Mon, 25 Sep 2023 07:48:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232433AbjIYHsu (ORCPT ); Mon, 25 Sep 2023 03:48:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58514 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230148AbjIYHst (ORCPT ); Mon, 25 Sep 2023 03:48:49 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F8CAD3; Mon, 25 Sep 2023 00:48:43 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id F173068D05; Mon, 25 Sep 2023 09:48:38 +0200 (CEST) Date: Mon, 25 Sep 2023 09:48:38 +0200 From: Christoph Hellwig To: Samuel Holland Cc: Christoph Hellwig , Al Viro , Christian Brauner , Jens Axboe , Denis Efremov , Josef Bacik , Stefan Haberland , Jan Hoeppner , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , "Darrick J . Wong" , Chris Mason , David Sterba , linux-block@vger.kernel.org, nbd@other.debian.org, linux-s390@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, Shinichiro Kawasaki Subject: Re: [PATCH 07/17] nbd: call blk_mark_disk_dead in nbd_clear_sock_ioctl Message-ID: <20230925074838.GA28522@lst.de> References: <20230811100828.1897174-1-hch@lst.de> <20230811100828.1897174-8-hch@lst.de> <79af9398-167f-440e-a493-390dc4ccbd85@sifive.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <79af9398-167f-440e-a493-390dc4ccbd85@sifive.com> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org On Wed, Sep 20, 2023 at 03:41:11PM -0500, Samuel Holland wrote: > [ 14.619101] Buffer I/O error on dev nbd0, logical block 0, async page read > > [ 14.630490] nbd0: unable to read partition table > > I wonder if disk_force_media_change() is the right thing to call here instead. So what are the semantics of clearing the socket? The <= 6.5 behavior of invalidating fs caches, but not actually marking the fs shutdown is pretty broken, especially if this expects to resurrect the device and thus the file system later on.