diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-12-04 13:45:33 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-01-01 11:47:40 -0500 |
commit | 267b801fda10b70eca4001a819fcac07f023df6b (patch) | |
tree | 41d9bfd3452ecd85ab133d82e753c4e3f4c0a43e /fs/bcachefs/bcachefs.h | |
parent | 8408fa570ef9b8c35720369bad6b13828ae6b001 (diff) | |
download | linux-stable-267b801fda10b70eca4001a819fcac07f023df6b.tar.gz linux-stable-267b801fda10b70eca4001a819fcac07f023df6b.tar.bz2 linux-stable-267b801fda10b70eca4001a819fcac07f023df6b.zip |
bcachefs: BCH_IOCTL_FSCK_ONLINE
This adds a new ioctl for running fsck on a mounted, in use filesystem.
This reuses the fsck_thread code from the previous patch for running
fsck on an offline, unmounted filesystem, so that log messages for the
fsck thread are redirected to userspace.
Only one running fsck instance is allowed at a time; a new semaphore
(since the lock will be taken by one thread and released by another) is
added for this.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/bcachefs.h')
-rw-r--r-- | fs/bcachefs/bcachefs.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/bcachefs/bcachefs.h b/fs/bcachefs/bcachefs.h index 18bc1bbef918..b42e3854c51f 100644 --- a/fs/bcachefs/bcachefs.h +++ b/fs/bcachefs/bcachefs.h @@ -1058,6 +1058,7 @@ struct bch_fs { /* bitmap of explicitly enabled recovery passes: */ u64 recovery_passes_explicit; u64 recovery_passes_complete; + struct semaphore online_fsck_mutex; /* DEBUG JUNK */ struct dentry *fs_debug_dir; |