[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250401-work-freeze-v1-5-d000611d4ab0@kernel.org>
Date: Tue, 1 Apr 2025 02:32:50 +0200
From: Christian Brauner <brauner@...nel.org>
To: linux-fsdevel@...r.kernel.org,
jack@...e.cz
Cc: Christian Brauner <brauner@...nel.org>,
Ard Biesheuvel <ardb@...nel.org>,
linux-efi@...r.kernel.org,
linux-kernel@...r.kernel.org,
James Bottomley <James.Bottomley@...senpartnership.com>,
mcgrof@...nel.org,
hch@...radead.org,
david@...morbit.com,
rafael@...nel.org,
djwong@...nel.org,
pavel@...nel.org,
peterz@...radead.org,
mingo@...hat.com,
will@...nel.org,
boqun.feng@...il.com
Subject: [PATCH 5/6] fs: allow pagefault based writers to be frozen
Otherwise tasks such as systemd-journald that mmap a file and write to
it will not be frozen after we've frozen the filesystem.
Signed-off-by: Christian Brauner <brauner@...nel.org>
---
include/linux/fs.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/linux/fs.h b/include/linux/fs.h
index b379a46b5576..528e73f192ac 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1782,7 +1782,8 @@ static inline void __sb_end_write(struct super_block *sb, int level)
static inline void __sb_start_write(struct super_block *sb, int level)
{
percpu_down_read_freezable(sb->s_writers.rw_sem + level - 1,
- level == SB_FREEZE_WRITE);
+ (level == SB_FREEZE_WRITE ||
+ level == SB_FREEZE_PAGEFAULT));
}
static inline bool __sb_start_write_trylock(struct super_block *sb, int level)
--
2.47.2
Powered by blists - more mailing lists