diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-07-21 15:41:29 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:37 -0400 |
commit | 91f1b9fdd2c02a7375e46bb2628870f3c6116072 (patch) | |
tree | c697d67baf3b0e00c3c43cee781d90f8d17632ef /fs/bcachefs/opts.h | |
parent | 01eed77178049b85ec1850717fc81bcb24e19c70 (diff) |
bcachefs: Add an O_DIRECT option (for userspace)
Sometimes we see IO errors due to O_DIRECT alignment issues - having an
option to use buffered IO will be helpful.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/opts.h')
-rw-r--r-- | fs/bcachefs/opts.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/bcachefs/opts.h b/fs/bcachefs/opts.h index 30cf9a2d9dc1..6e2bd6e01f8c 100644 --- a/fs/bcachefs/opts.h +++ b/fs/bcachefs/opts.h @@ -346,6 +346,11 @@ enum opt_type { OPT_BOOL(), \ BCH2_NO_SB_OPT, false, \ NULL, "Don't open device in exclusive mode") \ + x(direct_io, u8, \ + OPT_FS|OPT_MOUNT, \ + OPT_BOOL(), \ + BCH2_NO_SB_OPT, true, \ + NULL, "Use O_DIRECT (userspace only)") \ x(sb, u64, \ OPT_MOUNT, \ OPT_UINT(0, S64_MAX), \ |