diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-07-21 15:41:29 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-01-06 00:09:58 -0500 |
commit | fcb801371ff5bb8b4e7b024d2f0acb8eac710c0f (patch) | |
tree | 03487f60764ed02cfd47ef40cb5a1aa77c8e3da2 | |
parent | 816066714a2eceb6d61891223e21a7db9ba1ece8 (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>
-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 e64a2e132812..4987fb276b19 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), \ |