I am currently unable to use core/file.hh in a fresh include file. Type
conflicts arise, which probably don't happen in other existing files because
of existing includes that end up getting the environment all right beforehand.
FAILED: g++ -MMD -MT build/release/db/db.o -MF build/release/db/db.o.d -std=gnu++1y -g -Wall -Werror -fvisibility=hidden -pthread -I. -DHAVE_XEN -DHAVE_HWLOC -DHAVE_NUMA -O2 -I build/release/gen -c -o build/release/db/db.o db/db.cc
In file included from ./sstables.hh:4:0,
from ./database.hh:22,
from db/composites/composite.hh:27,
from db/db.cc:8:
./core/file.hh:35:64: error: ‘iovec’ was not declared in this scope
virtual future<size_t> write_dma(uint64_t pos, std::vector<iovec> iov) = 0;
Adding <sys/uio.h> to the include list of file.hh makes it includable (apparently) anywhere.
Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
open_directory() is similar to open_file_dma() with just the O_ flags adjusted.
list_directory() returns a subscription(), so that both the producer and
the consumer can be asynchronous.