From patchwork Mon Nov 11 20:18:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 13871235 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 3CF50D3ABF4 for ; Mon, 11 Nov 2024 20:19:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A18406B00A9; Mon, 11 Nov 2024 15:19:42 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9C6606B00AA; Mon, 11 Nov 2024 15:19:42 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 841666B00AB; Mon, 11 Nov 2024 15:19:42 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 64C0F6B00A9 for ; Mon, 11 Nov 2024 15:19:42 -0500 (EST) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 32D8EADE48 for ; Mon, 11 Nov 2024 20:19:42 +0000 (UTC) X-FDA: 82774927704.07.CFAD910 Received: from mail-qv1-f52.google.com (mail-qv1-f52.google.com [209.85.219.52]) by imf19.hostedemail.com (Postfix) with ESMTP id 430FF1A0019 for ; Mon, 11 Nov 2024 20:18:49 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=toxicpanda-com.20230601.gappssmtp.com header.s=20230601 header.b=j4o9Gcci; dmarc=none; spf=none (imf19.hostedemail.com: domain of josef@toxicpanda.com has no SPF policy when checking 209.85.219.52) smtp.mailfrom=josef@toxicpanda.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1731356293; 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=9HNnqNRpeXpq6oZz7CLrI+1uWLVA6nBimiK4CaRQWps=; b=lD7Wi+VVEnbwDOMhl+m/cXaxvzfHtP3V6e5WwIoZCyE2VgKiEIOSx6s+RLYhXpXGHsHMPK 9IIuPbudds8fianM516o1G/2HnnR1gIu/V0oelaWrDE/qT1wtFWJh0rOpHxxPtMbN1vcad q+WerNaa+LVdEqt6AFeMgzLcxv6B2N8= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=pass header.d=toxicpanda-com.20230601.gappssmtp.com header.s=20230601 header.b=j4o9Gcci; dmarc=none; spf=none (imf19.hostedemail.com: domain of josef@toxicpanda.com has no SPF policy when checking 209.85.219.52) smtp.mailfrom=josef@toxicpanda.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1731356293; a=rsa-sha256; cv=none; b=rD44eW1pRcR/tgUVnv5lGBEGSt035lFUrErEZDiZrrt74/FAsZCexI5x5D2Lzzv18c4vYm krd2NhCfBi/NrCx0j9qsrlMTKorHkKGv3TfPBQYk4iXTBneLmKbLfL+TfzmVMfmLvXx90A ixN9gVLEB4bU+DkaSSAnJfKws799vKc= Received: by mail-qv1-f52.google.com with SMTP id 6a1803df08f44-6d382664fadso33686836d6.2 for ; Mon, 11 Nov 2024 12:19:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toxicpanda-com.20230601.gappssmtp.com; s=20230601; t=1731356379; x=1731961179; 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=9HNnqNRpeXpq6oZz7CLrI+1uWLVA6nBimiK4CaRQWps=; b=j4o9Gcci1Wzm8eKMvcLT8jOiny/6CCCoMd59H2JpT1FaHBQU/t/7pUO67mQEw9bjZ3 fFczkPlxsWHdlrxpBNAVk0MkPgbtaAE1hiHDOzr+c+iqRqPH05WSRHv0ql9A44BxDV98 nXo3pizobSJhkvE5E2N79U/Xza4ZfK4hbqMCvIb/quKTZ4T0Ywk0f53yBG7FTf8/5t/+ OkM+GeR5SbauQIhFuW/Rs+Z36mIwLfHBwjm01DvRlsCPmYmpAN34m20u1dXiYIVFISTk +E032AONrq6F9D0St0EwhzJBYZ8sUyY8PC/rwqGr2uHGGUyozyYFACzmLCNkziIZgKun /ldA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731356379; x=1731961179; 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=9HNnqNRpeXpq6oZz7CLrI+1uWLVA6nBimiK4CaRQWps=; b=gHmAaPa/lIJHlBj7C9orW4rfMw8h//LQeUZ/pgvG5Z25ESrsia+zqYo0fCPTdx/b2U PlHPnWOtrPkZjECYT5+hMRvYgy8sH6w/w3xrw83rwFYm4PL/tkRsrpfS3gd8OsuMj744 Tj2IA03XZnpAE+E1IPQElGv91e2tBqoBsvkN5vvKyN8q2Asyb1t4iqV+3k9YauETrw8j EiJH3Ih9z126USZHyfS3j06IUH6sELJeLD/xp7aKxhUTGWjZUhzlUHsC7o+pI7KWXWiv x8P+76RADH+gAQP7ZvLDUg4btaafy9kdui3wVy4oqnTy4VPRF22WSdxHQqi0v4elKaA5 /Vmw== X-Forwarded-Encrypted: i=1; AJvYcCXX9RU4lBJPWAVDLnBg9pjfb7vEk0zsuo/7gt0FN2hgxGfNHED+aJ4yfXJizLYZF3Awb3bBrRs5ZQ==@kvack.org X-Gm-Message-State: AOJu0Yw+Q3b4G0OUeqEFSLcaetJItuGDL6rRjROLkgiuPviNIMM5MT7/ vP6M/ukqzQ8sOThwubB1Y9mT60CQRkszSx7jzqcd1oK0lbnOmpXuXClh2Dk+FXQ= X-Google-Smtp-Source: AGHT+IEeW5dWNNzP0Q/mSWg08VXdP/QJY4mGTFCLDa3FijIuqEGWFA/DFexUYUDI803eaDEW3J43MQ== X-Received: by 2002:a05:6214:469b:b0:6c3:5a9a:572b with SMTP id 6a1803df08f44-6d3d01cd58emr414996d6.20.1731356379654; Mon, 11 Nov 2024 12:19:39 -0800 (PST) Received: from localhost (syn-076-182-020-124.res.spectrum.com. [76.182.20.124]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6d396643141sm63385236d6.126.2024.11.11.12.19.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Nov 2024 12:19:38 -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 v6 17/17] fs: enable pre-content events on supported file systems Date: Mon, 11 Nov 2024 15:18:06 -0500 Message-ID: <0618e1fcc426e66545a6680c795423313b7ad8d5.1731355931.git.josef@toxicpanda.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 430FF1A0019 X-Stat-Signature: 5wfqogk6a4ptr3jqaa7gcrh6k7gwi3z6 X-HE-Tag: 1731356329-738141 X-HE-Meta: U2FsdGVkX1/CV/pgblqboImpkG0eyk/VmxpOnuY1aDWiBLVmjmhuocLtLAdw6QT9tFtqPVwhfQBOsxzGQa1N5UfpTDXiRtpoB10cyp228P7rOTWJuQtHH+CDdRCHZvaUAgJLnzlbtebs3m+xoNDZc+nmMkeaoFSU5m82pFWmVpU5rkQZghGWrhlu9sYCM65Y6m4t4aR+3NbZmDuOASWbjAwKrGaRIGqELn32a3vIu2F7H+k+bOTGa4GrWThF7Cp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ZVR3W4IN/ZF3ub+S9HK7GrA== 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 | 5 +++-- fs/ext4/super.c | 3 +++ fs/xfs/xfs_super.c | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index c64d07134122..9c3877aee9d4 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -963,7 +963,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) { @@ -2191,7 +2191,8 @@ static struct file_system_type btrfs_fs_type = { .init_fs_context = btrfs_init_fs_context, .parameters = btrfs_fs_parameters, .kill_sb = btrfs_kill_super, - .fs_flags = FS_REQUIRES_DEV | FS_BINARY_MOUNTDATA | FS_ALLOW_IDMAP, + .fs_flags = FS_REQUIRES_DEV | FS_BINARY_MOUNTDATA | + FS_ALLOW_IDMAP, }; MODULE_ALIAS_FS("btrfs"); 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);