-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
273 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,33 @@ | ||
#pragma once | ||
|
||
#include <folly/File.h> | ||
#include <rados/librados.h> | ||
#include <sys/uio.h> | ||
|
||
#include "representation.h" | ||
#include "smartiov.h" | ||
#include "utils.h" | ||
|
||
class Backend | ||
class ObjStore | ||
{ | ||
public: | ||
virtual ~Backend() {} | ||
virtual ~ObjStore() {} | ||
|
||
virtual ResTask<usize> get_size(str name) = 0; | ||
virtual ResTask<bool> exists(str name) = 0; | ||
|
||
virtual ResTask<vec<byte>> read_all(str name) = 0; | ||
virtual ResTask<usize> read(str name, off_t offset, smartiov &iov) = 0; | ||
virtual ResTask<usize> read(str name, off_t offset, iovec iov) = 0; | ||
virtual ResTask<vec<byte>> read_all(str name) = 0; | ||
virtual ResTask<usize> write(str name, smartiov &iov) = 0; | ||
virtual ResTask<usize> write(str name, iovec iov) = 0; | ||
virtual ResTask<void> remove(str name) = 0; | ||
}; | ||
|
||
class FileIo | ||
{ | ||
virtual ResTask<void> preadv(off_t offset, smartiov iov) = 0; | ||
virtual ResTask<void> pwritev(off_t offset, smartiov iov) = 0; | ||
}; | ||
|
||
sptr<Backend> make_rados_backend(rados_ioctx_t io); | ||
Result<rados_ioctx_t> connect_to_pool(str pool_name); | ||
Result<uptr<ObjStore>> connect_to_pool(str pool_name); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#include "journal.h" | ||
|
||
ResTask<void> Journal::record_write(off_t offset, iovec iov, S3Ext ext) | ||
{ | ||
} |
Oops, something went wrong.