From patchwork Tue Nov 12 17:55:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 13872743 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 C4DB6D42BBA for ; Tue, 12 Nov 2024 17:57:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3D9056B00AA; Tue, 12 Nov 2024 12:57:00 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 35FA16B00BA; Tue, 12 Nov 2024 12:57:00 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 18C436B00BC; Tue, 12 Nov 2024 12:57:00 -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 E556C6B00AA for ; Tue, 12 Nov 2024 12:56:59 -0500 (EST) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id A24A1C04BD for ; Tue, 12 Nov 2024 17:56:59 +0000 (UTC) X-FDA: 82778197698.23.E5241D9 Received: from mail-yb1-f170.google.com (mail-yb1-f170.google.com [209.85.219.170]) by imf04.hostedemail.com (Postfix) with ESMTP id B5AED40018 for ; Tue, 12 Nov 2024 17:56:04 +0000 (UTC) Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=toxicpanda-com.20230601.gappssmtp.com header.s=20230601 header.b=IFZw2pYE; spf=none (imf04.hostedemail.com: domain of josef@toxicpanda.com has no SPF policy when checking 209.85.219.170) smtp.mailfrom=josef@toxicpanda.com; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1731434130; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Gek1GO8SPggpZ3MPgZMTTjA2lPqNZurY73wIWpdWbQQ=; b=HfmpbiiSEkC1tyYanaAHhHVax504FVd3BBTB3Fwa4cO4F9r0MjFh+aM9j0NbCTsh6vE8bZ 4d0xtSJ0/sUwIb+u76fLf6bV6nDFChH8TAMa13N2ebYhvntO84nqxB+sEg+ro53dnr66YN mHsLMdL5zK0CAcVEHF+psEoBSED8HT4= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1731434130; a=rsa-sha256; cv=none; b=q1ifoDt6Q6UJIXoesmwaMZG7gxWtQ9ZiGGiDraQRp6E7OHQhtxQQ/RMOwrxGXRVr507bi7 J/qTS9tTLQr1j8iFeQPzQoH6gX7XNLBXx5EHdNeFU5OhIivPChuRfJO0a1opr23JDPHt6f ceokiYFr6AWahOlZzbN8IjcKEyHhSEs= ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=pass header.d=toxicpanda-com.20230601.gappssmtp.com header.s=20230601 header.b=IFZw2pYE; spf=none (imf04.hostedemail.com: domain of josef@toxicpanda.com has no SPF policy when checking 209.85.219.170) smtp.mailfrom=josef@toxicpanda.com; dmarc=none Received: by mail-yb1-f170.google.com with SMTP id 3f1490d57ef6-e30d0d84d23so5270184276.3 for ; Tue, 12 Nov 2024 09:56:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toxicpanda-com.20230601.gappssmtp.com; s=20230601; t=1731434217; x=1732039017; darn=kvack.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Gek1GO8SPggpZ3MPgZMTTjA2lPqNZurY73wIWpdWbQQ=; b=IFZw2pYE8ofeg+9hf0AofSXWjrfgxW9NwWRQOxjWQJMa59rmRKdKCwie6L1zFhKPW1 RANqTxfsZjQUqocHdaQAotGJ3iaPxhy1b8wFe6Ly72zH7c5hu1r6BNhh4kLSRWNtazrZ mPNPslMSCXN19GATEkYHcZ/kqWbQymvSws/hYk36nT0IggkXvYcRJejdyTfjCzPCab9y +THnWcqJetTuCklj7zqprcPTiPCT0G7uh+5XtknVptf34+MkV4BC8z3TdoOfX7Thr6hx oKRzunSThS3aeZET1R7BE24Rb7AYYdbvBgniZ0Zh4r9bAXt6PEJlcJTIWgC8wmxB+t6C rzmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731434217; x=1732039017; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Gek1GO8SPggpZ3MPgZMTTjA2lPqNZurY73wIWpdWbQQ=; b=dIPlORn+Wr83wN5IEU4edFhTQ8WxxO4UhP8voZSpOhQedRM/3KeWejPoXCq5Arw8+J XbeFZKZA7pAonC3rB2vFcglwbwM9MY4qXSzRGB9MBoZ7eLK2py3Lnwhe0UPG3oZ/Uf1d 9OqaqlSHFCcH4whY+NjLkYxBavQ78DENiGAEA5eJ7eBtqM2RrLXmcPrlX/eEecfTbPnc dkgqaqq/QaGUKzRefJk2eZFyQYW1QJ3bcB+wdV8J5sn2zopJpB3HJ0WqYfNeoowWYgBW SyVM4zKAQTyMEb5xQAMyyLce//Uq44tnSWGWamKllfq/NNaLXLYrBaKU5rYR05YH8uH4 dAOQ== X-Forwarded-Encrypted: i=1; AJvYcCUACsqSk53SPclK/TgEFnTjxA9wWBUEE8mjNdaOhXrVEeYgYw4o8MtR3qvIpMX06y6bklyIS3QwXw==@kvack.org X-Gm-Message-State: AOJu0YwpGjyFb7rcttyjc9VVnmvzE/Z/P9MvwUJgczhIMY3OP3XqHxPd XyYB4FleNEbzR3WTxglFjzkZoNThq1+9hzxU7e0adHRNrxtj68XVdIutZ5ssjRM= X-Google-Smtp-Source: AGHT+IEseNU1fU18+Eb5Xypvfn1vm8TMH1JcpZ3Hifh4Ob7CJlLkVA7fH8jLCYaFBtppEHVnywJ7Bw== X-Received: by 2002:a05:6902:1ac1:b0:e30:e59b:4a40 with SMTP id 3f1490d57ef6-e337f8822d4mr14895613276.28.1731434217050; Tue, 12 Nov 2024 09:56:57 -0800 (PST) Received: from localhost (syn-076-182-020-124.res.spectrum.com. [76.182.20.124]) by smtp.gmail.com with ESMTPSA id 3f1490d57ef6-e336f1ba498sm2747524276.46.2024.11.12.09.56.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Nov 2024 09:56:56 -0800 (PST) From: Josef Bacik To: kernel-team@fb.com, linux-fsdevel@vger.kernel.org, jack@suse.cz, amir73il@gmail.com, brauner@kernel.org, torvalds@linux-foundation.org, linux-xfs@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-mm@kvack.org, linux-ext4@vger.kernel.org Subject: [PATCH v7 18/18] fs: enable pre-content events on supported file systems Date: Tue, 12 Nov 2024 12:55:33 -0500 Message-ID: <476c173aa514c889cfb3d9a1dcf3bb333a223ef7.1731433903.git.josef@toxicpanda.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 X-Rspamd-Server: rspam10 X-Stat-Signature: nkrmkhoik7ypwnmoqmpya917pkmtwcpg X-Rspamd-Queue-Id: B5AED40018 X-Rspam-User: X-HE-Tag: 1731434164-78358 X-HE-Meta: U2FsdGVkX1/lSHjskondALp5Wm+KmF0eNzp93+GtkBOg4YeH/sqBOWO1c8Y4mYC+CVEHMqA1X/H1NNbstHVDdwGdx2I5p33eFZTaPLL/JPjvmWV5LRUBciL2pmsbBPIG8lO9v0kJxt3qhDkR1kAsKM7CFtOBwljOIsG5Ab+xcMax6DH5MfBzJWy0u4MJIPVWWdGzJjyhnPTWZl9HWIDTcl07IVwWPXBFsm+NCYKo0cmEJFDI7DZJBV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Ffnqn7+CI0R+CcZXbpNOF4GaBXS0xLJeLQ== 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: 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 --- 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 97a85d180b61..fe6ecc3f1cab 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -961,7 +961,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 b3512d78b55c..13b9d67a4eec 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -5306,6 +5306,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 fda75db739b1..2d1e9db8548d 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);