Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp2291863rwo; Thu, 3 Aug 2023 07:28:04 -0700 (PDT) X-Google-Smtp-Source: APBJJlGl0rrkrGJr+pJXdNoFQ5gEoB/AreaMTHqhIBQuayHMTpKxXuFaLOrXFoLCk8lJcgdDfejM X-Received: by 2002:a05:6402:1ac7:b0:522:3081:ddba with SMTP id ba7-20020a0564021ac700b005223081ddbamr8285506edb.15.1691072884289; Thu, 03 Aug 2023 07:28:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691072884; cv=none; d=google.com; s=arc-20160816; b=Moki+1zfyIX/JXTQK/nM/ND1zUDVSKVxr6/UHTqHPANNGyeIi62Ev7CDTlunQfid8P lQqs/VnS3gfSETbj0LcKtPuNu9RfRlugKRHk6gxCME0egcvYaVvhQSSqo0zmvKyfc0bx LGVuhCb0HOvBVIwJTZ4x/2IeGbtI6s710Glm5G8BnrlV0ld0IG2GUrrJxiyFgt2qnQCC M9Z0yxEUR7lVehsxQTNialDkq89V4Lo4xtRs4XcCCk8nMmsz6BR7Dlx7w/aCoioOqF4j zp7LZLbrNWHkGI19XWABHqH6CskBwsps75USzG1owSYi9yWp9kn0jgGf+SINIBDl+4J2 q+jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=czrjJnN2HxRC7i/fG8IN5ZkPGObJTznqSzeqzEFMAfI=; fh=wuOMse76qtNuGj53rjtYpjyLfPslK5YzTYUod4PV/qk=; b=X9L+D7xHv4ErGw+UaaByo8TrwGi4MLv5i0xX3DeT/JxY8q6btgBNO0NtnueABhFOFC k7VrdGo7jsVbm33TON3uyWBw8mY2nAur4k0lYFepmVRIKVg7hVLKwp8WxRm5bwAuRxB2 VCJ+06Ab+mOcBSpuiYlZokNdsuAtfv91uFFOPh0NwWQazmcGLGwlMpoI46oi9e+vD0Vf FJYt4Bg49hs+nNTB3Y5G1Yf0kC9J1I+1sWCldDpNW/4vTEpHWQ4uGr1abGCQ6uVjiRbb SQTeR8Pa1mzCg9UMPthBs9Zxl4EHkh85es+uG8Hkt42bbQSvEmR36MvTjBbCUoCFg+tL wrVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=wq91WWpv; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=n8k+znUS; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c24-20020aa7df18000000b00522c86664a5si546581edy.380.2023.08.03.07.27.39; Thu, 03 Aug 2023 07:28:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=wq91WWpv; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=n8k+znUS; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234218AbjHCN0V (ORCPT + 99 others); Thu, 3 Aug 2023 09:26:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233978AbjHCN0P (ORCPT ); Thu, 3 Aug 2023 09:26:15 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0161526B0; Thu, 3 Aug 2023 06:26:13 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id B946021940; Thu, 3 Aug 2023 13:26:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1691069172; h=from:from:reply-to: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=czrjJnN2HxRC7i/fG8IN5ZkPGObJTznqSzeqzEFMAfI=; b=wq91WWpvnSedYJdGwxyAHRuhULngL4TW+QxyjlQSIgOm9vzoIijZL+fuXgGH27SgDGDcHV FoeCFq/0aiqhvder0VM5024ioXOum9rplassX+LEAzRT3adw+Xf1v0nNIhphuKiBV/N2l+ L3SYhOBPBF6HKsy54g0r11BfGvDb168= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1691069172; h=from:from:reply-to: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=czrjJnN2HxRC7i/fG8IN5ZkPGObJTznqSzeqzEFMAfI=; b=n8k+znUSFN07XPPJXmlt2RR0X8ZEt40U6FtziK4ImHIaG9rsYzEY9lfUUW8vYHrWf7+dQ6 UeiGqgm46X8GZ0DQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 9EB7F134B0; Thu, 3 Aug 2023 13:26:12 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id Xiy9JvSqy2QpbwAAMHmgww (envelope-from ); Thu, 03 Aug 2023 13:26:12 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id 38424A076B; Thu, 3 Aug 2023 15:26:12 +0200 (CEST) Date: Thu, 3 Aug 2023 15:26:12 +0200 From: Jan Kara To: Christoph Hellwig Cc: Al Viro , Christian Brauner , Jan Kara , Chris Mason , Josef Bacik , David Sterba , Theodore Ts'o , Andreas Dilger , Jaegeuk Kim , Chao Yu , Ryusuke Konishi , "Darrick J. Wong" , Jens Axboe , linux-btrfs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-nilfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-block@vger.kernel.org Subject: Re: [PATCH 10/12] ext4: use fs_holder_ops for the log device Message-ID: <20230803132612.xyy34buhujno42ia@quack3> References: <20230802154131.2221419-1-hch@lst.de> <20230802154131.2221419-11-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230802154131.2221419-11-hch@lst.de> X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Wed 02-08-23 17:41:29, Christoph Hellwig wrote: > Use the generic fs_holder_ops to shut down the file system when the > log device goes away instead of duplicating the logic. > > Signed-off-by: Christoph Hellwig Looks good. Feel free to add: Reviewed-by: Jan Kara Honza > --- > fs/ext4/super.c | 11 +---------- > 1 file changed, 1 insertion(+), 10 deletions(-) > > diff --git a/fs/ext4/super.c b/fs/ext4/super.c > index 2ccb19d345c6dd..063832e2d12a8e 100644 > --- a/fs/ext4/super.c > +++ b/fs/ext4/super.c > @@ -1096,15 +1096,6 @@ void ext4_update_dynamic_rev(struct super_block *sb) > */ > } > > -static void ext4_bdev_mark_dead(struct block_device *bdev) > -{ > - ext4_force_shutdown(bdev->bd_holder, EXT4_GOING_FLAGS_NOLOGFLUSH); > -} > - > -static const struct blk_holder_ops ext4_holder_ops = { > - .mark_dead = ext4_bdev_mark_dead, > -}; > - > /* > * Open the external journal device > */ > @@ -1113,7 +1104,7 @@ static struct block_device *ext4_blkdev_get(dev_t dev, struct super_block *sb) > struct block_device *bdev; > > bdev = blkdev_get_by_dev(dev, BLK_OPEN_READ | BLK_OPEN_WRITE, sb, > - &ext4_holder_ops); > + &fs_holder_ops); > if (IS_ERR(bdev)) > goto fail; > return bdev; > -- > 2.39.2 > -- Jan Kara SUSE Labs, CR