Commit db319807 authored by Marc Vef's avatar Marc Vef
Browse files

Merge branch 'drop_fuse_code' into 'master'

Get rid of old fuse code

See merge request zdvresearch_bsc/adafs!83
parents bc3b6be6 df816d6d
Loading
Loading
Loading
Loading

ifs/CMake/FindFUSE.cmake

deleted100644 → 0
+0 −34
Original line number Diff line number Diff line
# Find the FUSE includes and library
#
#  FUSE_INCLUDE_DIR - where to find fuse.h, etc.
#  FUSE_LIBRARIES   - List of libraries when using FUSE.
#  FUSE_FOUND       - True if FUSE lib is found.

# check if already in cache, be silent
IF (FUSE_INCLUDE_DIR)
    SET (FUSE_FIND_QUIETLY TRUE)
ENDIF (FUSE_INCLUDE_DIR)

# find includes
FIND_PATH (FUSE_INCLUDE_DIR fuse.h
        /usr/local/include/osxfuse
        /usr/local/include
        /usr/include
        )

# find lib
if (APPLE)
    SET(FUSE_NAMES libosxfuse.dylib fuse)
else (APPLE)
    SET(FUSE_NAMES fuse)
endif (APPLE)
FIND_LIBRARY(FUSE_LIBRARIES
        NAMES ${FUSE_NAMES}
        PATHS /lib64 /lib /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib /usr/lib/x86_64-linux-gnu
        )

include ("FindPackageHandleStandardArgs")
find_package_handle_standard_args ("FUSE" DEFAULT_MSG
        FUSE_INCLUDE_DIR FUSE_LIBRARIES)

mark_as_advanced (FUSE_INCLUDE_DIR FUSE_LIBRARIES)
 No newline at end of file

ifs/CMake/FindFUSE3.cmake

deleted100644 → 0
+0 −34
Original line number Diff line number Diff line
# Try to find fuse (devel)
# Once done, this will define
#
# FUSE3_FOUND - system has fuse
# FUSE3_INCLUDE_DIRS - the fuse include directories
# FUSE3_LIBRARIES - fuse libraries directories

if(FUSE3_INCLUDE_DIRS AND FUSE3_LIBRARIES)
    set(FUSE3_FIND_QUIETLY TRUE)
endif(FUSE3_INCLUDE_DIRS AND FUSE3_LIBRARIES)

find_path( FUSE3_INCLUDE_DIR fuse3/fuse_lowlevel.h
        HINTS
        /usr
        /usr/local
        ${FUSE3_DIR}
        PATH_SUFFIXES include )

find_library( FUSE3_LIBRARY fuse3
        HINTS
        /usr
        /usr/local
        ${FUSE3_DIR}
        PATH_SUFFIXES lib )

set(FUSE3_INCLUDE_DIRS ${FUSE3_INCLUDE_DIR})
set(FUSE3_LIBRARIES ${FUSE3_LIBRARY})

# handle the QUIETLY and REQUIRED arguments and set FUSE3_FOUND to TRUE if
# all listed variables are TRUE
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(fuse3 DEFAULT_MSG FUSE3_INCLUDE_DIR FUSE3_LIBRARY)

mark_as_advanced(FUSE3_INCLUDE_DIR FUSE3_LIBRARY)
 No newline at end of file

ifs/include/fuse3/fuse_main.hpp

deleted100644 → 0
+0 −44
Original line number Diff line number Diff line

#ifndef IFS_FUSE_MAIN_HPP
#define IFS_FUSE_MAIN_HPP

#define FUSE_USE_VERSION 30
extern "C" {
#include <fuse3/fuse_lowlevel.h>
}

#include <memory>
#include <future>
#include <iostream>
//#include <sys/statfs.h>
//#include <stdio.h>
//#include <stdint.h>
//#include <fcntl.h>

// adafs config
#include "global/configure.hpp"
// boost libs
#include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp>
#include <boost/program_options.hpp>
#include <boost/tokenizer.hpp>
// third party libs
#include <extern/spdlog/spdlog.h>
#include <extern/spdlog/fmt/fmt.h>

extern "C" {
#include <abt.h>
#include <abt-snoozer.h>
#include <mercury_types.h>
#include <mercury_proc_string.h>
#include <margo.h>
}

namespace bfs = boost::filesystem;

#define ADAFS_ROOT_INODE static_cast<fuse_ino_t>(1)
#define INVALID_INODE static_cast<fuse_ino_t>(0)

int fuse_main(int fuse_argc, char* fuse_argv_c[]);

#endif //IFS_FUSE_MAIN_HPP

ifs/include/fuse3/fuse_ops.hpp

deleted100644 → 0
+0 −56
Original line number Diff line number Diff line

#ifndef FS_FUSE_OPS_H
#define FS_FUSE_OPS_H

#include <fuse3/fuse_main.hpp>

// file
void adafs_ll_getattr(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info* fi);

void adafs_ll_setattr(fuse_req_t req, fuse_ino_t ino, struct stat* attr, int to_set, struct fuse_file_info* fi);

void adafs_ll_create(fuse_req_t req, fuse_ino_t parent, const char* name, mode_t mode, struct fuse_file_info* fi);

void adafs_ll_mknod(fuse_req_t req, fuse_ino_t parent, const char* name, mode_t mode, dev_t rdev);

void adafs_ll_unlink(fuse_req_t req, fuse_ino_t parent, const char* name);

void adafs_ll_open(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info* fi);

void adafs_ll_release(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info* fi);

// directory
void adafs_ll_lookup(fuse_req_t req, fuse_ino_t parent, const char* name);

void adafs_ll_opendir(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info* fi);

void adafs_ll_readdir(fuse_req_t req, fuse_ino_t ino, size_t size, off_t off, struct fuse_file_info* fi);

void adafs_ll_mkdir(fuse_req_t req, fuse_ino_t parent, const char* name, mode_t mode);

void adafs_ll_rmdir(fuse_req_t req, fuse_ino_t parent, const char* name);

void adafs_ll_releasedir(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info* fi);

// I/O
void adafs_ll_read(fuse_req_t req, fuse_ino_t ino, size_t size, off_t off, struct fuse_file_info* fi);

void adafs_ll_write(fuse_req_t req, fuse_ino_t ino, const char* buf, size_t size, off_t off, struct fuse_file_info* fi);


// sync
void adafs_ll_flush(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info* fi);


// access
void adafs_ll_access(fuse_req_t req, fuse_ino_t ino, int mask);


// file system miscellaneous


void adafs_ll_init(void* adafs_data, struct fuse_conn_info* conn);

void adafs_ll_destroy(void* adafs_data);

#endif //FS_FUSE_OPS_H

ifs/include/fuse3/fuse_util.hpp

deleted100644 → 0
+0 −19
Original line number Diff line number Diff line

#ifndef IFS_FUSE_UTIL_HPP
#define IFS_FUSE_UTIL_HPP

#include <fuse3/fuse_main.hpp>

namespace Util {
    int init_inode_no();

    fuse_ino_t generate_inode_no();

    int read_inode_cnt();

    int write_inode_cnt();

    std::string get_my_hostname();
}

#endif //IFS_FUSE_UTIL_HPP
Loading