Skip to content

Commit

Permalink
Remove Doxygen warnings. (#270)
Browse files Browse the repository at this point in the history
  • Loading branch information
hyoklee committed Nov 2, 2022
1 parent 4717101 commit daf0359
Show file tree
Hide file tree
Showing 80 changed files with 5,079 additions and 1,562 deletions.
23 changes: 17 additions & 6 deletions adapter/adapter_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,12 @@ inline bool is_dotdot(const stdfs::path& path) {

namespace hermes {
namespace adapter {

// NOTE(chogan): Back port of the C++17 standard fileystem implementation from
// gcc 9.1 to support gcc 7
/**
* normalize \a path
*
* \note (chogan): Back port of the C++17 standard fileystem implementation
* from gcc 9.1 to support gcc 7
*/
stdfs::path LexicallyNormal(stdfs::path &path) {
/*
C++17 [fs.path.generic] p6
Expand Down Expand Up @@ -124,7 +127,10 @@ stdfs::path LexicallyNormal(stdfs::path &path) {
return ret;
}

// NOTE(chogan): Backported from GCC 9
/**
convert path \a p to a canonical absolute path
\note (chogan): Backported from GCC 9
*/
stdfs::path WeaklyCanonical(const stdfs::path& p) {
stdfs::path result;
if (stdfs::exists(stdfs::status(p))) {
Expand Down Expand Up @@ -155,7 +161,10 @@ stdfs::path WeaklyCanonical(const stdfs::path& p) {
return LexicallyNormal(result);
}

// NOTE(chogan): Backported from GCC 9
/**
convert path \a p to a canonical absolute path with \a ec error code
\note (chogan): Backported from GCC 9
*/
stdfs::path WeaklyCanonical(const stdfs::path& p, std::error_code& ec) {
stdfs::path result;
stdfs::file_status st = stdfs::status(p, ec);
Expand Down Expand Up @@ -201,6 +210,9 @@ stdfs::path WeaklyCanonical(const stdfs::path& p, std::error_code& ec) {
return result;
}

/**
Read gap from the original file when BLOB has a gap in write.
*/
void ReadGap(const std::string &filename, size_t seek_offset, u8 *read_ptr,
size_t read_size, size_t file_bounds) {
if (stdfs::exists(filename) &&
Expand Down Expand Up @@ -231,6 +243,5 @@ void ReadGap(const std::string &filename, size_t seek_offset, u8 *read_ptr,
INTERCEPTOR_LIST->hermes_flush_exclusion.erase(filename);
}
}

} // namespace adapter
} // namespace hermes
1 change: 0 additions & 1 deletion adapter/adapter_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ stdfs::path WeaklyCanonical(const stdfs::path& p);
stdfs::path WeaklyCanonical(const stdfs::path& p, std::error_code& ec);

} // namespace hermes::adapter

4 changes: 2 additions & 2 deletions adapter/constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,11 @@ const char* kStopDaemon = "HERMES_STOP_DAEMON";
* it's important to align the page size to your workload.
*/
const size_t kPageSize = []() {
const char *kPageSizeVar = "HERMES_PAGE_SIZE";
const char* kPageSizeVar = "HERMES_PAGE_SIZE";
const size_t kDefaultPageSize = 1 * 1024 * 1024;

size_t result = kDefaultPageSize;
char *page_size = getenv(kPageSizeVar);
char* page_size = getenv(kPageSizeVar);

if (page_size) {
result = (size_t)std::strtoull(page_size, NULL, 0);
Expand Down
6 changes: 3 additions & 3 deletions adapter/enumerations.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
#define HERMES_ADAPTER_ENUMERATIONS_H
enum class AdapterMode {
kDefault = 0, /**< All/given files are stored on file close or flush. */
kBypass = 1, /**< All/given files are not buffered. */
kScratch = 2 /**< All/given files are ignored on file close or flush. */
kBypass = 1, /**< All/given files are not buffered. */
kScratch = 2 /**< All/given files are ignored on file close or flush. */
};

enum class FlushingMode {
kSynchronous, /**< Flush persistent Blobs synchronously on fclose. */
kSynchronous, /**< Flush persistent Blobs synchronously on fclose. */
kAsynchronous, /**< Flush persistent Blobs asynchronously on fwrite. */
};

Expand Down
2 changes: 1 addition & 1 deletion adapter/filesystem/filesystem.cc
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ HermesRequest* Filesystem::ARead(File &f, AdapterStat &stat, void *ptr,
return hreq;
}

size_t Filesystem::Wait(size_t req_id) {
size_t Filesystem::Wait(uint64_t req_id) {
auto mdm = Singleton<MetadataManager>::GetInstance();
auto req_iter = mdm->request_map.find(req_id);
if (req_iter == mdm->request_map.end()) {
Expand Down

0 comments on commit daf0359

Please sign in to comment.