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 lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 744FAC001E0 for ; Wed, 2 Aug 2023 16:33:29 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1qREmt-0003av-G8; Wed, 02 Aug 2023 16:33:28 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1qREms-0003ap-Ak for linux-f2fs-devel@lists.sourceforge.net; Wed, 02 Aug 2023 16:33:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=hoDXqXS3qmSQoEAHWNB0AO6Jg7bbIoxeE3c0cwIdaqg=; b=ZmxPv3pEjUfG/4p/+UnsRH8xzT c4y6EUnmlpypv8N+psPtPd0kL5K0cQ5qvO86d5TabbeUikEa2w6WEKaCvEShJoUrsBcUUHhx9VaIy BoZGz72U15BUpNjLpBnivkLTWvToP26BGj0I7dUNIVwcZXACDXCrWx8tcjFta8/+oIxQ=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To :From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=hoDXqXS3qmSQoEAHWNB0AO6Jg7bbIoxeE3c0cwIdaqg=; b=GoW8TWO/QjAITqMDUwrW0ZBLKz ELzZuxzjXKEPHKWlyjU/c0X6F+nIdGll/hqYHO/QWxByKMOSzkSGwcTQnCfnWq4AYhU6TG3hz+QLm y6wpuzTePBC3wiC4QnUQxtFfE+4t+yjYxrbMni5orqgSvoxSgSEGWEneme+vmyuAYV4g=; Received: from dfw.source.kernel.org ([139.178.84.217]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1qREms-00Au9V-QR for linux-f2fs-devel@lists.sourceforge.net; Wed, 02 Aug 2023 16:33:27 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 35CF061A39; Wed, 2 Aug 2023 16:33:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8773FC433C7; Wed, 2 Aug 2023 16:33:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690994000; bh=U5pXU2c37LOZ29omq1nYjOha2+PkFnv5cZZI28wk6xI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VbhXgLKwgsrsAQ9lKMSn42pa4Ylk6IKQnzpDE7eTo6XWu8QXA8ASoiiWUp5vePHa4 rqKYL37JGUX9BYkCAq6Qa8f7fGtfFLzcMqz+eu6fI8dgYR1AAcKZIwk67k6sSHEK5a Njz82jH8Ug+YQ2Q1h4sDTGfhQcEv4iGu0G/SVUWQa2Pt/MuSQ64lm77P0GczVG9m1Q DKM8m4hoED2p4UVsLydshoE+nAb2SHTV3Q+EDW0nZpH+Ge1CA1glHR2oD3mFU2ZrFO Onx7JmBXl+uQCY9uDiWr6KaBHqsgZYWYOWiRpEIGfLcVhIwvH7UOPO/1IFtwzm3fow kufdy4/TMWpFw== Date: Wed, 2 Aug 2023 09:33:20 -0700 From: "Darrick J. Wong" To: Christoph Hellwig Message-ID: <20230802163320.GX11352@frogsfrogsfrogs> References: <20230802154131.2221419-1-hch@lst.de> <20230802154131.2221419-13-hch@lst.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230802154131.2221419-13-hch@lst.de> X-Headers-End: 1qREms-00Au9V-QR Subject: Re: [f2fs-dev] [PATCH 12/12] xfs use fs_holder_ops for the log and RT devices X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jens Axboe , linux-block@vger.kernel.org, Christian Brauner , linux-nilfs@vger.kernel.org, Jan Kara , linux-fsdevel@vger.kernel.org, Josef Bacik , linux-f2fs-devel@lists.sourceforge.net, linux-xfs@vger.kernel.org, Chris Mason , Andreas Dilger , Al Viro , Jaegeuk Kim , David Sterba , Theodore Ts'o , linux-ext4@vger.kernel.org, Ryusuke Konishi , linux-btrfs@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On Wed, Aug 02, 2023 at 05:41:31PM +0200, Christoph Hellwig wrote: > Use the generic fs_holder_ops to shut down the file system when the > log or RT device goes away instead of duplicating the logic. > > Signed-off-by: Christoph Hellwig Nice cleanup, Reviewed-by: Darrick J. Wong --D > --- > fs/xfs/xfs_super.c | 17 +++-------------- > 1 file changed, 3 insertions(+), 14 deletions(-) > > diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c > index d5042419ed9997..338eba71ff8667 100644 > --- a/fs/xfs/xfs_super.c > +++ b/fs/xfs/xfs_super.c > @@ -377,17 +377,6 @@ xfs_setup_dax_always( > return 0; > } > > -static void > -xfs_bdev_mark_dead( > - struct block_device *bdev) > -{ > - xfs_force_shutdown(bdev->bd_holder, SHUTDOWN_DEVICE_REMOVED); > -} > - > -static const struct blk_holder_ops xfs_holder_ops = { > - .mark_dead = xfs_bdev_mark_dead, > -}; > - > STATIC int > xfs_blkdev_get( > xfs_mount_t *mp, > @@ -396,8 +385,8 @@ xfs_blkdev_get( > { > int error = 0; > > - *bdevp = blkdev_get_by_path(name, BLK_OPEN_READ | BLK_OPEN_WRITE, mp, > - &xfs_holder_ops); > + *bdevp = blkdev_get_by_path(name, BLK_OPEN_READ | BLK_OPEN_WRITE, > + mp->m_super, &fs_holder_ops); > if (IS_ERR(*bdevp)) { > error = PTR_ERR(*bdevp); > xfs_warn(mp, "Invalid device [%s], error=%d", name, error); > @@ -412,7 +401,7 @@ xfs_blkdev_put( > struct block_device *bdev) > { > if (bdev) > - blkdev_put(bdev, mp); > + blkdev_put(bdev, mp->m_super); > } > > STATIC void > -- > 2.39.2 > _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel