From patchwork Thu Nov 21 11:22:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kara X-Patchwork-Id: 13881886 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 76F56D6ED09 for ; Thu, 21 Nov 2024 11:23:20 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CC15B6B009C; Thu, 21 Nov 2024 06:22:33 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9C9AB6B00A0; Thu, 21 Nov 2024 06:22:33 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1BDF66B00A4; Thu, 21 Nov 2024 06:22:33 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id DFEA06B00A2 for ; Thu, 21 Nov 2024 06:22:31 -0500 (EST) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 9FA32AECCD for ; Thu, 21 Nov 2024 11:22:31 +0000 (UTC) X-FDA: 82809862422.21.88EDF1E Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by imf08.hostedemail.com (Postfix) with ESMTP id 77BF0160010 for ; Thu, 21 Nov 2024 11:21:54 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf08.hostedemail.com: domain of jack@suse.cz designates 195.135.223.131 as permitted sender) smtp.mailfrom=jack@suse.cz ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1732188057; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=t3AU9ZC7D00nntqObuLghKSna7xbF/PXwlDUQRRGPh4=; b=zGck77a4bj9lczwOvtMyyAsS7pLlq26FzPHmOs6oUJKYlceXGiGWbQP0djAkzo8gS7QrLh qpUogy7cJWUpnsBpqXjCNmZdIMPQlrlvP3ataNbQTc8br7idzioCT5C38nAOaxtYysQSfF QnBQlMw4VnLUqeRrqRDLXeRcOUEtCuo= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf08.hostedemail.com: domain of jack@suse.cz designates 195.135.223.131 as permitted sender) smtp.mailfrom=jack@suse.cz ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1732188057; a=rsa-sha256; cv=none; b=JnV2M3lgSb2SEYPOsLrGQmblWYngdRqVXh2aybcwOj8ftG85lCpgLEUbjk4fdnGT3EMNXa lk35TRc23M13llMdNCTvpLqxEj7GOHmyZ+2pChLSYdDb48K3m7uk1CTNTPnMZ+kCWgBMxa hjQG95MzpF2WfVpX5fEyC2ESOQHsxyU= Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id C3B291F803; Thu, 21 Nov 2024 11:22:24 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id B826013AC3; Thu, 21 Nov 2024 11:22:24 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id VyvtLPAXP2dKfwAAD6G6ig (envelope-from ); Thu, 21 Nov 2024 11:22:24 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id 5FFA9A0937; Thu, 21 Nov 2024 12:22:24 +0100 (CET) From: Jan Kara To: Cc: Amir Goldstein , Josef Bacik , brauner@kernel.org, Linus Torvalds , Al Viro , linux-xfs@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-mm@kvack.org, Jan Kara Subject: [PATCH 19/19] fs: enable pre-content events on supported file systems Date: Thu, 21 Nov 2024 12:22:18 +0100 Message-Id: <20241121112218.8249-20-jack@suse.cz> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20241121112218.8249-1-jack@suse.cz> References: <20241121112218.8249-1-jack@suse.cz> MIME-Version: 1.0 X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Action: no action X-Rspam-User: X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 77BF0160010 X-Stat-Signature: ofkrhmepqchdyi4bwoutsdiok4e46uyo X-HE-Tag: 1732188114-645033 X-HE-Meta: U2FsdGVkX1+4M10Z0l7Ez10BFKc29BztPO4rN24joyYe3MXxyyNfR0hZXKwJrQ8BsdlTXMN2bsulio7ozZLdpG5But9JLG5cjtbtpSiV+FN50OzQhAHs4x2wXK4+CKqRA3SND/LOHbxJaBbSSNnXtaag+/nJxgdKnikUDAElldb+p1B9KIHg/MJNXiJLMez3dSuoza5Jmja6IEE9E0d5xDBDKvKFfc+CuG1KTwTALTAVmA9Bu9DsStiRLKJGy6fAAQTJpKlCXzw/cyxGDSE/q0tEe8AWpUtiuxMCR50dE8dXYMgk37eaHaSoF7ELX30O67zR01VRftRD7VleQjW2s9suZLCop2bUwPQuu7ZH03CpXZelBWy2szUafNdF/NF2g+TrchqQEnIqbmptNZyaW9rPLeFstHGaSWqzyoSzy8xH5q0/yQcsg6ivQVtpW4xDRzg0Rnzw9U/aZQuxHRDkLXhljGavSO31qbAFSJYRTVE/Yo9TaODQasvqcACjxGRyG2gm5S9K3WaOj55UzXz1SA4AuHeSYiYm/yd2r+Z+gge9ieTzU/QeDTOE9cjM0tOnABk/h13oDM2nLUqCpQiTiyLINAezKSVudCNFFm0W7CER9VslFujT8XG9u9Kz/Qc8B5GmEOcalSRwniRMMQwbTfWpPz1TpfZcttZB9OoG1JofER4HH6Dh4VkJIoGnCeEreDp8hnFphOeCIAd6QhTofx9XmEU9zJVFs3iI2D55ag8cvraJwDwUMH7jgfMrYIvfPAyBXKGem41SKbTlwVehUePjfkeHs52bs1luf1I9f+pfQGJK9yjNsc6KfdueXaGtGk4+RvprfXcC+hl+m+UFPwvgYQ7MqXMjvi2UHcVtekd/um7vR+/qDrcUDn/jwm95shoPsuMy6qHHt3pt0TD47BYI70BuoLRBVRysIBl1G3oEJ+aeaPcaHjC7A+MMo39lV4V8vqe+uem+TdQx9m7 0Oi9w2ZN sHH+qby9tilenHCTGcodHrvClBlBNUcohMePBu14BS5S/DzoQwWeW1uxgOMfSJvt1nozLcYNg5dTZ9jzoPPdLKgBzE0rDgqr/ajV54Tx5rsUxVvenokoJb4sVTyyRRJxbTayVeleA+sfu+67qNM87NtnFWWLLrGHYOCqE/zwWmUYbMrACbQY63Nsu1wL8gYXZEYJuePZXtuUE+5rH4SRmSJi3MieuVnrNIOUFoX3gVUnIpRpKFbX1Nyucyg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: From: Josef Bacik Now that all the code has been added for pre-content events, and the various file systems that need the page fault hooks for fsnotify have been updated, add SB_I_ALLOW_HSM to the supported file systems. Signed-off-by: Josef Bacik Signed-off-by: Jan Kara Link: https://patch.msgid.link/46960dcb2725fa0317895ed66a8409ba1c306a82.1731684329.git.josef@toxicpanda.com --- fs/btrfs/super.c | 2 +- fs/ext4/super.c | 3 +++ fs/xfs/xfs_super.c | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 98fa0f382480..c211e5aa82d8 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -954,7 +954,7 @@ static int btrfs_fill_super(struct super_block *sb, #endif sb->s_xattr = btrfs_xattr_handlers; sb->s_time_gran = 1; - sb->s_iflags |= SB_I_CGROUPWB; + sb->s_iflags |= SB_I_CGROUPWB | SB_I_ALLOW_HSM; err = super_setup_bdi(sb); if (err) { diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 16a4ce704460..733d71dac09e 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -5266,6 +5266,9 @@ static int __ext4_fill_super(struct fs_context *fc, struct super_block *sb) /* i_version is always enabled now */ sb->s_flags |= SB_I_VERSION; + /* HSM events are allowed by default. */ + sb->s_iflags |= SB_I_ALLOW_HSM; + err = ext4_check_feature_compatibility(sb, es, silent); if (err) goto failed_mount; diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index fbb3a1594c0d..b6cd52f2289d 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c @@ -1713,7 +1713,7 @@ xfs_fs_fill_super( sb->s_time_max = XFS_LEGACY_TIME_MAX; } trace_xfs_inode_timestamp_range(mp, sb->s_time_min, sb->s_time_max); - sb->s_iflags |= SB_I_CGROUPWB; + sb->s_iflags |= SB_I_CGROUPWB | SB_I_ALLOW_HSM; set_posix_acl_flag(sb);