Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp820014rwl; Wed, 29 Mar 2023 08:53:56 -0700 (PDT) X-Google-Smtp-Source: AKy350bBYpBkjE9LKkqZb1dRba+GBkQUJ9rKSLd5XeOav1hiRRib6xDAtsOOGPtQRXlwaE+Y3i2V X-Received: by 2002:a17:906:6449:b0:8eb:d3a5:b9f0 with SMTP id l9-20020a170906644900b008ebd3a5b9f0mr20249850ejn.67.1680105236324; Wed, 29 Mar 2023 08:53:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680105236; cv=none; d=google.com; s=arc-20160816; b=LwLY4mgbzApnbpxX+j/itdVQWbH2SwVVBne6GkmH2wdEkoaoUVqUFkOb03V1YMjFal jZFlU33RKBLJW6vKMyMNhCmc9+7bgc+L9x4wA3mRBY6SwF1T1EA93aMejjzV2Ux63yeG dMzDsn7HYMX17szP7V/GJa2F6AqlRg1UsRx2G00DBYKFvcC7ojTrn+wvMJ85KmKUkDlJ a9ULB1wozQ8MMy/uWHaj/SIai7EYBIlC/3ZV6Xd2lqP8wQ090lGGjrMZLnojSQG5/cyB qNndOwWHb5GxsIy0UoIdIiC18nn07x09zpdx/IEMP0WJuV3OuUnNZHGmNErJGqWbRxqK isbw== 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=/NxcFGA9NBM1mZDsYhaMJSrXtll2l3LazqbMz1KQdrw=; b=FQ43YmxjmGZzioDKSAltrFAtbGp9jNPT+zUHvhctLCyGBNaGzy27SdMeGs0j5Oo/2j g20x4ka5AE8IZsU/KQMbXmzl80MybDdTYEAYUrE/lqnZhztzZIW77I8+94AiVmfl2zOX uS9bPWSmwB9/DVIYZ1KUc4lZFCfUYtYm0W0KKPY91BoiMoq/hPP9lowRsftX2FXDpR48 C6ZOCmig2pXx7s4MkQ33d9MgIddpk1T6XJ4WGNFx961htots/0S27sEqqo29bdkT0cmS 7S7kVPh4FzGYlvasu6sfuRgGuIu4RJWtcxnpVruHWc6fMyw2dxtAX7BCbiGR6v9gald8 S+TQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=hru2ow85; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; 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 z7-20020aa7c647000000b004fb4fc2e5f4si19007952edr.314.2023.03.29.08.53.32; Wed, 29 Mar 2023 08:53:56 -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=hru2ow85; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; 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 S229966AbjC2Puc (ORCPT + 99 others); Wed, 29 Mar 2023 11:50:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230297AbjC2PuM (ORCPT ); Wed, 29 Mar 2023 11:50:12 -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 1BD5B55AD 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-out1.suse.de (Postfix) with ESMTPS id C958121A20; 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=/NxcFGA9NBM1mZDsYhaMJSrXtll2l3LazqbMz1KQdrw=; b=hru2ow85E4RI1rT58/ifXuKlQRF75DAp95b4Tfvh5fbGTuUQmsR4oOSCGz5AKimaUND6yl tS9LFv+JC1MXI01Auj1PF6FhxwAKmAPcxQgaD8lCyuv9QeGQ4L/dq/1avakBCxBofnlZET dlotJfDkuk1qcEAwbAoWcBvvyVvR/xY= 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=/NxcFGA9NBM1mZDsYhaMJSrXtll2l3LazqbMz1KQdrw=; b=qkmp+C3n9Fni06Zt9eEo8S3Asdp9pFssWlSH4ZQ/pS9GtQfak8OdayMcx4nUXpQrNw2ULh D/Fxs2INKVkSYTDQ== 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 B029513A6B; 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 oef9KixeJGR5YwAAMHmgww (envelope-from ); Wed, 29 Mar 2023 15:50:04 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id 5051AA0749; Wed, 29 Mar 2023 17:49:50 +0200 (CEST) From: Jan Kara To: Ted Tso Cc: , Jan Kara Subject: [PATCH 07/13] ext4: Drop special handling of journalled data from extent shifting operations Date: Wed, 29 Mar 2023 17:49:38 +0200 Message-Id: <20230329154950.19720-7-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=1510; i=jack@suse.cz; h=from:subject; bh=8jIC0uqJEaJBZTrcP/P9flmMUsS09b+4tuzBQjUnk8w=; b=owEBbQGS/pANAwAIAZydqgc/ZEDZAcsmYgBkJF4Se4EaAfYN7Xme4QnBP1E68EFgr3cmO8JispCo IqsMA0uJATMEAAEIAB0WIQSrWdEr1p4yirVVKBycnaoHP2RA2QUCZCReEgAKCRCcnaoHP2RA2alsB/ 9HtyfjrH1iTU4C5tuUkrcx0BB3QA3m0oY6AI3fPVmD9iD1RNym3srkwV5w8ZgMxDYXjCOaNvIAAbBF gJwa5O0oKjiBFzaptiksnKV0007IucaqDOMeii9BjOIHfya5PMwpIbZA/NyuxCUjdO4HGj4hx/3zT3 nIj2O6XHTDq/VYm0RDnUWsgoHxOBzbUInRx/OYwsU6H2Zrv81X0Mspa6vxEXJflPMujpa0NsWQ2m3Q nNP1F6weGZmihzJeP8kPaOboHe3W9R/m7XzBK7dutSc3jN91O1SDnNeBULuLjz1d5hcxo91jUj5pX+ hN9QGI1ZxlrJAWftOJ2CtdItiTtJpi 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 filemap_write_and_wait() makes sure pages with journalled data are safely on disk, ext4_collapse_range() and ext4_insert_range() do not need special handling of journalled data. Signed-off-by: Jan Kara --- fs/ext4/extents.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 3559ea6b0781..0b622ae29a73 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -5290,13 +5290,6 @@ static int ext4_collapse_range(struct file *file, loff_t offset, loff_t len) punch_start = offset >> EXT4_BLOCK_SIZE_BITS(sb); punch_stop = (offset + len) >> EXT4_BLOCK_SIZE_BITS(sb); - /* Call ext4_force_commit to flush all data in case of data=journal. */ - if (ext4_should_journal_data(inode)) { - ret = ext4_force_commit(inode->i_sb); - if (ret) - return ret; - } - inode_lock(inode); /* * There is no need to overlap collapse range with EOF, in which case @@ -5443,13 +5436,6 @@ static int ext4_insert_range(struct file *file, loff_t offset, loff_t len) offset_lblk = offset >> EXT4_BLOCK_SIZE_BITS(sb); len_lblk = len >> EXT4_BLOCK_SIZE_BITS(sb); - /* Call ext4_force_commit to flush all data in case of data=journal */ - if (ext4_should_journal_data(inode)) { - ret = ext4_force_commit(inode->i_sb); - if (ret) - return ret; - } - inode_lock(inode); /* Currently just for extent based files */ if (!ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS)) { -- 2.35.3