Reduce cmake options

Move rename, symlink and check parents from cmake to env variables to config.hpp

Merge request reports

Loading
+0 −22
Changes for CMake/gkfs-options.cmake: 0 added lines, 22 removed lines.
Original line number Diff line number Diff line
@@ -269,29 +269,7 @@ cmake_dependent_option(GKFS_INSTALL_TESTS "Install GekkoFS self tests" OFF "GKFS
# Variables and options controlling POSIX semantics
################################################################################

## check before create
gkfs_define_option(
    GKFS_CREATE_CHECK_PARENTS
    HELP_TEXT "Enable checking parent directory for existence before creating children"
    DEFAULT_VALUE ON
    DESCRIPTION "Verify that a parent directory exists before creating new files or directories"
)

## symbolic link support
gkfs_define_option(
    GKFS_SYMLINK_SUPPORT
    HELP_TEXT "Enable support for symlinks"
    DEFAULT_VALUE OFF
    DESCRIPTION "Enable support for symbolic links in paths"
)

## rename support
gkfs_define_option(
    GKFS_RENAME_SUPPORT
    HELP_TEXT "Enable support for rename"
    DEFAULT_VALUE OFF
    DESCRIPTION "Compile with support for rename ops (experimental)"
)

## external link support
gkfs_define_option(
+0 −6
Changes for include/client/rpc/forward_metadata.hpp: 0 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -72,11 +72,9 @@ int
forward_stat(const std::string& path, std::string& attr,
             std::string& inline_data, int copy, bool include_inline = false);

#ifdef HAS_RENAME
int
forward_rename(const std::string& oldpath, const std::string& newpath,
               const gkfs::metadata::Metadata& md);
#endif // HAS_RENAME

int
forward_remove(const std::string& path, bool rm_dir, const int8_t num_copies);
@@ -107,13 +105,9 @@ forward_get_dirents_single(const std::string& path, int server,
                           const std::string& start_key = "",
                           bool get_all = true);

#ifdef HAS_SYMLINKS

int
forward_mk_symlink(const std::string& path, const std::string& target_path);

#endif

/**
 * @brief Send an RPC request to write a small amount of data directly
 * to the metadata server (inline).
+8 −0
Changes for include/client/env.hpp: 8 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -87,6 +87,14 @@ static constexpr auto WRITE_SIZE_THRESHOLD =
        ADD_PREFIX("WRITE_SIZE_CACHE_THRESHOLD");
} // namespace cache

static constexpr auto CREATE_CHECK_PARENTS = ADD_PREFIX("CREATE_CHECK_PARENTS");
static constexpr auto SYMLINK_SUPPORT = ADD_PREFIX("SYMLINK_SUPPORT");
static constexpr auto RENAME_SUPPORT = ADD_PREFIX("RENAME_SUPPORT");
static constexpr auto USE_INLINE_DATA = ADD_PREFIX("USE_INLINE_DATA");
static constexpr auto CREATE_WRITE_OPTIMIZATION =
        ADD_PREFIX("CREATE_WRITE_OPTIMIZATION");
static constexpr auto READ_INLINE_PREFETCH = ADD_PREFIX("READ_INLINE_PREFETCH");

} // namespace gkfs::env

#undef ADD_PREFIX
+0 −6
Changes for include/client/gkfs_functions.hpp: 0 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -108,16 +108,12 @@ gkfs_dup(int oldfd);
int
gkfs_dup2(int oldfd, int newfd);

#ifdef HAS_SYMLINKS

int
gkfs_mk_symlink(const std::string& path, const std::string& target_path);

int
gkfs_readlink(const std::string& path, char* buf, int bufsize);

#endif

ssize_t
gkfs_do_write(gkfs::filemap::OpenFile& file, const char* buf, size_t count,
              off64_t offset, bool update_pos);
@@ -180,10 +176,8 @@ gkfs_close(unsigned int fd);
std::vector<std::string>
gkfs_get_file_list(const std::string& path);

#ifdef HAS_RENAME
int
gkfs_rename(const std::string& old_path, const std::string& new_path);
#endif // HAS_RENAME

int
gkfs_utimensat(const std::string& path, const struct timespec times[2]);
+0 −2
Changes for include/client/gkfs_libc.hpp: 0 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -220,12 +220,10 @@ symlink(const char* target_path,
int
symlinkat(const char* target_path, int newdirfd, const char* link_path) throw();

#ifdef HAS_SYMLINKS
ssize_t
readlink(const char* path, char* buf, size_t bufsize);
ssize_t
readlinkat(int dfd, const char* path, char* buf, size_t bufsize);
#endif

char*
realpath(const char* path, char* resolved_path) throw();
Loading
Loading