]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
blk: use choose_fd for all filehandle references
authorWillem Jan Withagen <wjw@digiware.nl>
Sat, 26 Jun 2021 13:47:24 +0000 (15:47 +0200)
committerWillem Jan Withagen <wjw@digiware.nl>
Wed, 7 Jul 2021 09:50:00 +0000 (11:50 +0200)
commit9c13f8ad65e9436c81edeb5af7de208440930aea
tree52212f72a244f9698ea2757f9045804d1b70abb3
parent8533dbe4f9a8c6b54351a7ff3e11985088f559ac
blk: use choose_fd for all filehandle references

This is a leading part of the changes to implement bluestore on
FreeBSD. Without this invalid indexing in the descriptor arrays
will occur.

Creates a new enum: `blk_access_mode_t`
to describe `BUFFERED` and `DIRECT `mode access
with `choose_fd()` to get the correct file for the typed access
and adds
a pretty-printer
boolean convertor `blk_access_mode_t::buffermode(bool)`

This PR is a redo for PR #37258, since that one was lost
in rebasing errors. But the review notes are still there.

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
src/blk/BlockDevice.cc
src/blk/BlockDevice.h
src/blk/kernel/KernelDevice.cc
src/blk/kernel/KernelDevice.h