diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-07-11 23:23:40 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-08-02 20:30:25 -0400 |
commit | 336de03dadb34801ec11d7d992d56483c00e69af (patch) | |
tree | 4e9c21a7d8f7de093c60fc643cf8b719d08c7e81 /fs/bcachefs/darray.h | |
parent | fa5cd59166b536ad3c67ed8261427e77665e736f (diff) |
bcachefs: BCH_IOCTL_FSCKBCH_IOCTL_FSCK
This adds a new ioctl for running fsck on a list of devices.
Normally, if we wish to use the kernel's implementation of fsck we'd run
it at mount time with -o fsck. This ioctl lets us run fsck without
mounting, so that userspace bcachefs-tools can transparently switch to
the kernel's implementation of fsck when appropriate - primarily if the
kernel version of bcachefs better matches the filesystem on disk.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/darray.h')
-rw-r--r-- | fs/bcachefs/darray.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/bcachefs/darray.h b/fs/bcachefs/darray.h index 114f86b45fd5..84c6acfcda1c 100644 --- a/fs/bcachefs/darray.h +++ b/fs/bcachefs/darray.h @@ -41,6 +41,8 @@ static inline int __darray_make_room(darray_void *d, size_t t_size, size_t more, #define darray_make_room(_d, _more) \ darray_make_room_gfp(_d, _more, GFP_KERNEL) +#define darray_room(_d) ((_d).size - (_d).nr) + #define darray_top(_d) ((_d).data[(_d).nr]) #define darray_push_gfp(_d, _item, _gfp) \ |