• Kent Overstreet's avatar
    bcachefs: BCH_IOCTL_FSCK_ONLINE · 267b801f
    Kent Overstreet authored
    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: default avatarKent Overstreet <kent.overstreet@linux.dev>
    267b801f
bcachefs_ioctl.h 10.5 KB