Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp820989rwl; Wed, 29 Mar 2023 08:54:47 -0700 (PDT) X-Google-Smtp-Source: AKy350b1gFX8WQBI5P5gWruM8Ytk3R40cfWAqjGXmmsiiVYhwR0amrGFp2lY7RHIOJfUiGs51RSr X-Received: by 2002:a17:906:b854:b0:933:4c24:101b with SMTP id ga20-20020a170906b85400b009334c24101bmr2978380ejb.7.1680105287100; Wed, 29 Mar 2023 08:54:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680105287; cv=none; d=google.com; s=arc-20160816; b=rj0SS1kK7YWT/u09xspro35ENeH3/7zSI3q3Z5dazA+XRiq1PUtsouA5IaNaHcUZmQ Ri+DCpCa29mNW1dUqojuLG5DQam+NtqW80lwtcV3eIcOpFltigeeAKXXE+pUScYFyA6Z YC61sMPdfGs47pXM7i+9J3b3O1FJ+bXezm6mDRH2LJ938j7AOPubIllfJ/41IK53bIPr N8kQhRkvf/sNyTIRqIoCyDmA9N++knT1wWkErFpEn51GMGRovP7gWYbnI0ZfdgR5EDsa pGCv0rndPkXw0DJwq0fMIeQ2UCsROyK/DofR6bAsl7HqIaOOzOgK1fGJrLbMfUqF4biA Bgww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=A8d4usqkrkW7+cCBZEQr2MKFual/vPqxNVBzwJrYbHU=; b=f8gBmOT5KoTB/wFNsz1Yh15GRdnwBt6zYken/gd8U+e+Mi9kw4cSS8VRytfT6Lfb4J 6Tyr33isimVlZmfuPJYvMM+qOLGpbCU9YNhWAzbESLAnYm4b6hnmAqoNWqSP/Pson4uz DK+Bb5do/NfQl2DVXgkzzspLJz4mVnn6fjUqcUcXhxZ0s0S3s40qhg585lDpMw3zH+bF ZgY3T4Ney2+8EHUbQxOTGBo0Bgfxhf2Lwc48YANU88wSUGiWvYSkyfhbwbs5EkQ0rw6I 0zMQLBTeIxubZFc4MBM8UwOdUCCZy9QOCZq6CmwYLn9DXcZ9hwxtjwp/VY7Idb4CRr8N tVwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=jf46BEGt; dkim=neutral (no key) header.i=@suse.cz header.b=iEHCIivn; 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 p24-20020aa7d318000000b004e1db2eb805si32161439edq.494.2023.03.29.08.54.21; Wed, 29 Mar 2023 08:54:47 -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=jf46BEGt; dkim=neutral (no key) header.i=@suse.cz header.b=iEHCIivn; 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 S229532AbjC2Pua (ORCPT + 99 others); Wed, 29 Mar 2023 11:50:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229966AbjC2PuM (ORCPT ); Wed, 29 Mar 2023 11:50:12 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1BBCC55AA for ; Wed, 29 Mar 2023 08:50:07 -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-out2.suse.de (Postfix) with ESMTPS id BF8C41FE06; Wed, 29 Mar 2023 15:50:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1680105005; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=A8d4usqkrkW7+cCBZEQr2MKFual/vPqxNVBzwJrYbHU=; b=jf46BEGtbXpH6eeSnAPm2Ae3AJDC2Gnri3PkeOOPEO5qdaQc1JiAQT893ICSYisj3O1/PZ z3OafFxFOdiPAiF3d61QK7UA0ftLAj8cpo4cPoYyPABXAgKVnZKX3Gi3BuRxFYTcUZ+7AY iodjUe2uJMr9U0Vn5vYss+NIpqSS7B8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1680105005; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=A8d4usqkrkW7+cCBZEQr2MKFual/vPqxNVBzwJrYbHU=; b=iEHCIivnWdRshBuO7SAvgkhhXxce3TiiDYr/IFk8d+r1e2FKYCgABHVvzcDkigzwm7gaox FPj7r0iqZ+1YS8DA== 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 A513413A18; Wed, 29 Mar 2023 15:50:04 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id dT1KKCxeJGR1YwAAMHmgww (envelope-from ); Wed, 29 Mar 2023 15:50:04 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id 5FED3A0752; Wed, 29 Mar 2023 17:49:50 +0200 (CEST) From: Jan Kara To: Ted Tso Cc: , Jan Kara Subject: [PATCH 10/13] ext4: Drop special handling of journalled data from ext4_quota_on() Date: Wed, 29 Mar 2023 17:49:41 +0200 Message-Id: <20230329154950.19720-10-jack@suse.cz> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20230329125740.4127-1-jack@suse.cz> References: <20230329125740.4127-1-jack@suse.cz> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1369; i=jack@suse.cz; h=from:subject; bh=zDWaKYjrFN49QaUXpo+9B9Vwo+a6ZBMZE7wi/p5Erwk=; b=owEBbQGS/pANAwAIAZydqgc/ZEDZAcsmYgBkJF4ULlnSrwRvpwdywbao0pA4yyQtHGnzBWILHdhS QOizfSSJATMEAAEIAB0WIQSrWdEr1p4yirVVKBycnaoHP2RA2QUCZCReFAAKCRCcnaoHP2RA2YV7CA Dk7XC2vZdACjsk8BxtgFkalaRCPZdRukSzYtPreZWsBkFdPJ8GDBWmyjnPTiUFzI9pjVz3AuEsovo1 waEW9IvmcK6TuL5vaX2DwjaEv0oeRD/wZpfzCUoKDfRIFzUFufgQkkHySxp77/LRPyxAgrPoYgyr5b PFmBJ/uQmZ0/EN2PzTEFvDmjV10TY85WQGMgMvpJCE2bI4Um0ofLgwpDIbvbO4O3orhxlhm0nV/70J 6GmYVEHsN5bz93xQfahZd72xSDoZ5OrMkbWD7gk+H7I7Uo1PxY81j4YohyIecJb61mIigIOb/5E64u YxTBeQr/Z0nEjoJGJNKGoP7c42admy X-Developer-Key: i=jack@suse.cz; a=openpgp; fpr=93C6099A142276A28BBE35D815BC833443038D8C Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_SOFTFAIL autolearn=unavailable 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 Now that ext4_writepages() makes sure all journalled data is committed and checkpointed, sync_filesystem() call done by dquot_quota_on() is enough for quota IO to see uptodate data. So drop special handling of journalled data from ext4_quota_on(). Signed-off-by: Jan Kara --- fs/ext4/super.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/fs/ext4/super.c b/fs/ext4/super.c index f226f8ab469b..b9f8dd0d6e46 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -6881,23 +6881,6 @@ static int ext4_quota_on(struct super_block *sb, int type, int format_id, sb_dqopt(sb)->flags &= ~DQUOT_NOLIST_DIRTY; } - /* - * When we journal data on quota file, we have to flush journal to see - * all updates to the file when we bypass pagecache... - */ - if (EXT4_SB(sb)->s_journal && - ext4_should_journal_data(d_inode(path->dentry))) { - /* - * We don't need to lock updates but journal_flush() could - * otherwise be livelocked... - */ - jbd2_journal_lock_updates(EXT4_SB(sb)->s_journal); - err = jbd2_journal_flush(EXT4_SB(sb)->s_journal, 0); - jbd2_journal_unlock_updates(EXT4_SB(sb)->s_journal); - if (err) - return err; - } - lockdep_set_quota_inode(path->dentry->d_inode, I_DATA_SEM_QUOTA); err = dquot_quota_on(sb, type, format_id, path); if (!err) { -- 2.35.3