Commit Graph

8 Commits

Author SHA1 Message Date
Raphael S. Carvalho
fe896fa4e4 core: add truncate function to file class 2015-03-10 15:43:39 -03:00
Avi Kivity
7f8d88371a Add LICENSE, NOTICE, and copyright headers to all source files.
The two files imported from the OSv project retain their original licenses.
2015-02-19 16:52:34 +02:00
Avi Kivity
951a93a534 file.hh: add missing include 2015-02-10 18:59:16 +02:00
Avi Kivity
7596819034 file: define move assignment operator 2015-01-13 19:08:48 +02:00
Glauber Costa
66a6a3b50e add a header to file.hh
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>
2015-01-12 18:59:11 +02:00
Avi Kivity
3be04e7009 reactor: implement open_directory(), list_directory()
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.
2015-01-08 11:09:25 +02:00
Raphael S. Carvalho
6188745a98 core: introduce size method into file_impl
Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
2014-11-01 15:36:28 +02:00
Raphael S. Carvalho
932a6e8752 core: move file-specific content from reactor.hh to specialized header
No semantic change; just cleaning things up.

Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
2014-10-18 16:42:08 +03:00