diff --git a/.gitignore b/.gitignore index 7d29fc82d7496155f5a3057e548866c4b181f054..3ead7440875c95fd13be842fcb86d0ea995dbd4e 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,8 @@ *.iml /java/flease/nbproject/private/ /java/pbrpcgen/nbproject/private/ -/java/pbrpcgen/dist/ \ No newline at end of file +/java/pbrpcgen/dist/ +/build +[._]*.s[a-w][a-z] +.clang_complete +cscope.out diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000000000000000000000000000000000000..dc032627b55b5f18edae83102564f2d46d66f682 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,25 @@ +language: java + +jdk: openjdk6 + +before_install: + - sudo apt-get update -qq + - sudo apt-get install -y libboost-all-dev libfuse-dev fuse libssl-dev libattr1-dev make cmake automake python valgrind + +before_script: + - TEST_DIR="/tmp/xtreemfs_xtestenv" + - XTREEMFS_DIR=`pwd` + +script: + - make server + - BUILD_CLIENT_TESTS=true make client_debug + - ./tests/xtestenv --clean-test-dir -x $XTREEMFS_DIR -t $TEST_DIR -c $XTREEMFS_DIR/tests/test_config.py -p travis + +after_failure: + - JUNIT_RESULT=`./contrib/travis/parse_results.py $TEST_DIR/result.json 'JUnit tests'` + - CPP_RESULT=`./contrib/travis/parse_results.py $TEST_DIR/result.json 'C++ Unit Tests'` + - VALGRIND_RESULT=`./contrib/travis/parse_results.py $TEST_DIR/result.json 'Valgrind memory-leak check for C++ Unit Tests'` + - if [[ $JUNIT_RESULT = "false" ]]; then cat $TEST_DIR/log/junit.log; fi + - if [[ $CPP_RESULT = "false" ]]; then cat cpp/build/Testing/Temporary/LastTest.log; fi + - if [[ $VALGRIND_RESULT = "false" ]]; then cat $TEST_DIR/log/valgrind.log; fi + diff --git a/AUTHORS b/AUTHORS index b91d316a80c6c31c2b2f93f6cb7cc5711d9cd2a3..03ff8287108fdf756b362d68db24ec0556a7965d 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,6 +1,7 @@ Michael Berlin Eugenio Cesario Johannes Dillmann +Jan Fajerski Jens V. Fischer Juan Gonzalez Lukas Kairies @@ -8,8 +9,10 @@ Christoph Kleineweber Björn Kolbeck Nico Kruber Felix Langner +Philippe Lieser Christian Lorenz Matthias Noack Patrick Schäfer +Robert Schmidtke Paul Seiferth Jan Stender diff --git a/KNOWN_ISSUES b/KNOWN_ISSUES index 96fb3f6e67dd5d1c65b215d6b252befeb9d83c32..28b1b5fd8cde66ae0a2ddd9f63ce22ee00f283b9 100644 --- a/KNOWN_ISSUES +++ b/KNOWN_ISSUES @@ -3,6 +3,6 @@ in our issue tracker and mark each with the label "KnownLimitations". Please have a look at - http://code.google.com/p/xtreemfs/issues/list?can=1&q=label%3AKnownLimitations + https://github.com/xtreemfs/xtreemfs/labels/KnownLimitations -for the complete list of current known limitations. \ No newline at end of file +for the complete list of current known limitations. diff --git a/Makefile b/Makefile index dd87b326aeb5c348d6b0fa8e3d073e61ef63f05a..a5dbf832c0c6223064932513523215fc1f5453ca 100644 --- a/Makefile +++ b/Makefile @@ -11,13 +11,14 @@ else endif ifeq "$(CMAKE_HOME)" "" - CMAKE_BIN = /usr/bin/cmake + CMAKE_BIN = cmake else CMAKE_BIN = $(CMAKE_HOME)/bin/cmake endif SHELL := $(shell which bash) WHICH_GPP = $(shell which g++) +WHICH_CLANGPP = $(shell which clang++) ifeq "$(shell uname)" "SunOS" PROTOBUF_DISABLE_64_BIT_SOLARIS = "--disable-64bit-solaris" @@ -45,7 +46,7 @@ PLUGIN_CONFIG_DIR=$(XTREEMFS_CONFIG_DIR)/server-repl-plugin # If you edit the next five variables, make sure you also change them in cpp/CMakeLists.txt. CLIENT_GOOGLE_PROTOBUF_CPP = cpp/thirdparty/protobuf-2.5.0 CLIENT_GOOGLE_PROTOBUF_CPP_LIBRARY = $(CLIENT_GOOGLE_PROTOBUF_CPP)/src/.libs/libprotobuf.a -CLIENT_GOOGLE_TEST_CPP = cpp/thirdparty/gtest-1.5.0 +CLIENT_GOOGLE_TEST_CPP = cpp/thirdparty/gtest-1.7.0 CLIENT_GOOGLE_TEST_CPP_LIBRARY = $(CLIENT_GOOGLE_TEST_CPP)/lib/.libs/libgtest.a CLIENT_GOOGLE_TEST_CPP_MAIN = $(CLIENT_GOOGLE_TEST_CPP)/lib/.libs/libgtest_main.a # The two required objects libgtest.a and libgtest_main.a both depend @@ -189,9 +190,9 @@ check_server: @echo "ant ok" check_client: - @if [ ! $(WHICH_GPP) ]; then echo "g++ not found";exit 1; fi; + @if [ ! $(WHICH_GPP) -a ! $(WHICH_CLANGPP) ]; then echo "C++ compiler not found";exit 1; fi; @if [ ! $(CMAKE_BIN) ]; then echo "cmake not found";exit 1; fi; - @echo "g++ ok" + @echo "C++ ok" check_test: @@ -216,12 +217,17 @@ endif # Do not use env variables to control the CMake behavior as stated in http://www.cmake.org/Wiki/CMake_FAQ#How_can_I_get_or_set_environment_variables.3F # Instead define them via -D, so they will be cached. ifdef BOOST_ROOT - CMAKE_BOOST_ROOT = -DBOOST_ROOT="$(BOOST_ROOT)" + CMAKE_BOOST_ROOT = -DBOOST_ROOT="$(BOOST_ROOT)" -D Boost_NO_SYSTEM_PATHS=ON endif # Tell CMake if it should ignore a missing Fuse. ifdef SKIP_FUSE CMAKE_SKIP_FUSE = -DSKIP_FUSE=true endif +# Trigger building the experimental LD_PRELOAD library +ifdef BUILD_PRELOAD + CMAKE_BUILD_PRELOAD = -DBUILD_PRELOAD=true +endif + client_thirdparty: $(CLIENT_THIRDPARTY_REQUIREMENTS) @@ -264,7 +270,7 @@ client_debug: CLIENT_DEBUG = -DCMAKE_BUILD_TYPE=Debug client_debug: client client: check_client client_thirdparty set_version - $(CMAKE_BIN) -Hcpp -B$(XTREEMFS_CLIENT_BUILD_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 $(CLIENT_DEBUG) $(CMAKE_BOOST_ROOT) $(CMAKE_BUILD_CLIENT_TESTS) $(CMAKE_SKIP_FUSE) + $(CMAKE_BIN) -Hcpp -B$(XTREEMFS_CLIENT_BUILD_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 $(CLIENT_DEBUG) $(CMAKE_BOOST_ROOT) $(CMAKE_BUILD_CLIENT_TESTS) $(CMAKE_SKIP_FUSE) ${CMAKE_BUILD_PRELOAD} @$(MAKE) -C $(XTREEMFS_CLIENT_BUILD_DIR) @cd $(XTREEMFS_CLIENT_BUILD_DIR); for i in *.xtreemfs xtfsutil; do [ -f $(XTREEMFS_BINARIES_DIR)/$$i ] && rm -f $(XTREEMFS_BINARIES_DIR)/$$i; done; true @cp -p $(XTREEMFS_CLIENT_BUILD_DIR)/*.xtreemfs $(XTREEMFS_BINARIES_DIR) diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..1ea3039415c9c089131466a5d7e92791400589f4 --- /dev/null +++ b/README.md @@ -0,0 +1,13 @@ +XtreemFS is a distributed, replicated and fault-tolerant file system for federated IT infrastructures. It is open source software licensed under the New BSD License. + +**For more information, downloads and documentation visit our website at http://www.XtreemFS.org.** + + * Website: http://www.XtreemFS.org + * Downloads (Linux, MacOSX, Windows): http://www.XtreemFS.org/download.php + * User Documentation: http://www.XtreemFS.org/userguide.php + * Mailing List: http://groups.google.com/group/xtreemfs + * Tutorial for Replication Fail-Over Demo: https://code.google.com/p/xtreemfs/wiki/ContrailSummerSchoolHandsOn2013 + +The XtreemFS project is developed by Zuse Institute Berlin. The development of the project is funded by the European Commission since 2006 under Grant Agreements No. FP6-033576, FP7-ICT-257438, and FP7-318521, as well as the German projects MoSGrid, "First We Take Berlin", FFMK, GeoMultiSens, and BBDC. + +[![Build Status](https://travis-ci.org/xtreemfs/xtreemfs.svg?branch=master)](https://travis-ci.org/xtreemfs/xtreemfs) diff --git a/contrib/benchmark/benchmark.sh b/contrib/benchmark/benchmark.sh index f3d321aede348ff14720599c908d429ca760019b..0a147cb38a7e7608c52ae519d215d63062f2b408 100755 --- a/contrib/benchmark/benchmark.sh +++ b/contrib/benchmark/benchmark.sh @@ -17,24 +17,35 @@ SLEEP=true BASEFILE_SIZE="100g" # the directories for the logfiles and the results -LOG_DIR="$HOME/log" -RESULT_DIR="$HOME/result" +LOG_BASE=${BENCH_LOG:-$HOME} +LOG_DIR="$LOG_BASE/log" +RESULT_DIR="$LOG_BASE/result" # Drops caches after each benchmark. Uncomment to activate # cp "drop_caches" to "/usr/local/bin" and add "ALL ALL=NOPASSWD: /usr/local/bin/drop_caches" to sudoers file -DROP_CACHES_CALL="sudo /usr/bin/drop_caches" +DROP_CACHES=${BENCH_DROP_CACHES:-"/usr/local/bin/drop_caches"} +if [[ $DROP_CACHES != "false" ]]; then + DROP_CACHES_CALL="sudo ${DROP_CACHES}" +fi # IP and Port of the DIR -DIR="localhost:32638" +DIR=${BENCH_DIR:-"localhost:32638"} # IP and Port of the MRC -MRC="localhost:32636" +MRC=${BENCH_MRC:-"localhost:32636"} # space separed list of OSD_UUIDS, e.g. "osd1 osd2 ..." -OSD_UUIDS="test-osd0" +OSD_UUIDS=${BENCH_OSD_UUIDS:-"test-osd0"} + +# stripe size for a volume +STRIPE_SIZE="128K" + +# request size for each I/O operation +REQUEST_SIZE=$STRIPE_SIZE -# the chunksize (aka blocksize) for the benchmarks -CHUNKSIZE="128K" +# replication settings +REPLICATION_POLICY="" +REPLICATION_FACTOR=1 check_env(){ # check XTREEMFS @@ -69,7 +80,7 @@ printUsage() { cat << EOF Synopsis - $(basename $0) -t TYPE -s NUMBER [-b NUMBER -e NUMBER] [-r NUMBER] [-v] + $(basename $0) -t TYPE -s NUMBER [-x NUMBER] [-p POLICY -f NUMBER] [-b NUMBER -e NUMBER] [-r NUMBER] [-v] Run a XtreemFS benchmark series, i.e. a series of benchmarks with increasing numbers of threads. Logs are placed in \$HOME/log/, results in \$HOME/results (can be changed at the head of the script). @@ -77,12 +88,27 @@ Synopsis -t type Type of benchmarks to run. Type can be either of the following: sw sequential write + usw unaligned sequential write sr sequential read rw random write rr random read -s size - Size of one benchmark, modifier M (for MiB) or G (for GiB) is mandatory. + Size of one benchmark, modifier K (for KiB), M (for MiB) or G (for GiB) is mandatory. + + -c size + Size of each read/write request, modifier K (for KiB), M (for MiB) or G (for GiB) is mandatory. + Defaults to 128K. + + -i size + Stripe size for each volume, modifier K (for KiB), M (for MiB) or G (for GiB) is mandatory. + Defaults to 128K. + + -p policy + Replication policy to use. Defaults to none. + + -f factor + Replication factor to use. Defaults to 1. -b number of threads to beginn the benchmark series Minimum number of threads to be run as the benchmarks series. @@ -118,13 +144,15 @@ init_params(){ THREADS="$(seq $BEGIN $END)" REPETITIONS="$(seq 1 $REPETITIONS)" - NOW=$(date +"%y-%m-%d_%H-%M") + # use second resolution in case multiple benchmarks are run per minute + NOW=$(date +"%y-%m-%d_%H-%M-%S") # redirect stdout and stderr exec 2> >(tee $LOG_DIR/$TYPE-$NOW.log) exec > >(tee $RESULT_DIR/$TYPE-$NOW.csv) BASEFILE_SIZE=$(parse_size $BASEFILE_SIZE) - CHUNKSIZE=$(parse_size $CHUNKSIZE) + REQUEST_SIZE=$(parse_size $REQUEST_SIZE) + STRIPE_SIZE=$(parse_size $STRIPE_SIZE) } @@ -166,7 +194,7 @@ prepare_seq_read(){ for i in $(seq 1 $threads); do local index=$(echo "$i-1"|bc) timeout --foreground $TIMEOUT $XTREEMFS/bin/xtfs_benchmark -sw -ssize $1 --no-cleanup --user $USER \ - ${VOLUMES[$index]} + ${VOLUMES[$index]} --stripe-size $STRIPE_SIZE --chunk-size $REQUEST_SIZE done } @@ -178,14 +206,14 @@ prepare_random(){ local volume_index=$(echo "$threads-1" | bc) for i in $(seq 0 $volume_index); do VOLUMES[$i]=benchmark$i; done - # calc basefile size and round to a number divideable through CHUNKSIZE - local basefile_size=$(echo "(($BASEFILE_SIZE/$threads)/$CHUNKSIZE)*$CHUNKSIZE" | bc) + # calc basefile size and round to a number divideable through REQUEST_SIZE + local basefile_size=$(echo "(($BASEFILE_SIZE/$threads)/$REQUEST_SIZE)*$REQUEST_SIZE" | bc) echo -e "\nPreparing random benchmark: Creating a basefiles\n" >&2 for i in $(seq 1 $threads); do local index=$(echo "$i-1"|bc) - timeout --foreground $TIMEOUT $XTREEMFS/bin/xtfs_benchmark -rr -rsize $CHUNKSIZE --no-cleanup-basefile --no-cleanup-volumes --user $USER \ - --basefile-size $basefile_size ${VOLUMES[$index]} + timeout --foreground $TIMEOUT $XTREEMFS/bin/xtfs_benchmark -rr -rsize $REQUEST_SIZE --no-cleanup-basefile --no-cleanup-volumes --user $USER \ + --basefile-size $basefile_size ${VOLUMES[$index]} --stripe-size $STRIPE_SIZE --chunk-size $REQUEST_SIZE done } @@ -194,15 +222,23 @@ run_benchmark(){ local benchType=$1 local size=$2 local threads=$3 + local replicationOpt="" + if [[ $REPLICATION_POLICY != "" ]]; then + replicationOpt="--replication-policy $REPLICATION_POLICY" + fi + if [ $benchType = "sr" ]; then - XTREEMFS=$XTREEMFS timeout --foreground $TIMEOUT $XTREEMFS/bin/xtfs_benchmark -$benchType -ssize $size -n $threads --no-cleanup-volumes --user $USER - elif [ $benchType = "sw" ]; then - XTREEMFS=$XTREEMFS timeout --foreground $TIMEOUT $XTREEMFS/bin/xtfs_benchmark -$benchType -ssize $size -n $threads --user $USER + XTREEMFS=$XTREEMFS timeout --foreground $TIMEOUT $XTREEMFS/bin/xtfs_benchmark -$benchType -ssize $size -n $threads --no-cleanup-volumes --user $USER \ + $replicationOpt --replication-factor $REPLICATION_FACTOR --chunk-size $REQUEST_SIZE --stripe-size $STRIPE_SIZE + elif [ $benchType = "sw" ] || [ $benchType = "usw" ]; then + XTREEMFS=$XTREEMFS timeout --foreground $TIMEOUT $XTREEMFS/bin/xtfs_benchmark -$benchType -ssize $size -n $threads --user $USER \ + $replicationOpt --replication-factor $REPLICATION_FACTOR --chunk-size $REQUEST_SIZE --stripe-size $STRIPE_SIZE elif [ $benchType = "rw" ] || [ $benchType = "rr" ]; then - # calc basefile size and round to a number divideable through CHUNKSIZE - local basefile_size=$(echo "(($BASEFILE_SIZE/$threads)/$CHUNKSIZE)*$CHUNKSIZE" | bc) + # calc basefile size and round to a number divideable through REQUEST_SIZE + local basefile_size=$(echo "(($BASEFILE_SIZE/$threads)/$REQUEST_SIZE)*$REQUEST_SIZE" | bc) XTREEMFS=$XTREEMFS timeout --foreground $TIMEOUT $XTREEMFS/bin/xtfs_benchmark -$benchType -rsize $size --basefile-size $basefile_size -n $threads \ - --no-cleanup-basefile --no-cleanup-volumes --user $USER + --no-cleanup-basefile --no-cleanup-volumes --user $USER \ + $replicationOpt --replication-factor $REPLICATION_FACTOR --chunk-size $REQUEST_SIZE --stripe-size $STRIPE_SIZE fi local bench_exit_status=$? @@ -278,28 +314,24 @@ REPETITIONS=1 # parse options -while getopts ":t:s:b:e:r:c:v" opt; do +while getopts ":t:s:c:i:b:e:r:p:f:v" opt; do case $opt in t) - if [ $OPTARG = "sw" ] || [ $OPTARG = "sr" ] || [ $OPTARG = "rw" ] || [ $OPTARG = "rr" ]; then + if [ $OPTARG = "sw" ] || [ $OPTARG = "usw" ] || [ $OPTARG = "sr" ] || [ $OPTARG = "rw" ] || [ $OPTARG = "rr" ]; then TYPE=$OPTARG else - echo 'wrong argument to -t. Needs to be either "sw", "sr", "rw" or "rr"' + echo 'wrong argument to -t. Needs to be either "sw", "usw", "sr", "rw" or "rr"' exit 1 fi ;; s) - index=$(echo `expr match $OPTARG '[0-9]\+'`) - SIZE=${OPTARG:0:$index} - modifier=${OPTARG:$index} - if [ $modifier = "M" ]; then - SIZE=$(echo "$SIZE*2^20" | bc) - elif [ $modifier = "G" ]; then - SIZE=$(echo "$SIZE*2^30" | bc) - else - echo "Wrong size modifier. Only 'M' and 'G' are allowed" - exit 1 - fi + SIZE=$(parse_size $OPTARG) + ;; + c) + REQUEST_SIZE=$(parse_size $OPTARG) + ;; + i) + STRIPE_SIZE=$(parse_size $OPTARG) ;; b) BEGIN=$OPTARG @@ -310,13 +342,16 @@ while getopts ":t:s:b:e:r:c:v" opt; do r) REPETITIONS=$OPTARG ;; + p) + REPLICATION_POLICY=$OPTARG + ;; + f) + REPLICATION_FACTOR=$OPTARG + ;; v) SLEEP=false set -x ;; - c) - CONFIG=$OPTARG - ;; \?) echo "Invalid option: -$OPTARG" >&2 exit 1 @@ -334,11 +369,13 @@ drop_caches for i in $THREADS; do size="$(echo "$SIZE/$i"|bc)" - size="$(echo "($size/$CHUNKSIZE)*$CHUNKSIZE" | bc)" # round down to a size divideable through the CHUNKSIZE + if [ $TYPE != "usw" ]; then + size="$(echo "($size/$REQUEST_SIZE)*$REQUEST_SIZE" | bc)" # round down to a size divideable through the REQUEST_SIZE + fi if [ $TYPE = "sr" ]; then prepare_seq_read $size $i - cleanup_osd18:30 + cleanup_osd elif [ $TYPE = "rw" ] || [ $TYPE = "rr" ]; then prepare_random $i fi @@ -353,7 +390,7 @@ for i in $THREADS; do done # seq write benchmarks run cleanup after every benchmark, so this would be redundant - if [ $TYPE != "sw" ]; then + if [ $TYPE != "sw" ] && [ $TYPE != "usw" ]; then volume_index=$(echo "$i-1" | bc) for i in $(seq 0 $volume_index); do rmfs.xtreemfs -f $MRC/benchmark$i diff --git a/contrib/osd-health/osd_health_check.sh b/contrib/osd-health/osd_health_check.sh new file mode 100755 index 0000000000000000000000000000000000000000..068de1c30937c36e8f28d3cc7bdea472ee64e343 --- /dev/null +++ b/contrib/osd-health/osd_health_check.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +OBJECT_DIR=$1 + +# get device for object_dir +IFS=' ' read -r DEVICE TMP <<< $(df $OBJECT_DIR | grep dev) + +# Determine device type +if [[ $DEVICE == *md* ]]; then + # DEVICE is a RAID configuration + DEVICES=$(IFS=' ' read -a TMP <<< $(cat /proc/mdstat | grep $DEVICE)) + DEVICES=${DEVICES[@]:4} +elif [[ $DEVICE == *sd* || $DEVICE == *hd* ]]; then + # DEVICE is a single disk + DEVICES=$DEVICE +else + # unsupported device type + echo "unsupported device type" + exit 3 +fi + +for DEVICE in $DEVICES; do + SMART_STATUS="$(sudo smartctl --health $DEVICE)" + echo $SMART_STATUS + if [[ $SMART_STATUS == *PASSED* ]] + then + continue; + elif [[ $SMART_STATUS == *FAILED* ]] + then + exit 1 + else + exit 3 + fi +done + +# If no device's health test failed, return 0 (i.e. health test PASSED). +exit 0 diff --git a/contrib/travis/parse_results.py b/contrib/travis/parse_results.py new file mode 100755 index 0000000000000000000000000000000000000000..fc32124e723d38c97983c0dd595ada961cb9ace7 --- /dev/null +++ b/contrib/travis/parse_results.py @@ -0,0 +1,34 @@ +#!/usr/bin/env python + +# Copyright (c) 2014 by Johannes Dillmann, Zuse Institute Berlin +# Licensed under the BSD License, see LICENSE file for details. + +import sys + +import argparse +import json + + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument("file", type=argparse.FileType('r')) + parser.add_argument("test") + args = parser.parse_args() + + results = json.load(args.file) + result = None + + if args.test in results: + result = results[args.test] + + if type(result) == bool and result: + print "true" + sys.exit(0) + + if type(result) == dict and all(result.values()): + print "true" + sys.exit(0) + + print "false" + sys.exit(1) + diff --git a/cpp/.gitignore b/cpp/.gitignore index 55df0e68efcf6a27d8152af2d98c2a3deb3f116b..25fa3ffa4c63e8a0b10aa67c02070d094e73c9df 100644 --- a/cpp/.gitignore +++ b/cpp/.gitignore @@ -1,5 +1,6 @@ /build /html +/nbproject /.project /.cproject /.settings diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 91b3459e3cf82c7025980633c40c1856b1ebf998..52d4849aa853d7b917c26bc744081ea5f2aa88cb 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -1,9 +1,12 @@ cmake_minimum_required(VERSION 2.6) -PROJECT(cpp CXX) +PROJECT(cpp CXX C) #SET (CMAKE_VERBOSE_MAKEFILE true) -add_definitions(-D_FILE_OFFSET_BITS=64) +# used for everything, but the preload library (which struggles with implicitly +# generated symbols suffixed with 64, e.g. open64) +set(COMPILE_DEFS "_FILE_OFFSET_BITS=64") + # Uncomment this to enable boost::asio debug output. #add_definitions(-DBOOST_ASIO_ENABLE_HANDLER_TRACKING) @@ -34,9 +37,14 @@ set(CLIENT_GOOGLE_PROTOBUF_CPP "${CMAKE_SOURCE_DIR}/thirdparty/protobuf-2.5.0") if (WIN32) set(CLIENT_GOOGLE_PROTOBUF_CPP_LIBRARY "${CLIENT_GOOGLE_PROTOBUF_CPP}/vsprojects/Release/libprotobuf.lib") else() - set(CLIENT_GOOGLE_PROTOBUF_CPP_LIBRARY "${CLIENT_GOOGLE_PROTOBUF_CPP}/src/.libs/libprotobuf.a") + FIND_FILE(CLIENT_GOOGLE_PROTOBUF_CPP_LIBRARY + "libprotobuf.a" + PATHS "${CLIENT_GOOGLE_PROTOBUF_CPP}/src/.libs/") + FIND_FILE(CLIENT_GOOGLE_PROTOBUF_CPP_DYNAMIC_LIBRARY + "libprotobuf.so" + PATHS "${CLIENT_GOOGLE_PROTOBUF_CPP}/src/.libs/") endif(WIN32) -set(CLIENT_GOOGLE_TEST_CPP "${CMAKE_SOURCE_DIR}/thirdparty/gtest-1.5.0") +set(CLIENT_GOOGLE_TEST_CPP "${CMAKE_SOURCE_DIR}/thirdparty/gtest-1.7.0") if (WIN32) set(CLIENT_GOOGLE_TEST_CPP_LIBRARY "${CLIENT_GOOGLE_TEST_CPP}/msvc/gtest-md/Debug/gtestd.lib") else() @@ -121,6 +129,7 @@ ENDIF(WIN32) # Set required thirdparty libraries. # Boost +#set(Boost_DEBUG ON) set(REQUIRED_BOOST_LIBRARIES "system" "thread" "program_options" "regex") if (BOOST_ROOT) message(STATUS "Info: BOOST_ROOT is set to: ${BOOST_ROOT}") @@ -228,18 +237,26 @@ add_library(xtreemfs ${SRCS_RPC} ${SRCS_UTIL} ${SRCS_GENERATED} ${SRCS_XTREEMFS} TARGET_LINK_LIBRARIES(xtreemfs optimized protobuf debug protobuf_debug ${Boost_LIBRARIES} ${LIBPTHREAD} ${OPENSSL_LIBRARIES} ${LIBSOCKET_SOLARIS} ${LIBNSL_SOLARIS}) ADD_EXECUTABLE(example_libxtreemfs src/example_libxtreemfs/example_libxtreemfs.cpp) +SET_TARGET_PROPERTIES(example_libxtreemfs PROPERTIES COMPILE_DEFINITIONS ${COMPILE_DEFS}) TARGET_LINK_LIBRARIES(example_libxtreemfs xtreemfs) +ADD_EXECUTABLE(example_replication src/example_libxtreemfs/example_replication.cpp) +SET_TARGET_PROPERTIES(example_replication PROPERTIES COMPILE_DEFINITIONS ${COMPILE_DEFS}) +TARGET_LINK_LIBRARIES(example_replication xtreemfs) + file(GLOB_RECURSE SRCS_MKFS src/mkfs.xtreemfs/*.cpp) ADD_EXECUTABLE(mkfs.xtreemfs ${SRCS_MKFS}) +SET_TARGET_PROPERTIES(mkfs.xtreemfs PROPERTIES COMPILE_DEFINITIONS ${COMPILE_DEFS}) TARGET_LINK_LIBRARIES(mkfs.xtreemfs xtreemfs) file(GLOB_RECURSE SRCS_RMFS src/rmfs.xtreemfs/*.cpp) ADD_EXECUTABLE(rmfs.xtreemfs ${SRCS_RMFS}) +SET_TARGET_PROPERTIES(rmfs.xtreemfs PROPERTIES COMPILE_DEFINITIONS ${COMPILE_DEFS}) TARGET_LINK_LIBRARIES(rmfs.xtreemfs xtreemfs) file(GLOB_RECURSE SRCS_LSFS src/lsfs.xtreemfs/*.cpp) ADD_EXECUTABLE(lsfs.xtreemfs ${SRCS_LSFS}) +SET_TARGET_PROPERTIES(lsfs.xtreemfs PROPERTIES COMPILE_DEFINITIONS ${COMPILE_DEFS}) TARGET_LINK_LIBRARIES(lsfs.xtreemfs xtreemfs) file(GLOB_RECURSE SRCS_XTFS_UTIL src/xtfsutil/xtfsutil_server.cpp) @@ -251,6 +268,7 @@ if (NOT WIN32) file(GLOB_RECURSE SRCS_FUSE_ADAPTER src/fuse/fuse*.cpp) file(GLOB_RECURSE SRCS_FUSE_ADAPTER_MAIN src/fuse/mount.xtreemfs.cpp) ADD_EXECUTABLE(mount.xtreemfs ${SRCS_FUSE_ADAPTER} ${SRCS_FUSE_ADAPTER_MAIN} ${SRCS_XTFS_UTIL} ${SRCS_JSONCPP}) + SET_TARGET_PROPERTIES(mount.xtreemfs PROPERTIES COMPILE_DEFINITIONS ${COMPILE_DEFS}) TARGET_LINK_LIBRARIES(mount.xtreemfs xtreemfs ${LIBFUSE}) set(UNITTESTS_REQUIRED_SOURCES_fuse ${SRCS_FUSE_ADAPTER} ${SRCS_XTFS_UTIL} ${SRCS_JSONCPP}) @@ -271,6 +289,47 @@ if(WIN32 AND CBFS_FOUND) set(UNITTESTS_SKIP_fuse true) endif(WIN32 AND CBFS_FOUND) +function(find_source_files RESULT) + set(RESULT "") + foreach(GLOBEXPR ${ARGV}) + file(GLOB_RECURSE FILES ${GLOBEXPR}) + foreach(TEST ${FILES}) + get_filename_component(DIRNAME ${TEST} PATH) + get_filename_component(COMPONENT ${DIRNAME} NAME) + get_filename_component(FILENAME ${TEST} NAME) + if (${FILENAME} MATCHES "_test.cpp$") + #skip + elseif (${FILENAME} MATCHES "_main.cpp$") + #skip + else() + LIST(APPEND RESULT ${TEST}) + endif() + endforeach(TEST) + endforeach(GLOBEXPR) + set(FIND_RESULT ${RESULT} PARENT_SCOPE) +endfunction(find_source_files) + +#SET(BUILD_PRELOAD TRUE) +if (BUILD_PRELOAD) + find_source_files("src/ld_preload/*.cpp" "include/ld_preload/*.h") + set(SRCS_PRELOAD ${FIND_RESULT}) + + # The LD_PRELOAD dynamic library + add_library(xtreemfs_preload SHARED ${SRCS_PRELOAD} + ${SRCS_RPC} ${SRCS_UTIL} ${SRCS_GENERATED} ${SRCS_XTREEMFS}) + + IF(NOT ${CMAKE_BUILD_TYPE} MATCHES "Debug") + SET_TARGET_PROPERTIES(xtreemfs_preload PROPERTIES COMPILE_DEFINITIONS "XTREEMFS_PRELOAD_QUIET") + ENDIF(NOT ${CMAKE_BUILD_TYPE} MATCHES "Debug") + + SET_TARGET_PROPERTIES(xtreemfs_preload PROPERTIES LINKER_LANGUAGE C) + TARGET_LINK_LIBRARIES(xtreemfs_preload + xtreemfs + -ldl + ${CLIENT_GOOGLE_PROTOBUF_CPP_DYNAMIC_LIBRARY}) + ADD_EXECUTABLE(preload_test "test/ld_preload/preload_test.cpp") +endif(BUILD_PRELOAD) + ################################################################################ # Define building of unittests. ################################################################################ @@ -317,6 +376,7 @@ if(BUILD_CLIENT_TESTS) MESSAGE(STATUS "\tConfiguring test: ${testname}.") add_executable(${testname} ${TEST} ${UNITTESTS_REQUIRED_SOURCES_${COMPONENT}}) + SET_TARGET_PROPERTIES(${testname} PROPERTIES COMPILE_DEFINITIONS ${COMPILE_DEFS}) TARGET_LINK_LIBRARIES(${testname} gtest_main gtest test_common xtreemfs ${UNITTESTS_REQUIRED_LIBRARIES_${COMPONENT}}) ADD_TEST(${testname} ${testname}) else() diff --git a/cpp/generated/pbrpc/PingServiceClient.h b/cpp/generated/pbrpc/PingServiceClient.h index 82a546ffc9fc1a2cfd3ef6eb2cbb10367c6ad55f..29c4283a3eb268f1b6ae3a2d59bea89572cd48c6 100644 --- a/cpp/generated/pbrpc/PingServiceClient.h +++ b/cpp/generated/pbrpc/PingServiceClient.h @@ -1,5 +1,5 @@ -//automatically generated from Ping.proto at Mon Nov 11 11:47:00 CET 2013 -//(c) 2013. See LICENSE file for details. +//automatically generated from Ping.proto at Wed Nov 12 13:55:48 CET 2014 +//(c) 2014. See LICENSE file for details. #ifndef PINGSERVICECLIENT_H #define PINGSERVICECLIENT_H diff --git a/cpp/generated/pbrpc/PingServiceConstants.h b/cpp/generated/pbrpc/PingServiceConstants.h index e659f0cd41d6a5b212df3c9e29c334d920951054..efc9cb2032a75a18def51a0d8907e64631889fc8 100644 --- a/cpp/generated/pbrpc/PingServiceConstants.h +++ b/cpp/generated/pbrpc/PingServiceConstants.h @@ -1,5 +1,5 @@ -//automatically generated from Ping.proto at Mon Nov 11 11:47:00 CET 2013 -//(c) 2013. See LICENSE file for details. +//automatically generated from Ping.proto at Wed Nov 12 13:55:48 CET 2014 +//(c) 2014. See LICENSE file for details. #ifndef PINGSERVICECONSTANTS_H_ #define PINGSERVICECONSTANTS_H_ diff --git a/cpp/generated/pbrpc/RPC.pb.cc b/cpp/generated/pbrpc/RPC.pb.cc index d45de90be148f18435058b39dc340c7bca1b0e54..5cad7feb6b33cd2f972ccc34344f6255558e0af8 100644 --- a/cpp/generated/pbrpc/RPC.pb.cc +++ b/cpp/generated/pbrpc/RPC.pb.cc @@ -238,7 +238,7 @@ void protobuf_AddDesc_pbrpc_2fRPC_2eproto() { "D\020\002\022\020\n\014GARBAGE_ARGS\020\003\022\017\n\013AUTH_FAILED\020\004\022\031" "\n\025INTERNAL_SERVER_ERROR\020\005\022\t\n\005ERRNO\020\006\022\014\n\010" "REDIRECT\020\007\022\020\n\014INVALID_VIEW\020\010\022\014\n\010IO_ERROR" - "\020d*\362\002\n\nPOSIXErrno\022\025\n\020POSIX_ERROR_NONE\020\217N" + "\020d*\212\003\n\nPOSIXErrno\022\025\n\020POSIX_ERROR_NONE\020\217N" "\022\025\n\021POSIX_ERROR_EPERM\020\001\022\026\n\022POSIX_ERROR_E" "NOENT\020\002\022\025\n\021POSIX_ERROR_EINTR\020\004\022\023\n\017POSIX_" "ERROR_EIO\020\005\022\026\n\022POSIX_ERROR_EAGAIN\020\013\022\026\n\022P" @@ -246,9 +246,10 @@ void protobuf_AddDesc_pbrpc_2fRPC_2eproto() { "T\020\021\022\025\n\021POSIX_ERROR_EXDEV\020\022\022\026\n\022POSIX_ERRO" "R_ENODEV\020\023\022\027\n\023POSIX_ERROR_ENOTDIR\020\024\022\026\n\022P" "OSIX_ERROR_EISDIR\020\025\022\026\n\022POSIX_ERROR_EINVA" - "L\020\026\022\031\n\025POSIX_ERROR_ENOTEMPTY\020\'\022\027\n\023POSIX_" - "ERROR_ENODATA\020=B3\n1org.xtreemfs.foundati" - "on.pbrpc.generatedinterfaces", 1548); + "L\020\026\022\026\n\022POSIX_ERROR_ENOSPC\020\034\022\031\n\025POSIX_ERR" + "OR_ENOTEMPTY\020\'\022\027\n\023POSIX_ERROR_ENODATA\020=B" + "3\n1org.xtreemfs.foundation.pbrpc.generat" + "edinterfaces", 1572); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "pbrpc/RPC.proto", &protobuf_RegisterTypes); UserCredentials::default_instance_ = new UserCredentials(); @@ -340,6 +341,7 @@ bool POSIXErrno_IsValid(int value) { case 20: case 21: case 22: + case 28: case 39: case 61: case 9999: diff --git a/cpp/generated/pbrpc/RPC.pb.h b/cpp/generated/pbrpc/RPC.pb.h index 4c744781877c63bb79c14fe78a6433e7b107adee..67124973495bfdd5029f83317361d0e3494657a4 100644 --- a/cpp/generated/pbrpc/RPC.pb.h +++ b/cpp/generated/pbrpc/RPC.pb.h @@ -121,6 +121,7 @@ enum POSIXErrno { POSIX_ERROR_ENOTDIR = 20, POSIX_ERROR_EISDIR = 21, POSIX_ERROR_EINVAL = 22, + POSIX_ERROR_ENOSPC = 28, POSIX_ERROR_ENOTEMPTY = 39, POSIX_ERROR_ENODATA = 61 }; diff --git a/cpp/generated/xtreemfs/DIRServiceClient.h b/cpp/generated/xtreemfs/DIRServiceClient.h index 9593e46ad9ae9bbea2d31e8082cd80d483cd852c..5552e64ec30d34a18784337c3df4f8b354a0da68 100644 --- a/cpp/generated/xtreemfs/DIRServiceClient.h +++ b/cpp/generated/xtreemfs/DIRServiceClient.h @@ -1,5 +1,5 @@ -//automatically generated from DIR.proto at Mon Nov 11 11:46:59 CET 2013 -//(c) 2013. See LICENSE file for details. +//automatically generated from DIR.proto at Wed Nov 12 13:55:48 CET 2014 +//(c) 2014. See LICENSE file for details. #ifndef DIRSERVICECLIENT_H #define DIRSERVICECLIENT_H diff --git a/cpp/generated/xtreemfs/DIRServiceConstants.h b/cpp/generated/xtreemfs/DIRServiceConstants.h index 010132f1eb7b45645b995a401a5980fca30c704a..e8025618b101c6f20370b93e3446e1568ee733bf 100644 --- a/cpp/generated/xtreemfs/DIRServiceConstants.h +++ b/cpp/generated/xtreemfs/DIRServiceConstants.h @@ -1,5 +1,5 @@ -//automatically generated from DIR.proto at Mon Nov 11 11:46:59 CET 2013 -//(c) 2013. See LICENSE file for details. +//automatically generated from DIR.proto at Wed Nov 12 13:55:48 CET 2014 +//(c) 2014. See LICENSE file for details. #ifndef DIRSERVICECONSTANTS_H_ #define DIRSERVICECONSTANTS_H_ diff --git a/cpp/generated/xtreemfs/GlobalTypes.pb.cc b/cpp/generated/xtreemfs/GlobalTypes.pb.cc index 43eb62aea259872b5e9f5c967bf9f6bfa4b03b41..ca549f47d3b6dbed2228eee60237adfb9b13669e 100644 --- a/cpp/generated/xtreemfs/GlobalTypes.pb.cc +++ b/cpp/generated/xtreemfs/GlobalTypes.pb.cc @@ -376,7 +376,7 @@ void protobuf_AddDesc_xtreemfs_2fGlobalTypes_2eproto() { "*|\n\027AccessControlPolicyType\022\036\n\032ACCESS_CO" "NTROL_POLICY_NULL\020\001\022\037\n\033ACCESS_CONTROL_PO" "LICY_POSIX\020\002\022 \n\034ACCESS_CONTROL_POLICY_VO" - "LUME\020\003*\304\003\n\026OSDSelectionPolicyType\022(\n#OSD" + "LUME\020\003*\365\003\n\026OSDSelectionPolicyType\022(\n#OSD" "_SELECTION_POLICY_FILTER_DEFAULT\020\350\007\022%\n O" "SD_SELECTION_POLICY_FILTER_FQDN\020\351\007\022%\n OS" "D_SELECTION_POLICY_FILTER_UUID\020\352\007\022%\n OSD" @@ -385,38 +385,39 @@ void protobuf_AddDesc_xtreemfs_2fGlobalTypes_2eproto() { "LECTION_POLICY_SORT_DCMAP\020\270\027\022#\n\036OSD_SELE" "CTION_POLICY_SORT_FQDN\020\271\027\022%\n OSD_SELECTI" "ON_POLICY_SORT_RANDOM\020\272\027\022&\n!OSD_SELECTIO" - "N_POLICY_SORT_VIVALDI\020\273\027\022#\n\036OSD_SELECTIO" - "N_POLICY_SORT_UUID\020\236\037\022&\n!OSD_SELECTION_P" - "OLICY_SORT_REVERSE\020\237\037*A\n\032ReplicaSelectio" - "nPolicyType\022#\n\037REPLICA_SELECTION_POLICY_" - "SIMPLE\020\001*i\n\nSnapConfig\022\036\n\032SNAP_CONFIG_SN" - "APS_DISABLED\020\000\022\036\n\032SNAP_CONFIG_ACCESS_CUR" - "RENT\020\001\022\033\n\027SNAP_CONFIG_ACCESS_SNAP\020\002*/\n\022S" - "tripingPolicyType\022\031\n\025STRIPING_POLICY_RAI" - "D0\020\000*\270\001\n\005PORTS\022\033\n\025DIR_HTTP_PORT_DEFAULT\020" - "\256\357\001\022\034\n\026DIR_PBRPC_PORT_DEFAULT\020\376\376\001\022\033\n\025MRC" - "_HTTP_PORT_DEFAULT\020\254\357\001\022\034\n\026MRC_PBRPC_PORT" - "_DEFAULT\020\374\376\001\022\033\n\025OSD_HTTP_PORT_DEFAULT\020\260\357" - "\001\022\034\n\026OSD_PBRPC_PORT_DEFAULT\020\200\377\001*+\n\tCONST" - "ANTS\022\036\n\032XCAP_RENEW_INTERVAL_IN_MIN\020\001*\202\003\n" - "\016SYSTEM_V_FCNTL\022\035\n\031SYSTEM_V_FCNTL_H_O_RD" - "ONLY\020\000\022\035\n\031SYSTEM_V_FCNTL_H_O_WRONLY\020\001\022\033\n" - "\027SYSTEM_V_FCNTL_H_O_RDWR\020\002\022\035\n\031SYSTEM_V_F" - "CNTL_H_O_APPEND\020\010\022\035\n\030SYSTEM_V_FCNTL_H_O_" - "CREAT\020\200\002\022\035\n\030SYSTEM_V_FCNTL_H_O_TRUNC\020\200\004\022" - "\034\n\027SYSTEM_V_FCNTL_H_O_EXCL\020\200\010\022\033\n\027SYSTEM_" - "V_FCNTL_H_O_SYNC\020\020\022\036\n\030SYSTEM_V_FCNTL_H_S" - "_IFREG\020\200\200\002\022\036\n\030SYSTEM_V_FCNTL_H_S_IFDIR\020\200" - "\200\001\022\036\n\030SYSTEM_V_FCNTL_H_S_IFLNK\020\200\300\002\022\035\n\030SY" - "STEM_V_FCNTL_H_S_IFIFO\020\200 *\330\001\n\tREPL_FLAG\022" - "\032\n\026REPL_FLAG_FULL_REPLICA\020\001\022\031\n\025REPL_FLAG" - "_IS_COMPLETE\020\002\022\035\n\031REPL_FLAG_STRATEGY_RAN" - "DOM\020\004\022#\n\037REPL_FLAG_STRATEGY_RAREST_FIRST" - "\020\010\022!\n\035REPL_FLAG_STRATEGY_SEQUENTIAL\020\020\022-\n" - ")REPL_FLAG_STRATEGY_SEQUENTIAL_PREFETCHI" - "NG\020 *%\n\010SERVICES\022\007\n\003DIR\020\001\022\007\n\003MRC\020\002\022\007\n\003OS" - "D\020\003B(\n&org.xtreemfs.pbrpc.generatedinter" - "faces", 2925); + "N_POLICY_SORT_VIVALDI\020\273\027\022/\n*OSD_SELECTIO" + "N_POLICY_SORT_HOST_ROUND_ROBIN\020\274\027\022#\n\036OSD" + "_SELECTION_POLICY_SORT_UUID\020\236\037\022&\n!OSD_SE" + "LECTION_POLICY_SORT_REVERSE\020\237\037*A\n\032Replic" + "aSelectionPolicyType\022#\n\037REPLICA_SELECTIO" + "N_POLICY_SIMPLE\020\001*i\n\nSnapConfig\022\036\n\032SNAP_" + "CONFIG_SNAPS_DISABLED\020\000\022\036\n\032SNAP_CONFIG_A" + "CCESS_CURRENT\020\001\022\033\n\027SNAP_CONFIG_ACCESS_SN" + "AP\020\002*/\n\022StripingPolicyType\022\031\n\025STRIPING_P" + "OLICY_RAID0\020\000*\270\001\n\005PORTS\022\033\n\025DIR_HTTP_PORT" + "_DEFAULT\020\256\357\001\022\034\n\026DIR_PBRPC_PORT_DEFAULT\020\376" + "\376\001\022\033\n\025MRC_HTTP_PORT_DEFAULT\020\254\357\001\022\034\n\026MRC_P" + "BRPC_PORT_DEFAULT\020\374\376\001\022\033\n\025OSD_HTTP_PORT_D" + "EFAULT\020\260\357\001\022\034\n\026OSD_PBRPC_PORT_DEFAULT\020\200\377\001" + "*+\n\tCONSTANTS\022\036\n\032XCAP_RENEW_INTERVAL_IN_" + "MIN\020\001*\202\003\n\016SYSTEM_V_FCNTL\022\035\n\031SYSTEM_V_FCN" + "TL_H_O_RDONLY\020\000\022\035\n\031SYSTEM_V_FCNTL_H_O_WR" + "ONLY\020\001\022\033\n\027SYSTEM_V_FCNTL_H_O_RDWR\020\002\022\035\n\031S" + "YSTEM_V_FCNTL_H_O_APPEND\020\010\022\035\n\030SYSTEM_V_F" + "CNTL_H_O_CREAT\020\200\002\022\035\n\030SYSTEM_V_FCNTL_H_O_" + "TRUNC\020\200\004\022\034\n\027SYSTEM_V_FCNTL_H_O_EXCL\020\200\010\022\033" + "\n\027SYSTEM_V_FCNTL_H_O_SYNC\020\020\022\036\n\030SYSTEM_V_" + "FCNTL_H_S_IFREG\020\200\200\002\022\036\n\030SYSTEM_V_FCNTL_H_" + "S_IFDIR\020\200\200\001\022\036\n\030SYSTEM_V_FCNTL_H_S_IFLNK\020" + "\200\300\002\022\035\n\030SYSTEM_V_FCNTL_H_S_IFIFO\020\200 *\330\001\n\tR" + "EPL_FLAG\022\032\n\026REPL_FLAG_FULL_REPLICA\020\001\022\031\n\025" + "REPL_FLAG_IS_COMPLETE\020\002\022\035\n\031REPL_FLAG_STR" + "ATEGY_RANDOM\020\004\022#\n\037REPL_FLAG_STRATEGY_RAR" + "EST_FIRST\020\010\022!\n\035REPL_FLAG_STRATEGY_SEQUEN" + "TIAL\020\020\022-\n)REPL_FLAG_STRATEGY_SEQUENTIAL_" + "PREFETCHING\020 *%\n\010SERVICES\022\007\n\003DIR\020\001\022\007\n\003MR" + "C\020\002\022\007\n\003OSD\020\003B(\n&org.xtreemfs.pbrpc.gener" + "atedinterfaces", 2974); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "xtreemfs/GlobalTypes.proto", &protobuf_RegisterTypes); NewFileSize::default_instance_ = new NewFileSize(); @@ -480,6 +481,7 @@ bool OSDSelectionPolicyType_IsValid(int value) { case 3001: case 3002: case 3003: + case 3004: case 3998: case 3999: return true; diff --git a/cpp/generated/xtreemfs/GlobalTypes.pb.h b/cpp/generated/xtreemfs/GlobalTypes.pb.h index 50872124247d3e00e7a86e81913a9f7d1187be1b..b5ac718faadea96714aa8921d115944d0d747354 100644 --- a/cpp/generated/xtreemfs/GlobalTypes.pb.h +++ b/cpp/generated/xtreemfs/GlobalTypes.pb.h @@ -79,6 +79,7 @@ enum OSDSelectionPolicyType { OSD_SELECTION_POLICY_SORT_FQDN = 3001, OSD_SELECTION_POLICY_SORT_RANDOM = 3002, OSD_SELECTION_POLICY_SORT_VIVALDI = 3003, + OSD_SELECTION_POLICY_SORT_HOST_ROUND_ROBIN = 3004, OSD_SELECTION_POLICY_SORT_UUID = 3998, OSD_SELECTION_POLICY_SORT_REVERSE = 3999 }; diff --git a/cpp/generated/xtreemfs/MRC.pb.cc b/cpp/generated/xtreemfs/MRC.pb.cc index 7af2f25b5f706ea5a3e4afceb18886a42481efb3..10eef0e94a1cab82dc7e40066e87bbaeb82240f6 100644 --- a/cpp/generated/xtreemfs/MRC.pb.cc +++ b/cpp/generated/xtreemfs/MRC.pb.cc @@ -120,6 +120,10 @@ const ::google::protobuf::internal::GeneratedMessageReflection* const ::google::protobuf::Descriptor* xtreemfs_check_file_existsRequest_descriptor_ = NULL; const ::google::protobuf::internal::GeneratedMessageReflection* xtreemfs_check_file_existsRequest_reflection_ = NULL; +const ::google::protobuf::Descriptor* xtreemfs_check_file_existsResponse_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + xtreemfs_check_file_existsResponse_reflection_ = NULL; +const ::google::protobuf::EnumDescriptor* xtreemfs_check_file_existsResponse_FILE_STATE_descriptor_ = NULL; const ::google::protobuf::Descriptor* xtreemfs_dump_restore_databaseRequest_descriptor_ = NULL; const ::google::protobuf::internal::GeneratedMessageReflection* xtreemfs_dump_restore_databaseRequest_reflection_ = NULL; @@ -129,9 +133,6 @@ const ::google::protobuf::internal::GeneratedMessageReflection* const ::google::protobuf::Descriptor* xtreemfs_get_suitable_osdsResponse_descriptor_ = NULL; const ::google::protobuf::internal::GeneratedMessageReflection* xtreemfs_get_suitable_osdsResponse_reflection_ = NULL; -const ::google::protobuf::Descriptor* xtreemfs_check_file_existsResponse_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - xtreemfs_check_file_existsResponse_reflection_ = NULL; const ::google::protobuf::Descriptor* timestampResponse_descriptor_ = NULL; const ::google::protobuf::internal::GeneratedMessageReflection* timestampResponse_reflection_ = NULL; @@ -267,7 +268,7 @@ void protobuf_AssignDesc_xtreemfs_2fMRC_2eproto() { ::google::protobuf::MessageFactory::generated_factory(), sizeof(XAttr)); Volume_descriptor_ = file->message_type(4); - static const int Volume_offsets_[8] = { + static const int Volume_offsets_[9] = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Volume, access_control_policy_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Volume, default_striping_policy_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Volume, id_), @@ -276,6 +277,7 @@ void protobuf_AssignDesc_xtreemfs_2fMRC_2eproto() { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Volume, owner_group_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Volume, owner_user_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Volume, attrs_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Volume, quota_), }; Volume_reflection_ = new ::google::protobuf::internal::GeneratedMessageReflection( @@ -768,7 +770,24 @@ void protobuf_AssignDesc_xtreemfs_2fMRC_2eproto() { ::google::protobuf::DescriptorPool::generated_pool(), ::google::protobuf::MessageFactory::generated_factory(), sizeof(xtreemfs_check_file_existsRequest)); - xtreemfs_dump_restore_databaseRequest_descriptor_ = file->message_type(33); + xtreemfs_check_file_existsResponse_descriptor_ = file->message_type(33); + static const int xtreemfs_check_file_existsResponse_offsets_[2] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(xtreemfs_check_file_existsResponse, volume_exists_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(xtreemfs_check_file_existsResponse, file_states_), + }; + xtreemfs_check_file_existsResponse_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + xtreemfs_check_file_existsResponse_descriptor_, + xtreemfs_check_file_existsResponse::default_instance_, + xtreemfs_check_file_existsResponse_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(xtreemfs_check_file_existsResponse, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(xtreemfs_check_file_existsResponse, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(xtreemfs_check_file_existsResponse)); + xtreemfs_check_file_existsResponse_FILE_STATE_descriptor_ = xtreemfs_check_file_existsResponse_descriptor_->enum_type(0); + xtreemfs_dump_restore_databaseRequest_descriptor_ = file->message_type(34); static const int xtreemfs_dump_restore_databaseRequest_offsets_[1] = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(xtreemfs_dump_restore_databaseRequest, dump_file_), }; @@ -783,7 +802,7 @@ void protobuf_AssignDesc_xtreemfs_2fMRC_2eproto() { ::google::protobuf::DescriptorPool::generated_pool(), ::google::protobuf::MessageFactory::generated_factory(), sizeof(xtreemfs_dump_restore_databaseRequest)); - xtreemfs_get_suitable_osdsRequest_descriptor_ = file->message_type(34); + xtreemfs_get_suitable_osdsRequest_descriptor_ = file->message_type(35); static const int xtreemfs_get_suitable_osdsRequest_offsets_[4] = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(xtreemfs_get_suitable_osdsRequest, file_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(xtreemfs_get_suitable_osdsRequest, path_), @@ -801,7 +820,7 @@ void protobuf_AssignDesc_xtreemfs_2fMRC_2eproto() { ::google::protobuf::DescriptorPool::generated_pool(), ::google::protobuf::MessageFactory::generated_factory(), sizeof(xtreemfs_get_suitable_osdsRequest)); - xtreemfs_get_suitable_osdsResponse_descriptor_ = file->message_type(35); + xtreemfs_get_suitable_osdsResponse_descriptor_ = file->message_type(36); static const int xtreemfs_get_suitable_osdsResponse_offsets_[1] = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(xtreemfs_get_suitable_osdsResponse, osd_uuids_), }; @@ -816,21 +835,6 @@ void protobuf_AssignDesc_xtreemfs_2fMRC_2eproto() { ::google::protobuf::DescriptorPool::generated_pool(), ::google::protobuf::MessageFactory::generated_factory(), sizeof(xtreemfs_get_suitable_osdsResponse)); - xtreemfs_check_file_existsResponse_descriptor_ = file->message_type(36); - static const int xtreemfs_check_file_existsResponse_offsets_[1] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(xtreemfs_check_file_existsResponse, bitmap_), - }; - xtreemfs_check_file_existsResponse_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - xtreemfs_check_file_existsResponse_descriptor_, - xtreemfs_check_file_existsResponse::default_instance_, - xtreemfs_check_file_existsResponse_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(xtreemfs_check_file_existsResponse, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(xtreemfs_check_file_existsResponse, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(xtreemfs_check_file_existsResponse)); timestampResponse_descriptor_ = file->message_type(37); static const int timestampResponse_offsets_[1] = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(timestampResponse, timestamp_s_), @@ -1154,14 +1158,14 @@ void protobuf_RegisterTypes(const ::std::string&) { accessRequest_descriptor_, &accessRequest::default_instance()); ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( xtreemfs_check_file_existsRequest_descriptor_, &xtreemfs_check_file_existsRequest::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + xtreemfs_check_file_existsResponse_descriptor_, &xtreemfs_check_file_existsResponse::default_instance()); ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( xtreemfs_dump_restore_databaseRequest_descriptor_, &xtreemfs_dump_restore_databaseRequest::default_instance()); ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( xtreemfs_get_suitable_osdsRequest_descriptor_, &xtreemfs_get_suitable_osdsRequest::default_instance()); ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( xtreemfs_get_suitable_osdsResponse_descriptor_, &xtreemfs_get_suitable_osdsResponse::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - xtreemfs_check_file_existsResponse_descriptor_, &xtreemfs_check_file_existsResponse::default_instance()); ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( timestampResponse_descriptor_, ×tampResponse::default_instance()); ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( @@ -1263,14 +1267,14 @@ void protobuf_ShutdownFile_xtreemfs_2fMRC_2eproto() { delete accessRequest_reflection_; delete xtreemfs_check_file_existsRequest::default_instance_; delete xtreemfs_check_file_existsRequest_reflection_; + delete xtreemfs_check_file_existsResponse::default_instance_; + delete xtreemfs_check_file_existsResponse_reflection_; delete xtreemfs_dump_restore_databaseRequest::default_instance_; delete xtreemfs_dump_restore_databaseRequest_reflection_; delete xtreemfs_get_suitable_osdsRequest::default_instance_; delete xtreemfs_get_suitable_osdsRequest_reflection_; delete xtreemfs_get_suitable_osdsResponse::default_instance_; delete xtreemfs_get_suitable_osdsResponse_reflection_; - delete xtreemfs_check_file_existsResponse::default_instance_; - delete xtreemfs_check_file_existsResponse_reflection_; delete timestampResponse::default_instance_; delete timestampResponse_reflection_; delete stringMessage::default_instance_; @@ -1326,225 +1330,229 @@ void protobuf_AddDesc_xtreemfs_2fMRC_2eproto() { "treemfs.pbrpc.Stat\"C\n\020DirectoryEntries\022/" "\n\007entries\030\001 \003(\0132\036.xtreemfs.pbrpc.Directo" "ryEntry\"@\n\005XAttr\022\014\n\004name\030\001 \002(\t\022\r\n\005value\030" - "\002 \001(\t\022\032\n\022value_bytes_string\030\003 \001(\014\"\225\002\n\006Vo" + "\002 \001(\t\022\032\n\022value_bytes_string\030\003 \001(\014\"\244\002\n\006Vo" "lume\022F\n\025access_control_policy\030\001 \002(\0162\'.xt" "reemfs.pbrpc.AccessControlPolicyType\022\?\n\027" "default_striping_policy\030\002 \002(\0132\036.xtreemfs" ".pbrpc.StripingPolicy\022\n\n\002id\030\003 \002(\t\022\014\n\004mod" "e\030\004 \002(\007\022\014\n\004name\030\005 \002(\t\022\026\n\016owner_group_id\030" "\006 \002(\t\022\025\n\rowner_user_id\030\007 \002(\t\022+\n\005attrs\030\010 " - "\003(\0132\034.xtreemfs.pbrpc.KeyValuePair\"2\n\007Vol" - "umes\022\'\n\007volumes\030\001 \003(\0132\026.xtreemfs.pbrpc.V" - "olume\"\310\002\n\007StatVFS\022\r\n\005bsize\030\001 \002(\007\022\016\n\006bava" - "il\030\002 \002(\006\022\r\n\005bfree\030\r \001(\006\022\016\n\006blocks\030\003 \002(\006\022" - "\014\n\004fsid\030\004 \002(\t\022\017\n\007namemax\030\005 \002(\007\022F\n\025access" - "_control_policy\030\006 \002(\0162\'.xtreemfs.pbrpc.A" - "ccessControlPolicyType\022\?\n\027default_stripi" - "ng_policy\030\007 \002(\0132\036.xtreemfs.pbrpc.Stripin" - "gPolicy\022\014\n\004etag\030\010 \002(\006\022\014\n\004mode\030\t \002(\007\022\014\n\004n" - "ame\030\n \002(\t\022\026\n\016owner_group_id\030\013 \002(\t\022\025\n\rown" - "er_user_id\030\014 \002(\t\"i\n\017fsetattrRequest\022#\n\005s" - "tbuf\030\001 \002(\0132\024.xtreemfs.pbrpc.Stat\022\016\n\006to_s" - "et\030\002 \002(\007\022!\n\003cap\030\003 \002(\0132\024.xtreemfs.pbrpc.X" - "Cap\"G\n\016getattrRequest\022\023\n\013volume_name\030\001 \002" - "(\t\022\014\n\004path\030\002 \002(\t\022\022\n\nknown_etag\030\003 \002(\006\"6\n\017" - "getattrResponse\022#\n\005stbuf\030\001 \001(\0132\024.xtreemf" - "s.pbrpc.Stat\"B\n\017getxattrRequest\022\023\n\013volum" - "e_name\030\001 \002(\t\022\014\n\004path\030\002 \002(\t\022\014\n\004name\030\003 \002(\t" - "\"=\n\020getxattrResponse\022\r\n\005value\030\001 \002(\t\022\032\n\022v" - "alue_bytes_string\030\002 \001(\014\"J\n\013linkRequest\022\023" - "\n\013volume_name\030\001 \002(\t\022\023\n\013target_path\030\002 \002(\t" - "\022\021\n\tlink_path\030\003 \002(\t\"I\n\020listxattrRequest\022" - "\023\n\013volume_name\030\001 \002(\t\022\014\n\004path\030\002 \002(\t\022\022\n\nna" - "mes_only\030\003 \002(\010\":\n\021listxattrResponse\022%\n\006x" - "attrs\030\001 \003(\0132\025.xtreemfs.pbrpc.XAttr\"\?\n\014mk" - "dirRequest\022\023\n\013volume_name\030\001 \002(\t\022\014\n\004path\030" - "\002 \002(\t\022\014\n\004mode\030\003 \002(\007\"\232\001\n\013openRequest\022\023\n\013v" - "olume_name\030\001 \002(\t\022\014\n\004path\030\002 \002(\t\022\r\n\005flags\030" - "\003 \002(\007\022\014\n\004mode\030\004 \002(\007\022\022\n\nattributes\030\005 \002(\007\022" - "7\n\013coordinates\030\006 \001(\0132\".xtreemfs.pbrpc.Vi" - "valdiCoordinates\"S\n\014openResponse\022.\n\005cred" - "s\030\001 \002(\0132\037.xtreemfs.pbrpc.FileCredentials" - "\022\023\n\013timestamp_s\030\002 \002(\007\"\250\001\n\016readdirRequest" - "\022\023\n\013volume_name\030\001 \002(\t\022\014\n\004path\030\002 \002(\t\022\022\n\nk" - "nown_etag\030\003 \002(\006\022%\n\035limit_directory_entri" - "es_count\030\004 \002(\007\022\022\n\nnames_only\030\005 \002(\010\022$\n\034se" - "en_directory_entries_count\030\006 \002(\006\"4\n\017read" - "linkRequest\022\023\n\013volume_name\030\001 \002(\t\022\014\n\004path" - "\030\002 \002(\t\",\n\020readlinkResponse\022\030\n\020link_targe" - "t_path\030\001 \003(\t\"E\n\022removexattrRequest\022\023\n\013vo" - "lume_name\030\001 \002(\t\022\014\n\004path\030\002 \002(\t\022\014\n\004name\030\003 " - "\002(\t\"N\n\rrenameRequest\022\023\n\013volume_name\030\001 \002(" - "\t\022\023\n\013source_path\030\002 \002(\t\022\023\n\013target_path\030\003 " - "\002(\t\"U\n\016renameResponse\022\023\n\013timestamp_s\030\001 \002" - "(\007\022.\n\005creds\030\002 \001(\0132\037.xtreemfs.pbrpc.FileC" - "redentials\"1\n\014rmdirRequest\022\023\n\013volume_nam" - "e\030\001 \002(\t\022\014\n\004path\030\002 \002(\t\"h\n\016setattrRequest\022" - "\023\n\013volume_name\030\001 \002(\t\022\014\n\004path\030\002 \002(\t\022#\n\005st" - "buf\030\003 \002(\0132\024.xtreemfs.pbrpc.Stat\022\016\n\006to_se" - "t\030\004 \002(\007\"|\n\017setxattrRequest\022\023\n\013volume_nam" - "e\030\001 \002(\t\022\014\n\004path\030\002 \002(\t\022\014\n\004name\030\003 \002(\t\022\r\n\005v" - "alue\030\004 \002(\t\022\032\n\022value_bytes_string\030\006 \001(\014\022\r" - "\n\005flags\030\005 \002(\007\"9\n\016statvfsRequest\022\023\n\013volum" - "e_name\030\001 \002(\t\022\022\n\nknown_etag\030\005 \002(\006\"M\n\016syml" - "inkRequest\022\023\n\013volume_name\030\001 \002(\t\022\023\n\013targe" - "t_path\030\002 \002(\t\022\021\n\tlink_path\030\003 \002(\t\"2\n\runlin" - "kRequest\022\023\n\013volume_name\030\001 \002(\t\022\014\n\004path\030\002 " - "\002(\t\"U\n\016unlinkResponse\022\023\n\013timestamp_s\030\001 \002" - "(\007\022.\n\005creds\030\002 \001(\0132\037.xtreemfs.pbrpc.FileC" - "redentials\"A\n\raccessRequest\022\023\n\013volume_na" - "me\030\001 \002(\t\022\014\n\004path\030\002 \002(\t\022\r\n\005flags\030\003 \002(\007\"Z\n" - "!xtreemfs_check_file_existsRequest\022\021\n\tvo" - "lume_id\030\001 \002(\t\022\020\n\010file_ids\030\002 \003(\t\022\020\n\010osd_u" - "uid\030\003 \002(\t\":\n%xtreemfs_dump_restore_datab" - "aseRequest\022\021\n\tdump_file\030\001 \002(\t\"i\n!xtreemf" - "s_get_suitable_osdsRequest\022\017\n\007file_id\030\001 " - "\001(\t\022\014\n\004path\030\003 \001(\t\022\023\n\013volume_name\030\004 \001(\t\022\020" - "\n\010num_osds\030\002 \002(\007\"7\n\"xtreemfs_get_suitabl" - "e_osdsResponse\022\021\n\tosd_uuids\030\001 \003(\t\"4\n\"xtr" - "eemfs_check_file_existsResponse\022\016\n\006bitma" - "p\030\001 \002(\t\"(\n\021timestampResponse\022\023\n\013timestam" - "p_s\030\001 \002(\007\"!\n\rstringMessage\022\020\n\010a_string\030\001" - " \002(\t\"\'\n\027xtreemfs_listdirRequest\022\014\n\004path\030" - "\001 \002(\t\")\n\030xtreemfs_listdirResponse\022\r\n\005nam" - "es\030\001 \003(\t\"\177\n\033xtreemfs_replica_addRequest\022" - "\017\n\007file_id\030\001 \001(\t\022\014\n\004path\030\003 \001(\t\022\023\n\013volume" - "_name\030\004 \001(\t\022,\n\013new_replica\030\002 \002(\0132\027.xtree" - "mfs.pbrpc.Replica\"R\n\034xtreemfs_replica_li" - "stRequest\022\017\n\007file_id\030\001 \001(\t\022\014\n\004path\030\002 \001(\t" - "\022\023\n\013volume_name\030\003 \001(\t\"f\n\036xtreemfs_replic" - "a_removeRequest\022\017\n\007file_id\030\001 \001(\t\022\014\n\004path" - "\030\003 \001(\t\022\023\n\013volume_name\030\004 \001(\t\022\020\n\010osd_uuid\030" - "\002 \002(\t\"|\n\034xtreemfs_restore_fileRequest\022\021\n" - "\tfile_path\030\001 \002(\t\022\017\n\007file_id\030\002 \002(\t\022\021\n\tfil" - "e_size\030\003 \002(\006\022\020\n\010osd_uuid\030\004 \002(\t\022\023\n\013stripe" - "_size\030\005 \002(\007\",\n\025xtreemfs_rmvolRequest\022\023\n\013" - "volume_name\030\001 \002(\t\"\321\001\n xtreemfs_update_fi" - "le_sizeRequest\022\"\n\004xcap\030\001 \002(\0132\024.xtreemfs." - "pbrpc.XCap\022<\n\022osd_write_response\030\002 \002(\0132 " - ".xtreemfs.pbrpc.OSDWriteResponse\022\022\n\nclos" - "e_file\030\003 \001(\010\0227\n\013coordinates\030\004 \001(\0132\".xtre" - "emfs.pbrpc.VivaldiCoordinates\"S\n)xtreemf" - "s_set_replica_update_policyRequest\022\017\n\007fi" - "le_id\030\001 \002(\t\022\025\n\rupdate_policy\030\002 \002(\t\"G\n*xt" - "reemfs_set_replica_update_policyResponse" - "\022\031\n\021old_update_policy\030\001 \002(\t\"E\n#xtreemfs_" - "set_read_only_xattrRequest\022\017\n\007file_id\030\001 " - "\002(\t\022\r\n\005value\030\002 \002(\010\"7\n$xtreemfs_set_read_" - "only_xattrResponse\022\017\n\007was_set\030\001 \002(\010\"7\n$x" - "treemfs_get_file_credentialsRequest\022\017\n\007f" - "ile_id\030\001 \002(\t*\242\001\n\010Setattrs\022\020\n\014SETATTR_MOD" - "E\020\001\022\017\n\013SETATTR_UID\020\002\022\017\n\013SETATTR_GID\020\004\022\020\n" - "\014SETATTR_SIZE\020\010\022\021\n\rSETATTR_ATIME\020\020\022\021\n\rSE" - "TATTR_MTIME\020 \022\021\n\rSETATTR_CTIME\020@\022\027\n\022SETA" - "TTR_ATTRIBUTES\020\200\001*>\n\013XATTR_FLAGS\022\026\n\022XATT" - "R_FLAGS_CREATE\020\001\022\027\n\023XATTR_FLAGS_REPLACE\020" - "\002*j\n\014ACCESS_FLAGS\022\025\n\021ACCESS_FLAGS_F_OK\020\000" - "\022\025\n\021ACCESS_FLAGS_X_OK\020\001\022\025\n\021ACCESS_FLAGS_" - "W_OK\020\002\022\025\n\021ACCESS_FLAGS_R_OK\020\0042\354\037\n\nMRCSer" - "vice\022S\n\010fsetattr\022\037.xtreemfs.pbrpc.fsetat" - "trRequest\032\035.xtreemfs.pbrpc.emptyResponse" - "\"\007\215\265\030\002\000\000\000\022@\n\tftruncate\022\024.xtreemfs.pbrpc." - "XCap\032\024.xtreemfs.pbrpc.XCap\"\007\215\265\030\003\000\000\000\022S\n\007g" - "etattr\022\036.xtreemfs.pbrpc.getattrRequest\032\037" - ".xtreemfs.pbrpc.getattrResponse\"\007\215\265\030\004\000\000\000" - "\022V\n\010getxattr\022\037.xtreemfs.pbrpc.getxattrRe" - "quest\032 .xtreemfs.pbrpc.getxattrResponse\"" - "\007\215\265\030\005\000\000\000\022O\n\004link\022\033.xtreemfs.pbrpc.linkRe" - "quest\032!.xtreemfs.pbrpc.timestampResponse" - "\"\007\215\265\030\006\000\000\000\022Y\n\tlistxattr\022 .xtreemfs.pbrpc." - "listxattrRequest\032!.xtreemfs.pbrpc.listxa" - "ttrResponse\"\007\215\265\030\007\000\000\000\022Q\n\005mkdir\022\034.xtreemfs" - ".pbrpc.mkdirRequest\032!.xtreemfs.pbrpc.tim" - "estampResponse\"\007\215\265\030\010\000\000\000\022J\n\004open\022\033.xtreem" - "fs.pbrpc.openRequest\032\034.xtreemfs.pbrpc.op" - "enResponse\"\007\215\265\030\t\000\000\000\022T\n\007readdir\022\036.xtreemf" - "s.pbrpc.readdirRequest\032 .xtreemfs.pbrpc." - "DirectoryEntries\"\007\215\265\030\n\000\000\000\022V\n\010readlink\022\037." - "xtreemfs.pbrpc.readlinkRequest\032 .xtreemf" - "s.pbrpc.readlinkResponse\"\007\215\265\030\013\000\000\000\022]\n\013rem" - "ovexattr\022\".xtreemfs.pbrpc.removexattrReq" - "uest\032!.xtreemfs.pbrpc.timestampResponse\"" - "\007\215\265\030\014\000\000\000\022P\n\006rename\022\035.xtreemfs.pbrpc.rena" - "meRequest\032\036.xtreemfs.pbrpc.renameRespons" - "e\"\007\215\265\030\r\000\000\000\022Q\n\005rmdir\022\034.xtreemfs.pbrpc.rmd" - "irRequest\032!.xtreemfs.pbrpc.timestampResp" - "onse\"\007\215\265\030\016\000\000\000\022U\n\007setattr\022\036.xtreemfs.pbrp" - "c.setattrRequest\032!.xtreemfs.pbrpc.timest" - "ampResponse\"\007\215\265\030\017\000\000\000\022W\n\010setxattr\022\037.xtree" - "mfs.pbrpc.setxattrRequest\032!.xtreemfs.pbr" - "pc.timestampResponse\"\007\215\265\030\020\000\000\000\022K\n\007statvfs" - "\022\036.xtreemfs.pbrpc.statvfsRequest\032\027.xtree" - "mfs.pbrpc.StatVFS\"\007\215\265\030\021\000\000\000\022U\n\007symlink\022\036." - "xtreemfs.pbrpc.symlinkRequest\032!.xtreemfs" - ".pbrpc.timestampResponse\"\007\215\265\030\022\000\000\000\022P\n\006unl" - "ink\022\035.xtreemfs.pbrpc.unlinkRequest\032\036.xtr" - "eemfs.pbrpc.unlinkResponse\"\007\215\265\030\023\000\000\000\022O\n\006a" - "ccess\022\035.xtreemfs.pbrpc.accessRequest\032\035.x" - "treemfs.pbrpc.emptyResponse\"\007\215\265\030\024\000\000\000\022[\n\023" - "xtreemfs_checkpoint\022\034.xtreemfs.pbrpc.emp" - "tyRequest\032\035.xtreemfs.pbrpc.emptyResponse" - "\"\007\215\265\030\036\000\000\000\022\214\001\n\032xtreemfs_check_file_exists" - "\0221.xtreemfs.pbrpc.xtreemfs_check_file_ex" - "istsRequest\0322.xtreemfs.pbrpc.xtreemfs_ch" - "eck_file_existsResponse\"\007\215\265\030\037\000\000\000\022w\n\026xtre" - "emfs_dump_database\0225.xtreemfs.pbrpc.xtre" - "emfs_dump_restore_databaseRequest\032\035.xtre" - "emfs.pbrpc.emptyResponse\"\007\215\265\030 \000\000\000\022\214\001\n\032xt" - "reemfs_get_suitable_osds\0221.xtreemfs.pbrp" - "c.xtreemfs_get_suitable_osdsRequest\0322.xt" - "reemfs.pbrpc.xtreemfs_get_suitable_osdsR" - "esponse\"\007\215\265\030!\000\000\000\022`\n\027xtreemfs_internal_de" - "bug\022\035.xtreemfs.pbrpc.stringMessage\032\035.xtr" - "eemfs.pbrpc.stringMessage\"\007\215\265\030\"\000\000\000\022n\n\020xt" - "reemfs_listdir\022\'.xtreemfs.pbrpc.xtreemfs" - "_listdirRequest\032(.xtreemfs.pbrpc.xtreemf" - "s_listdirResponse\"\007\215\265\030#\000\000\000\022P\n\016xtreemfs_l" - "svol\022\034.xtreemfs.pbrpc.emptyRequest\032\027.xtr" - "eemfs.pbrpc.Volumes\"\007\215\265\030$\000\000\000\022P\n\016xtreemfs" - "_mkvol\022\026.xtreemfs.pbrpc.Volume\032\035.xtreemf" - "s.pbrpc.emptyResponse\"\007\215\265\030/\000\000\000\022P\n\031xtreem" - "fs_renew_capability\022\024.xtreemfs.pbrpc.XCa" - "p\032\024.xtreemfs.pbrpc.XCap\"\007\215\265\030%\000\000\000\022f\n\036xtre" - "emfs_replication_to_master\022\034.xtreemfs.pb" - "rpc.emptyRequest\032\035.xtreemfs.pbrpc.emptyR" - "esponse\"\007\215\265\030&\000\000\000\022k\n\024xtreemfs_replica_add" - "\022+.xtreemfs.pbrpc.xtreemfs_replica_addRe" + "\003(\0132\034.xtreemfs.pbrpc.KeyValuePair\022\r\n\005quo" + "ta\030\t \001(\006\"2\n\007Volumes\022\'\n\007volumes\030\001 \003(\0132\026.x" + "treemfs.pbrpc.Volume\"\310\002\n\007StatVFS\022\r\n\005bsiz" + "e\030\001 \002(\007\022\016\n\006bavail\030\002 \002(\006\022\r\n\005bfree\030\r \001(\006\022\016" + "\n\006blocks\030\003 \002(\006\022\014\n\004fsid\030\004 \002(\t\022\017\n\007namemax\030" + "\005 \002(\007\022F\n\025access_control_policy\030\006 \002(\0162\'.x" + "treemfs.pbrpc.AccessControlPolicyType\022\?\n" + "\027default_striping_policy\030\007 \002(\0132\036.xtreemf" + "s.pbrpc.StripingPolicy\022\014\n\004etag\030\010 \002(\006\022\014\n\004" + "mode\030\t \002(\007\022\014\n\004name\030\n \002(\t\022\026\n\016owner_group_" + "id\030\013 \002(\t\022\025\n\rowner_user_id\030\014 \002(\t\"i\n\017fseta" + "ttrRequest\022#\n\005stbuf\030\001 \002(\0132\024.xtreemfs.pbr" + "pc.Stat\022\016\n\006to_set\030\002 \002(\007\022!\n\003cap\030\003 \002(\0132\024.x" + "treemfs.pbrpc.XCap\"G\n\016getattrRequest\022\023\n\013" + "volume_name\030\001 \002(\t\022\014\n\004path\030\002 \002(\t\022\022\n\nknown" + "_etag\030\003 \002(\006\"6\n\017getattrResponse\022#\n\005stbuf\030" + "\001 \001(\0132\024.xtreemfs.pbrpc.Stat\"B\n\017getxattrR" + "equest\022\023\n\013volume_name\030\001 \002(\t\022\014\n\004path\030\002 \002(" + "\t\022\014\n\004name\030\003 \002(\t\"=\n\020getxattrResponse\022\r\n\005v" + "alue\030\001 \002(\t\022\032\n\022value_bytes_string\030\002 \001(\014\"J" + "\n\013linkRequest\022\023\n\013volume_name\030\001 \002(\t\022\023\n\013ta" + "rget_path\030\002 \002(\t\022\021\n\tlink_path\030\003 \002(\t\"I\n\020li" + "stxattrRequest\022\023\n\013volume_name\030\001 \002(\t\022\014\n\004p" + "ath\030\002 \002(\t\022\022\n\nnames_only\030\003 \002(\010\":\n\021listxat" + "trResponse\022%\n\006xattrs\030\001 \003(\0132\025.xtreemfs.pb" + "rpc.XAttr\"\?\n\014mkdirRequest\022\023\n\013volume_name" + "\030\001 \002(\t\022\014\n\004path\030\002 \002(\t\022\014\n\004mode\030\003 \002(\007\"\232\001\n\013o" + "penRequest\022\023\n\013volume_name\030\001 \002(\t\022\014\n\004path\030" + "\002 \002(\t\022\r\n\005flags\030\003 \002(\007\022\014\n\004mode\030\004 \002(\007\022\022\n\nat" + "tributes\030\005 \002(\007\0227\n\013coordinates\030\006 \001(\0132\".xt" + "reemfs.pbrpc.VivaldiCoordinates\"S\n\014openR" + "esponse\022.\n\005creds\030\001 \002(\0132\037.xtreemfs.pbrpc." + "FileCredentials\022\023\n\013timestamp_s\030\002 \002(\007\"\250\001\n" + "\016readdirRequest\022\023\n\013volume_name\030\001 \002(\t\022\014\n\004" + "path\030\002 \002(\t\022\022\n\nknown_etag\030\003 \002(\006\022%\n\035limit_" + "directory_entries_count\030\004 \002(\007\022\022\n\nnames_o" + "nly\030\005 \002(\010\022$\n\034seen_directory_entries_coun" + "t\030\006 \002(\006\"4\n\017readlinkRequest\022\023\n\013volume_nam" + "e\030\001 \002(\t\022\014\n\004path\030\002 \002(\t\",\n\020readlinkRespons" + "e\022\030\n\020link_target_path\030\001 \003(\t\"E\n\022removexat" + "trRequest\022\023\n\013volume_name\030\001 \002(\t\022\014\n\004path\030\002" + " \002(\t\022\014\n\004name\030\003 \002(\t\"N\n\rrenameRequest\022\023\n\013v" + "olume_name\030\001 \002(\t\022\023\n\013source_path\030\002 \002(\t\022\023\n" + "\013target_path\030\003 \002(\t\"U\n\016renameResponse\022\023\n\013" + "timestamp_s\030\001 \002(\007\022.\n\005creds\030\002 \001(\0132\037.xtree" + "mfs.pbrpc.FileCredentials\"1\n\014rmdirReques" + "t\022\023\n\013volume_name\030\001 \002(\t\022\014\n\004path\030\002 \002(\t\"h\n\016" + "setattrRequest\022\023\n\013volume_name\030\001 \002(\t\022\014\n\004p" + "ath\030\002 \002(\t\022#\n\005stbuf\030\003 \002(\0132\024.xtreemfs.pbrp" + "c.Stat\022\016\n\006to_set\030\004 \002(\007\"|\n\017setxattrReques" + "t\022\023\n\013volume_name\030\001 \002(\t\022\014\n\004path\030\002 \002(\t\022\014\n\004" + "name\030\003 \002(\t\022\r\n\005value\030\004 \002(\t\022\032\n\022value_bytes" + "_string\030\006 \001(\014\022\r\n\005flags\030\005 \002(\007\"9\n\016statvfsR" + "equest\022\023\n\013volume_name\030\001 \002(\t\022\022\n\nknown_eta" + "g\030\005 \002(\006\"M\n\016symlinkRequest\022\023\n\013volume_name" + "\030\001 \002(\t\022\023\n\013target_path\030\002 \002(\t\022\021\n\tlink_path" + "\030\003 \002(\t\"2\n\runlinkRequest\022\023\n\013volume_name\030\001" + " \002(\t\022\014\n\004path\030\002 \002(\t\"U\n\016unlinkResponse\022\023\n\013" + "timestamp_s\030\001 \002(\007\022.\n\005creds\030\002 \001(\0132\037.xtree" + "mfs.pbrpc.FileCredentials\"A\n\raccessReque" + "st\022\023\n\013volume_name\030\001 \002(\t\022\014\n\004path\030\002 \002(\t\022\r\n" + "\005flags\030\003 \002(\007\"Z\n!xtreemfs_check_file_exis" + "tsRequest\022\021\n\tvolume_id\030\001 \002(\t\022\020\n\010file_ids" + "\030\002 \003(\t\022\020\n\010osd_uuid\030\003 \002(\t\"\315\001\n\"xtreemfs_ch" + "eck_file_existsResponse\022\025\n\rvolume_exists" + "\030\001 \002(\010\022V\n\013file_states\030\002 \003(\0162=.xtreemfs.p" + "brpc.xtreemfs_check_file_existsResponse." + "FILE_STATEB\002\020\001\"8\n\nFILE_STATE\022\013\n\007DELETED\020" + "\000\022\016\n\nREGISTERED\020\001\022\r\n\tABANDONED\020\002\":\n%xtre" + "emfs_dump_restore_databaseRequest\022\021\n\tdum" + "p_file\030\001 \002(\t\"i\n!xtreemfs_get_suitable_os" + "dsRequest\022\017\n\007file_id\030\001 \001(\t\022\014\n\004path\030\003 \001(\t" + "\022\023\n\013volume_name\030\004 \001(\t\022\020\n\010num_osds\030\002 \002(\007\"" + "7\n\"xtreemfs_get_suitable_osdsResponse\022\021\n" + "\tosd_uuids\030\001 \003(\t\"(\n\021timestampResponse\022\023\n" + "\013timestamp_s\030\001 \002(\007\"!\n\rstringMessage\022\020\n\010a" + "_string\030\001 \002(\t\"\'\n\027xtreemfs_listdirRequest" + "\022\014\n\004path\030\001 \002(\t\")\n\030xtreemfs_listdirRespon" + "se\022\r\n\005names\030\001 \003(\t\"\177\n\033xtreemfs_replica_ad" + "dRequest\022\017\n\007file_id\030\001 \001(\t\022\014\n\004path\030\003 \001(\t\022" + "\023\n\013volume_name\030\004 \001(\t\022,\n\013new_replica\030\002 \002(" + "\0132\027.xtreemfs.pbrpc.Replica\"R\n\034xtreemfs_r" + "eplica_listRequest\022\017\n\007file_id\030\001 \001(\t\022\014\n\004p" + "ath\030\002 \001(\t\022\023\n\013volume_name\030\003 \001(\t\"f\n\036xtreem" + "fs_replica_removeRequest\022\017\n\007file_id\030\001 \001(" + "\t\022\014\n\004path\030\003 \001(\t\022\023\n\013volume_name\030\004 \001(\t\022\020\n\010" + "osd_uuid\030\002 \002(\t\"|\n\034xtreemfs_restore_fileR" + "equest\022\021\n\tfile_path\030\001 \002(\t\022\017\n\007file_id\030\002 \002" + "(\t\022\021\n\tfile_size\030\003 \002(\006\022\020\n\010osd_uuid\030\004 \002(\t\022" + "\023\n\013stripe_size\030\005 \002(\007\",\n\025xtreemfs_rmvolRe" + "quest\022\023\n\013volume_name\030\001 \002(\t\"\321\001\n xtreemfs_" + "update_file_sizeRequest\022\"\n\004xcap\030\001 \002(\0132\024." + "xtreemfs.pbrpc.XCap\022<\n\022osd_write_respons" + "e\030\002 \002(\0132 .xtreemfs.pbrpc.OSDWriteRespons" + "e\022\022\n\nclose_file\030\003 \001(\010\0227\n\013coordinates\030\004 \001" + "(\0132\".xtreemfs.pbrpc.VivaldiCoordinates\"S" + "\n)xtreemfs_set_replica_update_policyRequ" + "est\022\017\n\007file_id\030\001 \002(\t\022\025\n\rupdate_policy\030\002 " + "\002(\t\"G\n*xtreemfs_set_replica_update_polic" + "yResponse\022\031\n\021old_update_policy\030\001 \002(\t\"E\n#" + "xtreemfs_set_read_only_xattrRequest\022\017\n\007f" + "ile_id\030\001 \002(\t\022\r\n\005value\030\002 \002(\010\"7\n$xtreemfs_" + "set_read_only_xattrResponse\022\017\n\007was_set\030\001" + " \002(\010\"7\n$xtreemfs_get_file_credentialsReq" + "uest\022\017\n\007file_id\030\001 \002(\t*\242\001\n\010Setattrs\022\020\n\014SE" + "TATTR_MODE\020\001\022\017\n\013SETATTR_UID\020\002\022\017\n\013SETATTR" + "_GID\020\004\022\020\n\014SETATTR_SIZE\020\010\022\021\n\rSETATTR_ATIM" + "E\020\020\022\021\n\rSETATTR_MTIME\020 \022\021\n\rSETATTR_CTIME\020" + "@\022\027\n\022SETATTR_ATTRIBUTES\020\200\001*>\n\013XATTR_FLAG" + "S\022\026\n\022XATTR_FLAGS_CREATE\020\001\022\027\n\023XATTR_FLAGS" + "_REPLACE\020\002*j\n\014ACCESS_FLAGS\022\025\n\021ACCESS_FLA" + "GS_F_OK\020\000\022\025\n\021ACCESS_FLAGS_X_OK\020\001\022\025\n\021ACCE" + "SS_FLAGS_W_OK\020\002\022\025\n\021ACCESS_FLAGS_R_OK\020\0042\354" + "\037\n\nMRCService\022S\n\010fsetattr\022\037.xtreemfs.pbr" + "pc.fsetattrRequest\032\035.xtreemfs.pbrpc.empt" + "yResponse\"\007\215\265\030\002\000\000\000\022@\n\tftruncate\022\024.xtreem" + "fs.pbrpc.XCap\032\024.xtreemfs.pbrpc.XCap\"\007\215\265\030" + "\003\000\000\000\022S\n\007getattr\022\036.xtreemfs.pbrpc.getattr" + "Request\032\037.xtreemfs.pbrpc.getattrResponse" + "\"\007\215\265\030\004\000\000\000\022V\n\010getxattr\022\037.xtreemfs.pbrpc.g" + "etxattrRequest\032 .xtreemfs.pbrpc.getxattr" + "Response\"\007\215\265\030\005\000\000\000\022O\n\004link\022\033.xtreemfs.pbr" + "pc.linkRequest\032!.xtreemfs.pbrpc.timestam" + "pResponse\"\007\215\265\030\006\000\000\000\022Y\n\tlistxattr\022 .xtreem" + "fs.pbrpc.listxattrRequest\032!.xtreemfs.pbr" + "pc.listxattrResponse\"\007\215\265\030\007\000\000\000\022Q\n\005mkdir\022\034" + ".xtreemfs.pbrpc.mkdirRequest\032!.xtreemfs." + "pbrpc.timestampResponse\"\007\215\265\030\010\000\000\000\022J\n\004open" + "\022\033.xtreemfs.pbrpc.openRequest\032\034.xtreemfs" + ".pbrpc.openResponse\"\007\215\265\030\t\000\000\000\022T\n\007readdir\022" + "\036.xtreemfs.pbrpc.readdirRequest\032 .xtreem" + "fs.pbrpc.DirectoryEntries\"\007\215\265\030\n\000\000\000\022V\n\010re" + "adlink\022\037.xtreemfs.pbrpc.readlinkRequest\032" + " .xtreemfs.pbrpc.readlinkResponse\"\007\215\265\030\013\000" + "\000\000\022]\n\013removexattr\022\".xtreemfs.pbrpc.remov" + "exattrRequest\032!.xtreemfs.pbrpc.timestamp" + "Response\"\007\215\265\030\014\000\000\000\022P\n\006rename\022\035.xtreemfs.p" + "brpc.renameRequest\032\036.xtreemfs.pbrpc.rena" + "meResponse\"\007\215\265\030\r\000\000\000\022Q\n\005rmdir\022\034.xtreemfs." + "pbrpc.rmdirRequest\032!.xtreemfs.pbrpc.time" + "stampResponse\"\007\215\265\030\016\000\000\000\022U\n\007setattr\022\036.xtre" + "emfs.pbrpc.setattrRequest\032!.xtreemfs.pbr" + "pc.timestampResponse\"\007\215\265\030\017\000\000\000\022W\n\010setxatt" + "r\022\037.xtreemfs.pbrpc.setxattrRequest\032!.xtr" + "eemfs.pbrpc.timestampResponse\"\007\215\265\030\020\000\000\000\022K" + "\n\007statvfs\022\036.xtreemfs.pbrpc.statvfsReques" + "t\032\027.xtreemfs.pbrpc.StatVFS\"\007\215\265\030\021\000\000\000\022U\n\007s" + "ymlink\022\036.xtreemfs.pbrpc.symlinkRequest\032!" + ".xtreemfs.pbrpc.timestampResponse\"\007\215\265\030\022\000" + "\000\000\022P\n\006unlink\022\035.xtreemfs.pbrpc.unlinkRequ" + "est\032\036.xtreemfs.pbrpc.unlinkResponse\"\007\215\265\030" + "\023\000\000\000\022O\n\006access\022\035.xtreemfs.pbrpc.accessRe" "quest\032\035.xtreemfs.pbrpc.emptyResponse\"\007\215\265" - "\030\'\000\000\000\022h\n\025xtreemfs_replica_list\022,.xtreemf" - "s.pbrpc.xtreemfs_replica_listRequest\032\030.x" - "treemfs.pbrpc.Replicas\"\007\215\265\030(\000\000\000\022s\n\027xtree" - "mfs_replica_remove\022..xtreemfs.pbrpc.xtre" - "emfs_replica_removeRequest\032\037.xtreemfs.pb" - "rpc.FileCredentials\"\007\215\265\030)\000\000\000\022z\n\031xtreemfs" - "_restore_database\0225.xtreemfs.pbrpc.xtree" - "mfs_dump_restore_databaseRequest\032\035.xtree" - "mfs.pbrpc.emptyResponse\"\007\215\265\030*\000\000\000\022m\n\025xtre" - "emfs_restore_file\022,.xtreemfs.pbrpc.xtree" - "mfs_restore_fileRequest\032\035.xtreemfs.pbrpc" - ".emptyResponse\"\007\215\265\030+\000\000\000\022_\n\016xtreemfs_rmvo" - "l\022%.xtreemfs.pbrpc.xtreemfs_rmvolRequest" - "\032\035.xtreemfs.pbrpc.emptyResponse\"\007\215\265\030,\000\000\000" - "\022Y\n\021xtreemfs_shutdown\022\034.xtreemfs.pbrpc.e" - "mptyRequest\032\035.xtreemfs.pbrpc.emptyRespon" - "se\"\007\215\265\030-\000\000\000\022y\n\031xtreemfs_update_file_size" - "\0220.xtreemfs.pbrpc.xtreemfs_update_file_s" - "izeRequest\032!.xtreemfs.pbrpc.timestampRes" - "ponse\"\007\215\265\030.\000\000\000\022\244\001\n\"xtreemfs_set_replica_" - "update_policy\0229.xtreemfs.pbrpc.xtreemfs_" - "set_replica_update_policyRequest\032:.xtree" - "mfs.pbrpc.xtreemfs_set_replica_update_po" - "licyResponse\"\007\215\265\0300\000\000\000\022\222\001\n\034xtreemfs_set_r" - "ead_only_xattr\0223.xtreemfs.pbrpc.xtreemfs" - "_set_read_only_xattrRequest\0324.xtreemfs.p" - "brpc.xtreemfs_set_read_only_xattrRespons" - "e\"\007\215\265\0301\000\000\000\022\177\n\035xtreemfs_get_file_credenti" - "als\0224.xtreemfs.pbrpc.xtreemfs_get_file_c" - "redentialsRequest\032\037.xtreemfs.pbrpc.FileC" - "redentials\"\007\215\265\0302\000\000\000\022N\n\024xtreemfs_get_xloc" - "set\022\024.xtreemfs.pbrpc.XCap\032\027.xtreemfs.pbr" - "pc.XLocSet\"\007\215\265\0303\000\000\000\032\007\225\265\030!N\000\000B(\n&org.xtre" - "emfs.pbrpc.generatedinterfaces", 9270); + "\030\024\000\000\000\022[\n\023xtreemfs_checkpoint\022\034.xtreemfs." + "pbrpc.emptyRequest\032\035.xtreemfs.pbrpc.empt" + "yResponse\"\007\215\265\030\036\000\000\000\022\214\001\n\032xtreemfs_check_fi" + "le_exists\0221.xtreemfs.pbrpc.xtreemfs_chec" + "k_file_existsRequest\0322.xtreemfs.pbrpc.xt" + "reemfs_check_file_existsResponse\"\007\215\265\030\037\000\000" + "\000\022w\n\026xtreemfs_dump_database\0225.xtreemfs.p" + "brpc.xtreemfs_dump_restore_databaseReque" + "st\032\035.xtreemfs.pbrpc.emptyResponse\"\007\215\265\030 \000" + "\000\000\022\214\001\n\032xtreemfs_get_suitable_osds\0221.xtre" + "emfs.pbrpc.xtreemfs_get_suitable_osdsReq" + "uest\0322.xtreemfs.pbrpc.xtreemfs_get_suita" + "ble_osdsResponse\"\007\215\265\030!\000\000\000\022`\n\027xtreemfs_in" + "ternal_debug\022\035.xtreemfs.pbrpc.stringMess" + "age\032\035.xtreemfs.pbrpc.stringMessage\"\007\215\265\030\"" + "\000\000\000\022n\n\020xtreemfs_listdir\022\'.xtreemfs.pbrpc" + ".xtreemfs_listdirRequest\032(.xtreemfs.pbrp" + "c.xtreemfs_listdirResponse\"\007\215\265\030#\000\000\000\022P\n\016x" + "treemfs_lsvol\022\034.xtreemfs.pbrpc.emptyRequ" + "est\032\027.xtreemfs.pbrpc.Volumes\"\007\215\265\030$\000\000\000\022P\n" + "\016xtreemfs_mkvol\022\026.xtreemfs.pbrpc.Volume\032" + "\035.xtreemfs.pbrpc.emptyResponse\"\007\215\265\030/\000\000\000\022" + "P\n\031xtreemfs_renew_capability\022\024.xtreemfs." + "pbrpc.XCap\032\024.xtreemfs.pbrpc.XCap\"\007\215\265\030%\000\000" + "\000\022f\n\036xtreemfs_replication_to_master\022\034.xt" + "reemfs.pbrpc.emptyRequest\032\035.xtreemfs.pbr" + "pc.emptyResponse\"\007\215\265\030&\000\000\000\022k\n\024xtreemfs_re" + "plica_add\022+.xtreemfs.pbrpc.xtreemfs_repl" + "ica_addRequest\032\035.xtreemfs.pbrpc.emptyRes" + "ponse\"\007\215\265\030\'\000\000\000\022h\n\025xtreemfs_replica_list\022" + ",.xtreemfs.pbrpc.xtreemfs_replica_listRe" + "quest\032\030.xtreemfs.pbrpc.Replicas\"\007\215\265\030(\000\000\000" + "\022s\n\027xtreemfs_replica_remove\022..xtreemfs.p" + "brpc.xtreemfs_replica_removeRequest\032\037.xt" + "reemfs.pbrpc.FileCredentials\"\007\215\265\030)\000\000\000\022z\n" + "\031xtreemfs_restore_database\0225.xtreemfs.pb" + "rpc.xtreemfs_dump_restore_databaseReques" + "t\032\035.xtreemfs.pbrpc.emptyResponse\"\007\215\265\030*\000\000" + "\000\022m\n\025xtreemfs_restore_file\022,.xtreemfs.pb" + "rpc.xtreemfs_restore_fileRequest\032\035.xtree" + "mfs.pbrpc.emptyResponse\"\007\215\265\030+\000\000\000\022_\n\016xtre" + "emfs_rmvol\022%.xtreemfs.pbrpc.xtreemfs_rmv" + "olRequest\032\035.xtreemfs.pbrpc.emptyResponse" + "\"\007\215\265\030,\000\000\000\022Y\n\021xtreemfs_shutdown\022\034.xtreemf" + "s.pbrpc.emptyRequest\032\035.xtreemfs.pbrpc.em" + "ptyResponse\"\007\215\265\030-\000\000\000\022y\n\031xtreemfs_update_" + "file_size\0220.xtreemfs.pbrpc.xtreemfs_upda" + "te_file_sizeRequest\032!.xtreemfs.pbrpc.tim" + "estampResponse\"\007\215\265\030.\000\000\000\022\244\001\n\"xtreemfs_set" + "_replica_update_policy\0229.xtreemfs.pbrpc." + "xtreemfs_set_replica_update_policyReques" + "t\032:.xtreemfs.pbrpc.xtreemfs_set_replica_" + "update_policyResponse\"\007\215\265\0300\000\000\000\022\222\001\n\034xtree" + "mfs_set_read_only_xattr\0223.xtreemfs.pbrpc" + ".xtreemfs_set_read_only_xattrRequest\0324.x" + "treemfs.pbrpc.xtreemfs_set_read_only_xat" + "trResponse\"\007\215\265\0301\000\000\000\022\177\n\035xtreemfs_get_file" + "_credentials\0224.xtreemfs.pbrpc.xtreemfs_g" + "et_file_credentialsRequest\032\037.xtreemfs.pb" + "rpc.FileCredentials\"\007\215\265\0302\000\000\000\022N\n\024xtreemfs" + "_get_xlocset\022\024.xtreemfs.pbrpc.XCap\032\027.xtr" + "eemfs.pbrpc.XLocSet\"\007\215\265\0303\000\000\000\032\007\225\265\030!N\000\000B(\n" + "&org.xtreemfs.pbrpc.generatedinterfaces", 9439); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "xtreemfs/MRC.proto", &protobuf_RegisterTypes); Stat::default_instance_ = new Stat(); @@ -1580,10 +1588,10 @@ void protobuf_AddDesc_xtreemfs_2fMRC_2eproto() { unlinkResponse::default_instance_ = new unlinkResponse(); accessRequest::default_instance_ = new accessRequest(); xtreemfs_check_file_existsRequest::default_instance_ = new xtreemfs_check_file_existsRequest(); + xtreemfs_check_file_existsResponse::default_instance_ = new xtreemfs_check_file_existsResponse(); xtreemfs_dump_restore_databaseRequest::default_instance_ = new xtreemfs_dump_restore_databaseRequest(); xtreemfs_get_suitable_osdsRequest::default_instance_ = new xtreemfs_get_suitable_osdsRequest(); xtreemfs_get_suitable_osdsResponse::default_instance_ = new xtreemfs_get_suitable_osdsResponse(); - xtreemfs_check_file_existsResponse::default_instance_ = new xtreemfs_check_file_existsResponse(); timestampResponse::default_instance_ = new timestampResponse(); stringMessage::default_instance_ = new stringMessage(); xtreemfs_listdirRequest::default_instance_ = new xtreemfs_listdirRequest(); @@ -1632,10 +1640,10 @@ void protobuf_AddDesc_xtreemfs_2fMRC_2eproto() { unlinkResponse::default_instance_->InitAsDefaultInstance(); accessRequest::default_instance_->InitAsDefaultInstance(); xtreemfs_check_file_existsRequest::default_instance_->InitAsDefaultInstance(); + xtreemfs_check_file_existsResponse::default_instance_->InitAsDefaultInstance(); xtreemfs_dump_restore_databaseRequest::default_instance_->InitAsDefaultInstance(); xtreemfs_get_suitable_osdsRequest::default_instance_->InitAsDefaultInstance(); xtreemfs_get_suitable_osdsResponse::default_instance_->InitAsDefaultInstance(); - xtreemfs_check_file_existsResponse::default_instance_->InitAsDefaultInstance(); timestampResponse::default_instance_->InitAsDefaultInstance(); stringMessage::default_instance_->InitAsDefaultInstance(); xtreemfs_listdirRequest::default_instance_->InitAsDefaultInstance(); @@ -3278,6 +3286,7 @@ const int Volume::kNameFieldNumber; const int Volume::kOwnerGroupIdFieldNumber; const int Volume::kOwnerUserIdFieldNumber; const int Volume::kAttrsFieldNumber; +const int Volume::kQuotaFieldNumber; #endif // !_MSC_VER Volume::Volume() @@ -3304,6 +3313,7 @@ void Volume::SharedCtor() { name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); owner_group_id_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); owner_user_id_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + quota_ = GOOGLE_ULONGLONG(0); ::memset(_has_bits_, 0, sizeof(_has_bits_)); } @@ -3378,6 +3388,9 @@ void Volume::Clear() { } } } + if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) { + quota_ = GOOGLE_ULONGLONG(0); + } attrs_.Clear(); ::memset(_has_bits_, 0, sizeof(_has_bits_)); mutable_unknown_fields()->Clear(); @@ -3518,6 +3531,22 @@ bool Volume::MergePartialFromCodedStream( goto handle_uninterpreted; } if (input->ExpectTag(66)) goto parse_attrs; + if (input->ExpectTag(73)) goto parse_quota; + break; + } + + // optional fixed64 quota = 9; + case 9: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED64) { + parse_quota: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED64>( + input, "a_))); + set_has_quota(); + } else { + goto handle_uninterpreted; + } if (input->ExpectAtEnd()) return true; break; } @@ -3599,6 +3628,11 @@ void Volume::SerializeWithCachedSizes( 8, this->attrs(i), output); } + // optional fixed64 quota = 9; + if (has_quota()) { + ::google::protobuf::internal::WireFormatLite::WriteFixed64(9, this->quota(), output); + } + if (!unknown_fields().empty()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( unknown_fields(), output); @@ -3672,6 +3706,11 @@ void Volume::SerializeWithCachedSizes( 8, this->attrs(i), target); } + // optional fixed64 quota = 9; + if (has_quota()) { + target = ::google::protobuf::internal::WireFormatLite::WriteFixed64ToArray(9, this->quota(), target); + } + if (!unknown_fields().empty()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); @@ -3729,6 +3768,13 @@ int Volume::ByteSize() const { this->owner_user_id()); } + } + if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) { + // optional fixed64 quota = 9; + if (has_quota()) { + total_size += 1 + 8; + } + } // repeated .xtreemfs.pbrpc.KeyValuePair attrs = 8; total_size += 1 * this->attrs_size(); @@ -3787,6 +3833,11 @@ void Volume::MergeFrom(const Volume& from) { set_owner_user_id(from.owner_user_id()); } } + if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) { + if (from.has_quota()) { + set_quota(from.quota()); + } + } mutable_unknown_fields()->MergeFrom(from.unknown_fields()); } @@ -3824,6 +3875,7 @@ void Volume::Swap(Volume* other) { std::swap(owner_group_id_, other->owner_group_id_); std::swap(owner_user_id_, other->owner_user_id_); attrs_.Swap(&other->attrs_); + std::swap(quota_, other->quota_); std::swap(_has_bits_[0], other->_has_bits_[0]); _unknown_fields_.Swap(&other->_unknown_fields_); std::swap(_cached_size_, other->_cached_size_); @@ -12943,6 +12995,320 @@ void xtreemfs_check_file_existsRequest::Swap(xtreemfs_check_file_existsRequest* } +// =================================================================== + +const ::google::protobuf::EnumDescriptor* xtreemfs_check_file_existsResponse_FILE_STATE_descriptor() { + protobuf_AssignDescriptorsOnce(); + return xtreemfs_check_file_existsResponse_FILE_STATE_descriptor_; +} +bool xtreemfs_check_file_existsResponse_FILE_STATE_IsValid(int value) { + switch(value) { + case 0: + case 1: + case 2: + return true; + default: + return false; + } +} + +#ifndef _MSC_VER +const xtreemfs_check_file_existsResponse_FILE_STATE xtreemfs_check_file_existsResponse::DELETED; +const xtreemfs_check_file_existsResponse_FILE_STATE xtreemfs_check_file_existsResponse::REGISTERED; +const xtreemfs_check_file_existsResponse_FILE_STATE xtreemfs_check_file_existsResponse::ABANDONED; +const xtreemfs_check_file_existsResponse_FILE_STATE xtreemfs_check_file_existsResponse::FILE_STATE_MIN; +const xtreemfs_check_file_existsResponse_FILE_STATE xtreemfs_check_file_existsResponse::FILE_STATE_MAX; +const int xtreemfs_check_file_existsResponse::FILE_STATE_ARRAYSIZE; +#endif // _MSC_VER +#ifndef _MSC_VER +const int xtreemfs_check_file_existsResponse::kVolumeExistsFieldNumber; +const int xtreemfs_check_file_existsResponse::kFileStatesFieldNumber; +#endif // !_MSC_VER + +xtreemfs_check_file_existsResponse::xtreemfs_check_file_existsResponse() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void xtreemfs_check_file_existsResponse::InitAsDefaultInstance() { +} + +xtreemfs_check_file_existsResponse::xtreemfs_check_file_existsResponse(const xtreemfs_check_file_existsResponse& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void xtreemfs_check_file_existsResponse::SharedCtor() { + _cached_size_ = 0; + volume_exists_ = false; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +xtreemfs_check_file_existsResponse::~xtreemfs_check_file_existsResponse() { + SharedDtor(); +} + +void xtreemfs_check_file_existsResponse::SharedDtor() { + if (this != default_instance_) { + } +} + +void xtreemfs_check_file_existsResponse::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* xtreemfs_check_file_existsResponse::descriptor() { + protobuf_AssignDescriptorsOnce(); + return xtreemfs_check_file_existsResponse_descriptor_; +} + +const xtreemfs_check_file_existsResponse& xtreemfs_check_file_existsResponse::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_xtreemfs_2fMRC_2eproto(); + return *default_instance_; +} + +xtreemfs_check_file_existsResponse* xtreemfs_check_file_existsResponse::default_instance_ = NULL; + +xtreemfs_check_file_existsResponse* xtreemfs_check_file_existsResponse::New() const { + return new xtreemfs_check_file_existsResponse; +} + +void xtreemfs_check_file_existsResponse::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + volume_exists_ = false; + } + file_states_.Clear(); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool xtreemfs_check_file_existsResponse::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!(EXPRESSION)) return false + ::google::protobuf::uint32 tag; + while ((tag = input->ReadTag()) != 0) { + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // required bool volume_exists = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &volume_exists_))); + set_has_volume_exists(); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(18)) goto parse_file_states; + break; + } + + // repeated .xtreemfs.pbrpc.xtreemfs_check_file_existsResponse.FILE_STATE file_states = 2 [packed = true]; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_file_states: + ::google::protobuf::uint32 length; + DO_(input->ReadVarint32(&length)); + ::google::protobuf::io::CodedInputStream::Limit limit = input->PushLimit(length); + while (input->BytesUntilLimit() > 0) { + int value; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + if (::xtreemfs::pbrpc::xtreemfs_check_file_existsResponse_FILE_STATE_IsValid(value)) { + add_file_states(static_cast< ::xtreemfs::pbrpc::xtreemfs_check_file_existsResponse_FILE_STATE >(value)); + } + } + input->PopLimit(limit); + } else if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) + == ::google::protobuf::internal::WireFormatLite:: + WIRETYPE_VARINT) { + int value; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + if (::xtreemfs::pbrpc::xtreemfs_check_file_existsResponse_FILE_STATE_IsValid(value)) { + add_file_states(static_cast< ::xtreemfs::pbrpc::xtreemfs_check_file_existsResponse_FILE_STATE >(value)); + } else { + mutable_unknown_fields()->AddVarint(2, value); + } + } else { + goto handle_uninterpreted; + } + if (input->ExpectAtEnd()) return true; + break; + } + + default: { + handle_uninterpreted: + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + return true; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } + return true; +#undef DO_ +} + +void xtreemfs_check_file_existsResponse::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required bool volume_exists = 1; + if (has_volume_exists()) { + ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->volume_exists(), output); + } + + // repeated .xtreemfs.pbrpc.xtreemfs_check_file_existsResponse.FILE_STATE file_states = 2 [packed = true]; + if (this->file_states_size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteTag( + 2, + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + output); + output->WriteVarint32(_file_states_cached_byte_size_); + } + for (int i = 0; i < this->file_states_size(); i++) { + ::google::protobuf::internal::WireFormatLite::WriteEnumNoTag( + this->file_states(i), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* xtreemfs_check_file_existsResponse::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required bool volume_exists = 1; + if (has_volume_exists()) { + target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->volume_exists(), target); + } + + // repeated .xtreemfs.pbrpc.xtreemfs_check_file_existsResponse.FILE_STATE file_states = 2 [packed = true]; + if (this->file_states_size() > 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( + 2, + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + target); + target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( _file_states_cached_byte_size_, target); + } + for (int i = 0; i < this->file_states_size(); i++) { + target = ::google::protobuf::internal::WireFormatLite::WriteEnumNoTagToArray( + this->file_states(i), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int xtreemfs_check_file_existsResponse::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required bool volume_exists = 1; + if (has_volume_exists()) { + total_size += 1 + 1; + } + + } + // repeated .xtreemfs.pbrpc.xtreemfs_check_file_existsResponse.FILE_STATE file_states = 2 [packed = true]; + { + int data_size = 0; + for (int i = 0; i < this->file_states_size(); i++) { + data_size += ::google::protobuf::internal::WireFormatLite::EnumSize( + this->file_states(i)); + } + if (data_size > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size(data_size); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _file_states_cached_byte_size_ = data_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + total_size += data_size; + } + + if (!unknown_fields().empty()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void xtreemfs_check_file_existsResponse::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const xtreemfs_check_file_existsResponse* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void xtreemfs_check_file_existsResponse::MergeFrom(const xtreemfs_check_file_existsResponse& from) { + GOOGLE_CHECK_NE(&from, this); + file_states_.MergeFrom(from.file_states_); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_volume_exists()) { + set_volume_exists(from.volume_exists()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void xtreemfs_check_file_existsResponse::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void xtreemfs_check_file_existsResponse::CopyFrom(const xtreemfs_check_file_existsResponse& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool xtreemfs_check_file_existsResponse::IsInitialized() const { + if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; + + return true; +} + +void xtreemfs_check_file_existsResponse::Swap(xtreemfs_check_file_existsResponse* other) { + if (other != this) { + std::swap(volume_exists_, other->volume_exists_); + file_states_.Swap(&other->file_states_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::google::protobuf::Metadata xtreemfs_check_file_existsResponse::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = xtreemfs_check_file_existsResponse_descriptor_; + metadata.reflection = xtreemfs_check_file_existsResponse_reflection_; + return metadata; +} + + // =================================================================== #ifndef _MSC_VER @@ -13758,232 +14124,6 @@ void xtreemfs_get_suitable_osdsResponse::Swap(xtreemfs_get_suitable_osdsResponse } -// =================================================================== - -#ifndef _MSC_VER -const int xtreemfs_check_file_existsResponse::kBitmapFieldNumber; -#endif // !_MSC_VER - -xtreemfs_check_file_existsResponse::xtreemfs_check_file_existsResponse() - : ::google::protobuf::Message() { - SharedCtor(); -} - -void xtreemfs_check_file_existsResponse::InitAsDefaultInstance() { -} - -xtreemfs_check_file_existsResponse::xtreemfs_check_file_existsResponse(const xtreemfs_check_file_existsResponse& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); -} - -void xtreemfs_check_file_existsResponse::SharedCtor() { - _cached_size_ = 0; - bitmap_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -xtreemfs_check_file_existsResponse::~xtreemfs_check_file_existsResponse() { - SharedDtor(); -} - -void xtreemfs_check_file_existsResponse::SharedDtor() { - if (bitmap_ != &::google::protobuf::internal::kEmptyString) { - delete bitmap_; - } - if (this != default_instance_) { - } -} - -void xtreemfs_check_file_existsResponse::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const ::google::protobuf::Descriptor* xtreemfs_check_file_existsResponse::descriptor() { - protobuf_AssignDescriptorsOnce(); - return xtreemfs_check_file_existsResponse_descriptor_; -} - -const xtreemfs_check_file_existsResponse& xtreemfs_check_file_existsResponse::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_xtreemfs_2fMRC_2eproto(); - return *default_instance_; -} - -xtreemfs_check_file_existsResponse* xtreemfs_check_file_existsResponse::default_instance_ = NULL; - -xtreemfs_check_file_existsResponse* xtreemfs_check_file_existsResponse::New() const { - return new xtreemfs_check_file_existsResponse; -} - -void xtreemfs_check_file_existsResponse::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (has_bitmap()) { - if (bitmap_ != &::google::protobuf::internal::kEmptyString) { - bitmap_->clear(); - } - } - } - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); -} - -bool xtreemfs_check_file_existsResponse::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false - ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // required string bitmap = 1; - case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_bitmap())); - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->bitmap().data(), this->bitmap().length(), - ::google::protobuf::internal::WireFormat::PARSE); - } else { - goto handle_uninterpreted; - } - if (input->ExpectAtEnd()) return true; - break; - } - - default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; - } - DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); - break; - } - } - } - return true; -#undef DO_ -} - -void xtreemfs_check_file_existsResponse::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // required string bitmap = 1; - if (has_bitmap()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->bitmap().data(), this->bitmap().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - ::google::protobuf::internal::WireFormatLite::WriteString( - 1, this->bitmap(), output); - } - - if (!unknown_fields().empty()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); - } -} - -::google::protobuf::uint8* xtreemfs_check_file_existsResponse::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { - // required string bitmap = 1; - if (has_bitmap()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->bitmap().data(), this->bitmap().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 1, this->bitmap(), target); - } - - if (!unknown_fields().empty()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); - } - return target; -} - -int xtreemfs_check_file_existsResponse::ByteSize() const { - int total_size = 0; - - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - // required string bitmap = 1; - if (has_bitmap()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->bitmap()); - } - - } - if (!unknown_fields().empty()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); - } - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void xtreemfs_check_file_existsResponse::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); - const xtreemfs_check_file_existsResponse* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); - if (source == NULL) { - ::google::protobuf::internal::ReflectionOps::Merge(from, this); - } else { - MergeFrom(*source); - } -} - -void xtreemfs_check_file_existsResponse::MergeFrom(const xtreemfs_check_file_existsResponse& from) { - GOOGLE_CHECK_NE(&from, this); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (from.has_bitmap()) { - set_bitmap(from.bitmap()); - } - } - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); -} - -void xtreemfs_check_file_existsResponse::CopyFrom(const ::google::protobuf::Message& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void xtreemfs_check_file_existsResponse::CopyFrom(const xtreemfs_check_file_existsResponse& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool xtreemfs_check_file_existsResponse::IsInitialized() const { - if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; - - return true; -} - -void xtreemfs_check_file_existsResponse::Swap(xtreemfs_check_file_existsResponse* other) { - if (other != this) { - std::swap(bitmap_, other->bitmap_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } -} - -::google::protobuf::Metadata xtreemfs_check_file_existsResponse::GetMetadata() const { - protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = xtreemfs_check_file_existsResponse_descriptor_; - metadata.reflection = xtreemfs_check_file_existsResponse_reflection_; - return metadata; -} - - // =================================================================== #ifndef _MSC_VER diff --git a/cpp/generated/xtreemfs/MRC.pb.h b/cpp/generated/xtreemfs/MRC.pb.h index 8b900941347ad70a05faae799301f709f6d2c7e3..1304d0c4561bedadc999b10dfce65432ce46f77d 100644 --- a/cpp/generated/xtreemfs/MRC.pb.h +++ b/cpp/generated/xtreemfs/MRC.pb.h @@ -71,10 +71,10 @@ class unlinkRequest; class unlinkResponse; class accessRequest; class xtreemfs_check_file_existsRequest; +class xtreemfs_check_file_existsResponse; class xtreemfs_dump_restore_databaseRequest; class xtreemfs_get_suitable_osdsRequest; class xtreemfs_get_suitable_osdsResponse; -class xtreemfs_check_file_existsResponse; class timestampResponse; class stringMessage; class xtreemfs_listdirRequest; @@ -91,6 +91,26 @@ class xtreemfs_set_read_only_xattrRequest; class xtreemfs_set_read_only_xattrResponse; class xtreemfs_get_file_credentialsRequest; +enum xtreemfs_check_file_existsResponse_FILE_STATE { + xtreemfs_check_file_existsResponse_FILE_STATE_DELETED = 0, + xtreemfs_check_file_existsResponse_FILE_STATE_REGISTERED = 1, + xtreemfs_check_file_existsResponse_FILE_STATE_ABANDONED = 2 +}; +bool xtreemfs_check_file_existsResponse_FILE_STATE_IsValid(int value); +const xtreemfs_check_file_existsResponse_FILE_STATE xtreemfs_check_file_existsResponse_FILE_STATE_FILE_STATE_MIN = xtreemfs_check_file_existsResponse_FILE_STATE_DELETED; +const xtreemfs_check_file_existsResponse_FILE_STATE xtreemfs_check_file_existsResponse_FILE_STATE_FILE_STATE_MAX = xtreemfs_check_file_existsResponse_FILE_STATE_ABANDONED; +const int xtreemfs_check_file_existsResponse_FILE_STATE_FILE_STATE_ARRAYSIZE = xtreemfs_check_file_existsResponse_FILE_STATE_FILE_STATE_MAX + 1; + +const ::google::protobuf::EnumDescriptor* xtreemfs_check_file_existsResponse_FILE_STATE_descriptor(); +inline const ::std::string& xtreemfs_check_file_existsResponse_FILE_STATE_Name(xtreemfs_check_file_existsResponse_FILE_STATE value) { + return ::google::protobuf::internal::NameOfEnum( + xtreemfs_check_file_existsResponse_FILE_STATE_descriptor(), value); +} +inline bool xtreemfs_check_file_existsResponse_FILE_STATE_Parse( + const ::std::string& name, xtreemfs_check_file_existsResponse_FILE_STATE* value) { + return ::google::protobuf::internal::ParseNamedEnum( + xtreemfs_check_file_existsResponse_FILE_STATE_descriptor(), name, value); +} enum Setattrs { SETATTR_MODE = 1, SETATTR_UID = 2, @@ -818,6 +838,13 @@ class Volume : public ::google::protobuf::Message { inline ::google::protobuf::RepeatedPtrField< ::xtreemfs::pbrpc::KeyValuePair >* mutable_attrs(); + // optional fixed64 quota = 9; + inline bool has_quota() const; + inline void clear_quota(); + static const int kQuotaFieldNumber = 9; + inline ::google::protobuf::uint64 quota() const; + inline void set_quota(::google::protobuf::uint64 value); + // @@protoc_insertion_point(class_scope:xtreemfs.pbrpc.Volume) private: inline void set_has_access_control_policy(); @@ -834,6 +861,8 @@ class Volume : public ::google::protobuf::Message { inline void clear_has_owner_group_id(); inline void set_has_owner_user_id(); inline void clear_has_owner_user_id(); + inline void set_has_quota(); + inline void clear_has_quota(); ::google::protobuf::UnknownFieldSet _unknown_fields_; @@ -845,9 +874,10 @@ class Volume : public ::google::protobuf::Message { ::std::string* owner_group_id_; ::std::string* owner_user_id_; ::google::protobuf::RepeatedPtrField< ::xtreemfs::pbrpc::KeyValuePair > attrs_; + ::google::protobuf::uint64 quota_; mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(8 + 31) / 32]; + ::google::protobuf::uint32 _has_bits_[(9 + 31) / 32]; friend void protobuf_AddDesc_xtreemfs_2fMRC_2eproto(); friend void protobuf_AssignDesc_xtreemfs_2fMRC_2eproto(); @@ -4037,6 +4067,125 @@ class xtreemfs_check_file_existsRequest : public ::google::protobuf::Message { }; // ------------------------------------------------------------------- +class xtreemfs_check_file_existsResponse : public ::google::protobuf::Message { + public: + xtreemfs_check_file_existsResponse(); + virtual ~xtreemfs_check_file_existsResponse(); + + xtreemfs_check_file_existsResponse(const xtreemfs_check_file_existsResponse& from); + + inline xtreemfs_check_file_existsResponse& operator=(const xtreemfs_check_file_existsResponse& from) { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const xtreemfs_check_file_existsResponse& default_instance(); + + void Swap(xtreemfs_check_file_existsResponse* other); + + // implements Message ---------------------------------------------- + + xtreemfs_check_file_existsResponse* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const xtreemfs_check_file_existsResponse& from); + void MergeFrom(const xtreemfs_check_file_existsResponse& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + typedef xtreemfs_check_file_existsResponse_FILE_STATE FILE_STATE; + static const FILE_STATE DELETED = xtreemfs_check_file_existsResponse_FILE_STATE_DELETED; + static const FILE_STATE REGISTERED = xtreemfs_check_file_existsResponse_FILE_STATE_REGISTERED; + static const FILE_STATE ABANDONED = xtreemfs_check_file_existsResponse_FILE_STATE_ABANDONED; + static inline bool FILE_STATE_IsValid(int value) { + return xtreemfs_check_file_existsResponse_FILE_STATE_IsValid(value); + } + static const FILE_STATE FILE_STATE_MIN = + xtreemfs_check_file_existsResponse_FILE_STATE_FILE_STATE_MIN; + static const FILE_STATE FILE_STATE_MAX = + xtreemfs_check_file_existsResponse_FILE_STATE_FILE_STATE_MAX; + static const int FILE_STATE_ARRAYSIZE = + xtreemfs_check_file_existsResponse_FILE_STATE_FILE_STATE_ARRAYSIZE; + static inline const ::google::protobuf::EnumDescriptor* + FILE_STATE_descriptor() { + return xtreemfs_check_file_existsResponse_FILE_STATE_descriptor(); + } + static inline const ::std::string& FILE_STATE_Name(FILE_STATE value) { + return xtreemfs_check_file_existsResponse_FILE_STATE_Name(value); + } + static inline bool FILE_STATE_Parse(const ::std::string& name, + FILE_STATE* value) { + return xtreemfs_check_file_existsResponse_FILE_STATE_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + // required bool volume_exists = 1; + inline bool has_volume_exists() const; + inline void clear_volume_exists(); + static const int kVolumeExistsFieldNumber = 1; + inline bool volume_exists() const; + inline void set_volume_exists(bool value); + + // repeated .xtreemfs.pbrpc.xtreemfs_check_file_existsResponse.FILE_STATE file_states = 2 [packed = true]; + inline int file_states_size() const; + inline void clear_file_states(); + static const int kFileStatesFieldNumber = 2; + inline ::xtreemfs::pbrpc::xtreemfs_check_file_existsResponse_FILE_STATE file_states(int index) const; + inline void set_file_states(int index, ::xtreemfs::pbrpc::xtreemfs_check_file_existsResponse_FILE_STATE value); + inline void add_file_states(::xtreemfs::pbrpc::xtreemfs_check_file_existsResponse_FILE_STATE value); + inline const ::google::protobuf::RepeatedField& file_states() const; + inline ::google::protobuf::RepeatedField* mutable_file_states(); + + // @@protoc_insertion_point(class_scope:xtreemfs.pbrpc.xtreemfs_check_file_existsResponse) + private: + inline void set_has_volume_exists(); + inline void clear_has_volume_exists(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::RepeatedField file_states_; + mutable int _file_states_cached_byte_size_; + bool volume_exists_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; + + friend void protobuf_AddDesc_xtreemfs_2fMRC_2eproto(); + friend void protobuf_AssignDesc_xtreemfs_2fMRC_2eproto(); + friend void protobuf_ShutdownFile_xtreemfs_2fMRC_2eproto(); + + void InitAsDefaultInstance(); + static xtreemfs_check_file_existsResponse* default_instance_; +}; +// ------------------------------------------------------------------- + class xtreemfs_dump_restore_databaseRequest : public ::google::protobuf::Message { public: xtreemfs_dump_restore_databaseRequest(); @@ -4340,93 +4489,6 @@ class xtreemfs_get_suitable_osdsResponse : public ::google::protobuf::Message { }; // ------------------------------------------------------------------- -class xtreemfs_check_file_existsResponse : public ::google::protobuf::Message { - public: - xtreemfs_check_file_existsResponse(); - virtual ~xtreemfs_check_file_existsResponse(); - - xtreemfs_check_file_existsResponse(const xtreemfs_check_file_existsResponse& from); - - inline xtreemfs_check_file_existsResponse& operator=(const xtreemfs_check_file_existsResponse& from) { - CopyFrom(from); - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; - } - - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; - } - - static const ::google::protobuf::Descriptor* descriptor(); - static const xtreemfs_check_file_existsResponse& default_instance(); - - void Swap(xtreemfs_check_file_existsResponse* other); - - // implements Message ---------------------------------------------- - - xtreemfs_check_file_existsResponse* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); - void CopyFrom(const xtreemfs_check_file_existsResponse& from); - void MergeFrom(const xtreemfs_check_file_existsResponse& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - public: - - ::google::protobuf::Metadata GetMetadata() const; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - // required string bitmap = 1; - inline bool has_bitmap() const; - inline void clear_bitmap(); - static const int kBitmapFieldNumber = 1; - inline const ::std::string& bitmap() const; - inline void set_bitmap(const ::std::string& value); - inline void set_bitmap(const char* value); - inline void set_bitmap(const char* value, size_t size); - inline ::std::string* mutable_bitmap(); - inline ::std::string* release_bitmap(); - inline void set_allocated_bitmap(::std::string* bitmap); - - // @@protoc_insertion_point(class_scope:xtreemfs.pbrpc.xtreemfs_check_file_existsResponse) - private: - inline void set_has_bitmap(); - inline void clear_has_bitmap(); - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - - ::std::string* bitmap_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32]; - - friend void protobuf_AddDesc_xtreemfs_2fMRC_2eproto(); - friend void protobuf_AssignDesc_xtreemfs_2fMRC_2eproto(); - friend void protobuf_ShutdownFile_xtreemfs_2fMRC_2eproto(); - - void InitAsDefaultInstance(); - static xtreemfs_check_file_existsResponse* default_instance_; -}; -// ------------------------------------------------------------------- - class timestampResponse : public ::google::protobuf::Message { public: timestampResponse(); @@ -7103,6 +7165,28 @@ Volume::mutable_attrs() { return &attrs_; } +// optional fixed64 quota = 9; +inline bool Volume::has_quota() const { + return (_has_bits_[0] & 0x00000100u) != 0; +} +inline void Volume::set_has_quota() { + _has_bits_[0] |= 0x00000100u; +} +inline void Volume::clear_has_quota() { + _has_bits_[0] &= ~0x00000100u; +} +inline void Volume::clear_quota() { + quota_ = GOOGLE_ULONGLONG(0); + clear_has_quota(); +} +inline ::google::protobuf::uint64 Volume::quota() const { + return quota_; +} +inline void Volume::set_quota(::google::protobuf::uint64 value) { + set_has_quota(); + quota_ = value; +} + // ------------------------------------------------------------------- // Volumes @@ -11700,6 +11784,59 @@ inline void xtreemfs_check_file_existsRequest::set_allocated_osd_uuid(::std::str // ------------------------------------------------------------------- +// xtreemfs_check_file_existsResponse + +// required bool volume_exists = 1; +inline bool xtreemfs_check_file_existsResponse::has_volume_exists() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void xtreemfs_check_file_existsResponse::set_has_volume_exists() { + _has_bits_[0] |= 0x00000001u; +} +inline void xtreemfs_check_file_existsResponse::clear_has_volume_exists() { + _has_bits_[0] &= ~0x00000001u; +} +inline void xtreemfs_check_file_existsResponse::clear_volume_exists() { + volume_exists_ = false; + clear_has_volume_exists(); +} +inline bool xtreemfs_check_file_existsResponse::volume_exists() const { + return volume_exists_; +} +inline void xtreemfs_check_file_existsResponse::set_volume_exists(bool value) { + set_has_volume_exists(); + volume_exists_ = value; +} + +// repeated .xtreemfs.pbrpc.xtreemfs_check_file_existsResponse.FILE_STATE file_states = 2 [packed = true]; +inline int xtreemfs_check_file_existsResponse::file_states_size() const { + return file_states_.size(); +} +inline void xtreemfs_check_file_existsResponse::clear_file_states() { + file_states_.Clear(); +} +inline ::xtreemfs::pbrpc::xtreemfs_check_file_existsResponse_FILE_STATE xtreemfs_check_file_existsResponse::file_states(int index) const { + return static_cast< ::xtreemfs::pbrpc::xtreemfs_check_file_existsResponse_FILE_STATE >(file_states_.Get(index)); +} +inline void xtreemfs_check_file_existsResponse::set_file_states(int index, ::xtreemfs::pbrpc::xtreemfs_check_file_existsResponse_FILE_STATE value) { + assert(::xtreemfs::pbrpc::xtreemfs_check_file_existsResponse_FILE_STATE_IsValid(value)); + file_states_.Set(index, value); +} +inline void xtreemfs_check_file_existsResponse::add_file_states(::xtreemfs::pbrpc::xtreemfs_check_file_existsResponse_FILE_STATE value) { + assert(::xtreemfs::pbrpc::xtreemfs_check_file_existsResponse_FILE_STATE_IsValid(value)); + file_states_.Add(value); +} +inline const ::google::protobuf::RepeatedField& +xtreemfs_check_file_existsResponse::file_states() const { + return file_states_; +} +inline ::google::protobuf::RepeatedField* +xtreemfs_check_file_existsResponse::mutable_file_states() { + return &file_states_; +} + +// ------------------------------------------------------------------- + // xtreemfs_dump_restore_databaseRequest // required string dump_file = 1; @@ -12058,80 +12195,6 @@ xtreemfs_get_suitable_osdsResponse::mutable_osd_uuids() { // ------------------------------------------------------------------- -// xtreemfs_check_file_existsResponse - -// required string bitmap = 1; -inline bool xtreemfs_check_file_existsResponse::has_bitmap() const { - return (_has_bits_[0] & 0x00000001u) != 0; -} -inline void xtreemfs_check_file_existsResponse::set_has_bitmap() { - _has_bits_[0] |= 0x00000001u; -} -inline void xtreemfs_check_file_existsResponse::clear_has_bitmap() { - _has_bits_[0] &= ~0x00000001u; -} -inline void xtreemfs_check_file_existsResponse::clear_bitmap() { - if (bitmap_ != &::google::protobuf::internal::kEmptyString) { - bitmap_->clear(); - } - clear_has_bitmap(); -} -inline const ::std::string& xtreemfs_check_file_existsResponse::bitmap() const { - return *bitmap_; -} -inline void xtreemfs_check_file_existsResponse::set_bitmap(const ::std::string& value) { - set_has_bitmap(); - if (bitmap_ == &::google::protobuf::internal::kEmptyString) { - bitmap_ = new ::std::string; - } - bitmap_->assign(value); -} -inline void xtreemfs_check_file_existsResponse::set_bitmap(const char* value) { - set_has_bitmap(); - if (bitmap_ == &::google::protobuf::internal::kEmptyString) { - bitmap_ = new ::std::string; - } - bitmap_->assign(value); -} -inline void xtreemfs_check_file_existsResponse::set_bitmap(const char* value, size_t size) { - set_has_bitmap(); - if (bitmap_ == &::google::protobuf::internal::kEmptyString) { - bitmap_ = new ::std::string; - } - bitmap_->assign(reinterpret_cast(value), size); -} -inline ::std::string* xtreemfs_check_file_existsResponse::mutable_bitmap() { - set_has_bitmap(); - if (bitmap_ == &::google::protobuf::internal::kEmptyString) { - bitmap_ = new ::std::string; - } - return bitmap_; -} -inline ::std::string* xtreemfs_check_file_existsResponse::release_bitmap() { - clear_has_bitmap(); - if (bitmap_ == &::google::protobuf::internal::kEmptyString) { - return NULL; - } else { - ::std::string* temp = bitmap_; - bitmap_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - return temp; - } -} -inline void xtreemfs_check_file_existsResponse::set_allocated_bitmap(::std::string* bitmap) { - if (bitmap_ != &::google::protobuf::internal::kEmptyString) { - delete bitmap_; - } - if (bitmap) { - set_has_bitmap(); - bitmap_ = bitmap; - } else { - clear_has_bitmap(); - bitmap_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - } -} - -// ------------------------------------------------------------------- - // timestampResponse // required fixed32 timestamp_s = 1; @@ -13998,6 +14061,10 @@ inline void xtreemfs_get_file_credentialsRequest::set_allocated_file_id(::std::s namespace google { namespace protobuf { +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::xtreemfs::pbrpc::xtreemfs_check_file_existsResponse_FILE_STATE>() { + return ::xtreemfs::pbrpc::xtreemfs_check_file_existsResponse_FILE_STATE_descriptor(); +} template <> inline const EnumDescriptor* GetEnumDescriptor< ::xtreemfs::pbrpc::Setattrs>() { return ::xtreemfs::pbrpc::Setattrs_descriptor(); diff --git a/cpp/generated/xtreemfs/MRCServiceClient.h b/cpp/generated/xtreemfs/MRCServiceClient.h index 4f33cba1d2c2053a0fc7fc2c351a586116eabe53..b1f368004a09346f9c93cc764c1756e5f16b3d98 100644 --- a/cpp/generated/xtreemfs/MRCServiceClient.h +++ b/cpp/generated/xtreemfs/MRCServiceClient.h @@ -1,5 +1,5 @@ -//automatically generated from MRC.proto at Wed Nov 20 11:42:24 CET 2013 -//(c) 2013. See LICENSE file for details. +//automatically generated from MRC.proto at Wed Nov 12 13:55:48 CET 2014 +//(c) 2014. See LICENSE file for details. #ifndef MRCSERVICECLIENT_H #define MRCSERVICECLIENT_H diff --git a/cpp/generated/xtreemfs/MRCServiceConstants.h b/cpp/generated/xtreemfs/MRCServiceConstants.h index e3635968cc44bf23402f9bf1d4628f4348603336..a0e5743dc62d00cf582d5ffd43a86d738984c7a3 100644 --- a/cpp/generated/xtreemfs/MRCServiceConstants.h +++ b/cpp/generated/xtreemfs/MRCServiceConstants.h @@ -1,5 +1,5 @@ -//automatically generated from MRC.proto at Wed Nov 20 11:42:24 CET 2013 -//(c) 2013. See LICENSE file for details. +//automatically generated from MRC.proto at Wed Nov 12 13:55:48 CET 2014 +//(c) 2014. See LICENSE file for details. #ifndef MRCSERVICECONSTANTS_H_ #define MRCSERVICECONSTANTS_H_ diff --git a/cpp/generated/xtreemfs/OSD.pb.cc b/cpp/generated/xtreemfs/OSD.pb.cc index 14a7e88d49e0a2fdf03af9a68c74d6963aed2fa7..590aec6bba73bdba36cb6cd5be74a0690471ffb0 100644 --- a/cpp/generated/xtreemfs/OSD.pb.cc +++ b/cpp/generated/xtreemfs/OSD.pb.cc @@ -144,6 +144,7 @@ const ::google::protobuf::internal::GeneratedMessageReflection* const ::google::protobuf::Descriptor* xtreemfs_xloc_set_invalidateResponse_descriptor_ = NULL; const ::google::protobuf::internal::GeneratedMessageReflection* xtreemfs_xloc_set_invalidateResponse_reflection_ = NULL; +const ::google::protobuf::EnumDescriptor* OSDHealthResult_descriptor_ = NULL; } // namespace @@ -272,9 +273,10 @@ void protobuf_AssignDesc_xtreemfs_2fOSD_2eproto() { ::google::protobuf::MessageFactory::generated_factory(), sizeof(TruncateLog)); XLocSetVersionState_descriptor_ = file->message_type(7); - static const int XLocSetVersionState_offsets_[2] = { + static const int XLocSetVersionState_offsets_[3] = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(XLocSetVersionState, version_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(XLocSetVersionState, invalidated_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(XLocSetVersionState, modified_time_), }; XLocSetVersionState_reflection_ = new ::google::protobuf::internal::GeneratedMessageReflection( @@ -499,10 +501,12 @@ void protobuf_AssignDesc_xtreemfs_2fOSD_2eproto() { ::google::protobuf::MessageFactory::generated_factory(), sizeof(xtreemfs_cleanup_is_runningResponse)); xtreemfs_cleanup_startRequest_descriptor_ = file->message_type(20); - static const int xtreemfs_cleanup_startRequest_offsets_[3] = { + static const int xtreemfs_cleanup_startRequest_offsets_[5] = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(xtreemfs_cleanup_startRequest, remove_zombies_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(xtreemfs_cleanup_startRequest, remove_unavail_volume_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(xtreemfs_cleanup_startRequest, lost_and_found_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(xtreemfs_cleanup_startRequest, delete_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(xtreemfs_cleanup_startRequest, metadata_timeout_), }; xtreemfs_cleanup_startRequest_reflection_ = new ::google::protobuf::internal::GeneratedMessageReflection( @@ -853,6 +857,7 @@ void protobuf_AssignDesc_xtreemfs_2fOSD_2eproto() { ::google::protobuf::DescriptorPool::generated_pool(), ::google::protobuf::MessageFactory::generated_factory(), sizeof(xtreemfs_xloc_set_invalidateResponse)); + OSDHealthResult_descriptor_ = file->enum_type(0); } namespace { @@ -1061,216 +1066,221 @@ void protobuf_AddDesc_xtreemfs_2fOSD_2eproto() { "ect_version\030\002 \002(\006\"=\n\016TruncateRecord\022\017\n\007v" "ersion\030\001 \002(\006\022\032\n\022last_object_number\030\002 \002(\006" "\">\n\013TruncateLog\022/\n\007records\030\001 \003(\0132\036.xtree" - "mfs.pbrpc.TruncateRecord\";\n\023XLocSetVersi" + "mfs.pbrpc.TruncateRecord\"R\n\023XLocSetVersi" "onState\022\017\n\007version\030\001 \002(\007\022\023\n\013invalidated\030" - "\002 \002(\010\"\324\001\n\rReplicaStatus\022\026\n\016truncate_epoc" - "h\030\001 \002(\006\022\021\n\tfile_size\030\002 \002(\006\022\027\n\017max_obj_ve" - "rsion\030\003 \002(\006\022\025\n\rprimary_epoch\030\004 \002(\007\0225\n\016ob" - "jectVersions\030\005 \003(\0132\035.xtreemfs.pbrpc.Obje" - "ctVersion\0221\n\014truncate_log\030\006 \002(\0132\033.xtreem" - "fs.pbrpc.TruncateLog\"X\n\024ObjectVersionMap" - "ping\022\025\n\robject_number\030\001 \002(\006\022\026\n\016object_ve" - "rsion\030\002 \002(\006\022\021\n\tosd_uuids\030\003 \003(\t\"\275\001\n\031Autho" - "ritativeReplicaState\022\026\n\016truncate_epoch\030\001" - " \002(\006\022\027\n\017max_obj_version\030\004 \002(\006\022<\n\016objectV" - "ersions\030\002 \003(\0132$.xtreemfs.pbrpc.ObjectVer" - "sionMapping\0221\n\014truncate_log\030\003 \002(\0132\033.xtre" - "emfs.pbrpc.TruncateLog\"u\n\031InternalReadLo" - "calResponse\022(\n\004data\030\001 \002(\0132\032.xtreemfs.pbr" - "pc.ObjectData\022.\n\nobject_set\030\002 \003(\0132\032.xtre" - "emfs.pbrpc.ObjectList\"\250\001\n\013readRequest\0229\n" - "\020file_credentials\030\001 \002(\0132\037.xtreemfs.pbrpc" - ".FileCredentials\022\017\n\007file_id\030\002 \002(\t\022\025\n\robj" - "ect_number\030\003 \002(\006\022\026\n\016object_version\030\004 \002(\006" - "\022\016\n\006offset\030\005 \002(\007\022\016\n\006length\030\006 \002(\007\"t\n\017trun" - "cateRequest\0229\n\020file_credentials\030\001 \002(\0132\037." + "\002 \002(\010\022\025\n\rmodified_time\030\003 \001(\006\"\324\001\n\rReplica" + "Status\022\026\n\016truncate_epoch\030\001 \002(\006\022\021\n\tfile_s" + "ize\030\002 \002(\006\022\027\n\017max_obj_version\030\003 \002(\006\022\025\n\rpr" + "imary_epoch\030\004 \002(\007\0225\n\016objectVersions\030\005 \003(" + "\0132\035.xtreemfs.pbrpc.ObjectVersion\0221\n\014trun" + "cate_log\030\006 \002(\0132\033.xtreemfs.pbrpc.Truncate" + "Log\"X\n\024ObjectVersionMapping\022\025\n\robject_nu" + "mber\030\001 \002(\006\022\026\n\016object_version\030\002 \002(\006\022\021\n\tos" + "d_uuids\030\003 \003(\t\"\275\001\n\031AuthoritativeReplicaSt" + "ate\022\026\n\016truncate_epoch\030\001 \002(\006\022\027\n\017max_obj_v" + "ersion\030\004 \002(\006\022<\n\016objectVersions\030\002 \003(\0132$.x" + "treemfs.pbrpc.ObjectVersionMapping\0221\n\014tr" + "uncate_log\030\003 \002(\0132\033.xtreemfs.pbrpc.Trunca" + "teLog\"u\n\031InternalReadLocalResponse\022(\n\004da" + "ta\030\001 \002(\0132\032.xtreemfs.pbrpc.ObjectData\022.\n\n" + "object_set\030\002 \003(\0132\032.xtreemfs.pbrpc.Object" + "List\"\250\001\n\013readRequest\0229\n\020file_credentials" + "\030\001 \002(\0132\037.xtreemfs.pbrpc.FileCredentials\022" + "\017\n\007file_id\030\002 \002(\t\022\025\n\robject_number\030\003 \002(\006\022" + "\026\n\016object_version\030\004 \002(\006\022\016\n\006offset\030\005 \002(\007\022" + "\016\n\006length\030\006 \002(\007\"t\n\017truncateRequest\0229\n\020fi" + "le_credentials\030\001 \002(\0132\037.xtreemfs.pbrpc.Fi" + "leCredentials\022\017\n\007file_id\030\002 \002(\t\022\025\n\rnew_fi" + "le_size\030\003 \002(\006\"`\n\022unlink_osd_Request\0229\n\020f" + "ile_credentials\030\001 \002(\0132\037.xtreemfs.pbrpc.F" + "ileCredentials\022\017\n\007file_id\030\002 \002(\t\"\341\001\n\014writ" + "eRequest\0229\n\020file_credentials\030\001 \002(\0132\037.xtr" + "eemfs.pbrpc.FileCredentials\022\017\n\007file_id\030\002" + " \002(\t\022\025\n\robject_number\030\003 \002(\006\022\026\n\016object_ve" + "rsion\030\004 \002(\006\022\016\n\006offset\030\005 \002(\007\022\025\n\rlease_tim" + "eout\030\006 \002(\006\022/\n\013object_data\030\007 \002(\0132\032.xtreem" + "fs.pbrpc.ObjectData\"q\n\036xtreemfs_broadcas" + "t_gmaxRequest\022\017\n\007file_id\030\001 \002(\t\022\026\n\016trunca" + "te_epoch\030\002 \002(\006\022\023\n\013last_object\030\003 \002(\006\022\021\n\tf" + "ile_size\030\004 \002(\006\"\231\001\n\034xtreemfs_check_object" + "Request\0229\n\020file_credentials\030\001 \002(\0132\037.xtre" + "emfs.pbrpc.FileCredentials\022\017\n\007file_id\030\002 " + "\002(\t\022\025\n\robject_number\030\003 \002(\006\022\026\n\016object_ver" + "sion\030\004 \002(\006\"7\n$xtreemfs_cleanup_get_resul" + "tsResponse\022\017\n\007results\030\001 \003(\t\"9\n#xtreemfs_" + "cleanup_is_runningResponse\022\022\n\nis_running" + "\030\001 \002(\010\"\241\001\n\035xtreemfs_cleanup_startRequest" + "\022\026\n\016remove_zombies\030\001 \002(\010\022\035\n\025remove_unava" + "il_volume\030\002 \002(\010\022\026\n\016lost_and_found\030\003 \002(\010\022" + "\027\n\017delete_metadata\030\004 \002(\010\022\030\n\020metadata_tim" + "eout\030\005 \002(\007\"1\n\037xtreemfs_cleanup_statusRes" + "ponse\022\016\n\006status\030\001 \002(\t\"\226\001\n\031xtreemfs_rwr_f" + "etchRequest\0229\n\020file_credentials\030\001 \002(\0132\037." "xtreemfs.pbrpc.FileCredentials\022\017\n\007file_i" - "d\030\002 \002(\t\022\025\n\rnew_file_size\030\003 \002(\006\"`\n\022unlink" - "_osd_Request\0229\n\020file_credentials\030\001 \002(\0132\037" - ".xtreemfs.pbrpc.FileCredentials\022\017\n\007file_" - "id\030\002 \002(\t\"\341\001\n\014writeRequest\0229\n\020file_creden" - "tials\030\001 \002(\0132\037.xtreemfs.pbrpc.FileCredent" - "ials\022\017\n\007file_id\030\002 \002(\t\022\025\n\robject_number\030\003" - " \002(\006\022\026\n\016object_version\030\004 \002(\006\022\016\n\006offset\030\005" - " \002(\007\022\025\n\rlease_timeout\030\006 \002(\006\022/\n\013object_da" - "ta\030\007 \002(\0132\032.xtreemfs.pbrpc.ObjectData\"q\n\036" - "xtreemfs_broadcast_gmaxRequest\022\017\n\007file_i" - "d\030\001 \002(\t\022\026\n\016truncate_epoch\030\002 \002(\006\022\023\n\013last_" - "object\030\003 \002(\006\022\021\n\tfile_size\030\004 \002(\006\"\231\001\n\034xtre" - "emfs_check_objectRequest\0229\n\020file_credent" - "ials\030\001 \002(\0132\037.xtreemfs.pbrpc.FileCredenti" - "als\022\017\n\007file_id\030\002 \002(\t\022\025\n\robject_number\030\003 " - "\002(\006\022\026\n\016object_version\030\004 \002(\006\"7\n$xtreemfs_" - "cleanup_get_resultsResponse\022\017\n\007results\030\001" - " \003(\t\"9\n#xtreemfs_cleanup_is_runningRespo" - "nse\022\022\n\nis_running\030\001 \002(\010\"n\n\035xtreemfs_clea" - "nup_startRequest\022\026\n\016remove_zombies\030\001 \002(\010" - "\022\035\n\025remove_unavail_volume\030\002 \002(\010\022\026\n\016lost_" - "and_found\030\003 \002(\010\"1\n\037xtreemfs_cleanup_stat" - "usResponse\022\016\n\006status\030\001 \002(\t\"\226\001\n\031xtreemfs_" - "rwr_fetchRequest\0229\n\020file_credentials\030\001 \002" - "(\0132\037.xtreemfs.pbrpc.FileCredentials\022\017\n\007f" - "ile_id\030\002 \002(\t\022\025\n\robject_number\030\003 \002(\006\022\026\n\016o" - "bject_version\030\004 \002(\006\"\232\001\n\035xtreemfs_repair_" - "objectRequest\0229\n\020file_credentials\030\001 \002(\0132" + "d\030\002 \002(\t\022\025\n\robject_number\030\003 \002(\006\022\026\n\016object" + "_version\030\004 \002(\006\"\232\001\n\035xtreemfs_repair_objec" + "tRequest\0229\n\020file_credentials\030\001 \002(\0132\037.xtr" + "eemfs.pbrpc.FileCredentials\022\017\n\007file_id\030\002" + " \002(\t\022\025\n\robject_number\030\003 \002(\006\022\026\n\016object_ve" + "rsion\030\004 \002(\006\"N\n\036xtreemfs_rwr_flease_msgRe" + "quest\022\027\n\017sender_hostname\030\001 \002(\t\022\023\n\013sender" + "_port\030\002 \002(\007\"\212\001\n%xtreemfs_rwr_set_primary" + "_epochRequest\0229\n\020file_credentials\030\001 \002(\0132" + "\037.xtreemfs.pbrpc.FileCredentials\022\017\n\007file" + "_id\030\002 \002(\t\022\025\n\rprimary_epoch\030\003 \002(\007\"\207\001\n\032xtr" + "eemfs_rwr_statusRequest\0229\n\020file_credenti" + "als\030\001 \002(\0132\037.xtreemfs.pbrpc.FileCredentia" + "ls\022\017\n\007file_id\030\002 \002(\t\022\035\n\025max_local_obj_ver" + "sion\030\003 \002(\006\"\231\001\n\034xtreemfs_rwr_truncateRequ" + "est\0229\n\020file_credentials\030\001 \002(\0132\037.xtreemfs" + ".pbrpc.FileCredentials\022\017\n\007file_id\030\002 \002(\t\022" + "\025\n\rnew_file_size\030\003 \002(\006\022\026\n\016object_version" + "\030\004 \002(\006\"\347\001\n\032xtreemfs_rwr_updateRequest\0229\n" + "\020file_credentials\030\001 \002(\0132\037.xtreemfs.pbrpc" + ".FileCredentials\022\017\n\007file_id\030\002 \002(\t\022\025\n\rnew" + "_file_size\030\003 \002(\006\022\025\n\robject_number\030\007 \002(\006\022" + "\026\n\016object_version\030\004 \002(\006\022\016\n\006offset\030\005 \002(\007\022" + "\'\n\003obj\030\006 \002(\0132\032.xtreemfs.pbrpc.ObjectData" + "\"o\n!xtreemfs_internal_get_gmaxRequest\0229\n" + "\020file_credentials\030\001 \002(\0132\037.xtreemfs.pbrpc" + ".FileCredentials\022\017\n\007file_id\030\002 \002(\t\"t\n&xtr" + "eemfs_internal_get_file_sizeRequest\0229\n\020f" + "ile_credentials\030\001 \002(\0132\037.xtreemfs.pbrpc.F" + "ileCredentials\022\017\n\007file_id\030\002 \002(\t\"<\n\'xtree" + "mfs_internal_get_file_sizeResponse\022\021\n\tfi" + "le_size\030\001 \002(\006\"\222\002\n#xtreemfs_internal_read" + "_localRequest\0229\n\020file_credentials\030\001 \002(\0132" "\037.xtreemfs.pbrpc.FileCredentials\022\017\n\007file" "_id\030\002 \002(\t\022\025\n\robject_number\030\003 \002(\006\022\026\n\016obje" - "ct_version\030\004 \002(\006\"N\n\036xtreemfs_rwr_flease_" - "msgRequest\022\027\n\017sender_hostname\030\001 \002(\t\022\023\n\013s" - "ender_port\030\002 \002(\007\"\212\001\n%xtreemfs_rwr_set_pr" - "imary_epochRequest\0229\n\020file_credentials\030\001" - " \002(\0132\037.xtreemfs.pbrpc.FileCredentials\022\017\n" - "\007file_id\030\002 \002(\t\022\025\n\rprimary_epoch\030\003 \002(\007\"\207\001" - "\n\032xtreemfs_rwr_statusRequest\0229\n\020file_cre" - "dentials\030\001 \002(\0132\037.xtreemfs.pbrpc.FileCred" - "entials\022\017\n\007file_id\030\002 \002(\t\022\035\n\025max_local_ob" - "j_version\030\003 \002(\006\"\231\001\n\034xtreemfs_rwr_truncat" - "eRequest\0229\n\020file_credentials\030\001 \002(\0132\037.xtr" - "eemfs.pbrpc.FileCredentials\022\017\n\007file_id\030\002" - " \002(\t\022\025\n\rnew_file_size\030\003 \002(\006\022\026\n\016object_ve" - "rsion\030\004 \002(\006\"\347\001\n\032xtreemfs_rwr_updateReque" - "st\0229\n\020file_credentials\030\001 \002(\0132\037.xtreemfs." - "pbrpc.FileCredentials\022\017\n\007file_id\030\002 \002(\t\022\025" - "\n\rnew_file_size\030\003 \002(\006\022\025\n\robject_number\030\007" - " \002(\006\022\026\n\016object_version\030\004 \002(\006\022\016\n\006offset\030\005" - " \002(\007\022\'\n\003obj\030\006 \002(\0132\032.xtreemfs.pbrpc.Objec" - "tData\"o\n!xtreemfs_internal_get_gmaxReque" - "st\0229\n\020file_credentials\030\001 \002(\0132\037.xtreemfs." - "pbrpc.FileCredentials\022\017\n\007file_id\030\002 \002(\t\"t" - "\n&xtreemfs_internal_get_file_sizeRequest" - "\0229\n\020file_credentials\030\001 \002(\0132\037.xtreemfs.pb" - "rpc.FileCredentials\022\017\n\007file_id\030\002 \002(\t\"<\n\'" - "xtreemfs_internal_get_file_sizeResponse\022" - "\021\n\tfile_size\030\001 \002(\006\"\222\002\n#xtreemfs_internal" - "_read_localRequest\0229\n\020file_credentials\030\001" - " \002(\0132\037.xtreemfs.pbrpc.FileCredentials\022\017\n" - "\007file_id\030\002 \002(\t\022\025\n\robject_number\030\003 \002(\006\022\026\n" - "\016object_version\030\004 \002(\006\022\016\n\006offset\030\005 \002(\007\022\016\n" - "\006length\030\006 \002(\007\022\032\n\022attach_object_list\030\007 \002(" - "\010\0224\n\020required_objects\030\010 \003(\0132\032.xtreemfs.p" - "brpc.ObjectList\"u\n\'xtreemfs_internal_get" - "_object_setRequest\0229\n\020file_credentials\030\001" - " \002(\0132\037.xtreemfs.pbrpc.FileCredentials\022\017\n" - "\007file_id\030\002 \002(\t\"=\n)xtreemfs_internal_get_" - "fileid_listResponse\022\020\n\010file_ids\030\001 \003(\t\"t\n" - "\013lockRequest\0229\n\020file_credentials\030\001 \002(\0132\037" - ".xtreemfs.pbrpc.FileCredentials\022*\n\014lock_" - "request\030\002 \002(\0132\024.xtreemfs.pbrpc.Lock\"j\n\025x" - "treemfs_pingMesssage\0227\n\013coordinates\030\001 \002(" - "\0132\".xtreemfs.pbrpc.VivaldiCoordinates\022\030\n" - "\020request_response\030\002 \002(\010\"\246\001\n\036xtreemfs_rwr" - "_auth_stateRequest\0229\n\020file_credentials\030\001" - " \002(\0132\037.xtreemfs.pbrpc.FileCredentials\022\017\n" - "\007file_id\030\002 \002(\t\0228\n\005state\030\003 \002(\0132).xtreemfs" - ".pbrpc.AuthoritativeReplicaState\"\207\001\n\"xtr" - "eemfs_rwr_reset_completeRequest\0229\n\020file_" - "credentials\030\001 \002(\0132\037.xtreemfs.pbrpc.FileC" - "redentials\022\017\n\007file_id\030\002 \002(\t\022\025\n\rprimary_e" - "poch\030\003 \002(\007\"q\n#xtreemfs_xloc_set_invalida" - "teRequest\0229\n\020file_credentials\030\001 \002(\0132\037.xt" - "reemfs.pbrpc.FileCredentials\022\017\n\007file_id\030" - "\002 \002(\t\"i\n$xtreemfs_xloc_set_invalidateRes" - "ponse\022\022\n\nis_primary\030\001 \002(\010\022-\n\006status\030\002 \001(" - "\0132\035.xtreemfs.pbrpc.ReplicaStatus2\277\036\n\nOSD" - "Service\022L\n\004read\022\033.xtreemfs.pbrpc.readReq" - "uest\032\032.xtreemfs.pbrpc.ObjectData\"\013\215\265\030\n\000\000" - "\000\230\265\030\001\022V\n\010truncate\022\037.xtreemfs.pbrpc.trunc" - "ateRequest\032 .xtreemfs.pbrpc.OSDWriteResp" - "onse\"\007\215\265\030\013\000\000\000\022T\n\006unlink\022\".xtreemfs.pbrpc" - ".unlink_osd_Request\032\035.xtreemfs.pbrpc.emp" - "tyResponse\"\007\215\265\030\014\000\000\000\022T\n\005write\022\034.xtreemfs." - "pbrpc.writeRequest\032 .xtreemfs.pbrpc.OSDW" - "riteResponse\"\013\215\265\030\r\000\000\000\240\265\030\001\022q\n\027xtreemfs_br" - "oadcast_gmax\022..xtreemfs.pbrpc.xtreemfs_b" - "roadcast_gmaxRequest\032\035.xtreemfs.pbrpc.em" - "ptyResponse\"\007\215\265\030\024\000\000\000\022j\n\025xtreemfs_check_o" - "bject\022,.xtreemfs.pbrpc.xtreemfs_check_ob" - "jectRequest\032\032.xtreemfs.pbrpc.ObjectData\"" - "\007\215\265\030\025\000\000\000\022{\n\034xtreemfs_cleanup_get_results" - "\022\034.xtreemfs.pbrpc.emptyRequest\0324.xtreemf" - "s.pbrpc.xtreemfs_cleanup_get_resultsResp" - "onse\"\007\215\265\030\036\000\000\000\022y\n\033xtreemfs_cleanup_is_run" - "ning\022\034.xtreemfs.pbrpc.emptyRequest\0323.xtr" - "eemfs.pbrpc.xtreemfs_cleanup_is_runningR" - "esponse\"\007\215\265\030\037\000\000\000\022o\n\026xtreemfs_cleanup_sta" - "rt\022-.xtreemfs.pbrpc.xtreemfs_cleanup_sta" - "rtRequest\032\035.xtreemfs.pbrpc.emptyResponse" - "\"\007\215\265\030 \000\000\000\022q\n\027xtreemfs_cleanup_status\022\034.x" - "treemfs.pbrpc.emptyRequest\032/.xtreemfs.pb" - "rpc.xtreemfs_cleanup_statusResponse\"\007\215\265\030" - "!\000\000\000\022]\n\025xtreemfs_cleanup_stop\022\034.xtreemfs" - ".pbrpc.emptyRequest\032\035.xtreemfs.pbrpc.emp" - "tyResponse\"\007\215\265\030\"\000\000\000\022g\n\037xtreemfs_cleanup_" - "versions_start\022\034.xtreemfs.pbrpc.emptyReq" - "uest\032\035.xtreemfs.pbrpc.emptyResponse\"\007\215\265\030" - "#\000\000\000\022o\n\026xtreemfs_repair_object\022-.xtreemf" - "s.pbrpc.xtreemfs_repair_objectRequest\032\035." - "xtreemfs.pbrpc.emptyResponse\"\007\215\265\030$\000\000\000\022d\n" - "\022xtreemfs_rwr_fetch\022).xtreemfs.pbrpc.xtr" - "eemfs_rwr_fetchRequest\032\032.xtreemfs.pbrpc." - "ObjectData\"\007\215\265\030I\000\000\000\022u\n\027xtreemfs_rwr_flea" - "se_msg\022..xtreemfs.pbrpc.xtreemfs_rwr_fle" - "ase_msgRequest\032\035.xtreemfs.pbrpc.emptyRes" - "ponse\"\013\215\265\030G\000\000\000\240\265\030\001\022^\n\023xtreemfs_rwr_notif" - "y\022\037.xtreemfs.pbrpc.FileCredentials\032\035.xtr" - "eemfs.pbrpc.emptyResponse\"\007\215\265\030K\000\000\000\022|\n\036xt" - "reemfs_rwr_set_primary_epoch\0225.xtreemfs." - "pbrpc.xtreemfs_rwr_set_primary_epochRequ" - "est\032\032.xtreemfs.pbrpc.ObjectData\"\007\215\265\030N\000\000\000" - "\022i\n\023xtreemfs_rwr_status\022*.xtreemfs.pbrpc" - ".xtreemfs_rwr_statusRequest\032\035.xtreemfs.p" - "brpc.ReplicaStatus\"\007\215\265\030L\000\000\000\022m\n\025xtreemfs_" - "rwr_truncate\022,.xtreemfs.pbrpc.xtreemfs_r" - "wr_truncateRequest\032\035.xtreemfs.pbrpc.empt" - "yResponse\"\007\215\265\030J\000\000\000\022m\n\023xtreemfs_rwr_updat" - "e\022*.xtreemfs.pbrpc.xtreemfs_rwr_updateRe" - "quest\032\035.xtreemfs.pbrpc.emptyResponse\"\013\215\265" - "\030H\000\000\000\240\265\030\001\022q\n\027xtreemfs_rwr_auth_state\022..x" - "treemfs.pbrpc.xtreemfs_rwr_auth_stateReq" - "uest\032\035.xtreemfs.pbrpc.emptyResponse\"\007\215\265\030" - "O\000\000\000\022y\n\033xtreemfs_rwr_reset_complete\0222.xt" - "reemfs.pbrpc.xtreemfs_rwr_reset_complete" - "Request\032\035.xtreemfs.pbrpc.emptyResponse\"\007" - "\215\265\030P\000\000\000\022v\n\032xtreemfs_internal_get_gmax\0221." - "xtreemfs.pbrpc.xtreemfs_internal_get_gma" - "xRequest\032\034.xtreemfs.pbrpc.InternalGmax\"\007" - "\215\265\030(\000\000\000\022h\n\032xtreemfs_internal_truncate\022\037." - "xtreemfs.pbrpc.truncateRequest\032 .xtreemf" - "s.pbrpc.OSDWriteResponse\"\007\215\265\030)\000\000\000\022\233\001\n\037xt" - "reemfs_internal_get_file_size\0226.xtreemfs" - ".pbrpc.xtreemfs_internal_get_file_sizeRe" - "quest\0327.xtreemfs.pbrpc.xtreemfs_internal" - "_get_file_sizeResponse\"\007\215\265\030*\000\000\000\022\207\001\n\034xtre" - "emfs_internal_read_local\0223.xtreemfs.pbrp" - "c.xtreemfs_internal_read_localRequest\032)." - "xtreemfs.pbrpc.InternalReadLocalResponse" - "\"\007\215\265\030+\000\000\000\022\200\001\n xtreemfs_internal_get_obje" - "ct_set\0227.xtreemfs.pbrpc.xtreemfs_interna" - "l_get_object_setRequest\032\032.xtreemfs.pbrpc" - ".ObjectList\"\007\215\265\030,\000\000\000\022\205\001\n!xtreemfs_intern" - "al_get_fileid_list\022\034.xtreemfs.pbrpc.empt" - "yRequest\0329.xtreemfs.pbrpc.xtreemfs_inter" - "nal_get_fileid_listResponse\"\007\215\265\030-\000\000\000\022S\n\025" - "xtreemfs_lock_acquire\022\033.xtreemfs.pbrpc.l" - "ockRequest\032\024.xtreemfs.pbrpc.Lock\"\007\215\265\0302\000\000" - "\000\022Q\n\023xtreemfs_lock_check\022\033.xtreemfs.pbrp" - "c.lockRequest\032\024.xtreemfs.pbrpc.Lock\"\007\215\265\030" - "3\000\000\000\022\\\n\025xtreemfs_lock_release\022\033.xtreemfs" - ".pbrpc.lockRequest\032\035.xtreemfs.pbrpc.empt" - "yResponse\"\007\215\265\0304\000\000\000\022f\n\rxtreemfs_ping\022%.xt" - "reemfs.pbrpc.xtreemfs_pingMesssage\032%.xtr" - "eemfs.pbrpc.xtreemfs_pingMesssage\"\007\215\265\030<\000" - "\000\000\022Y\n\021xtreemfs_shutdown\022\034.xtreemfs.pbrpc" - ".emptyRequest\032\035.xtreemfs.pbrpc.emptyResp" - "onse\"\007\215\265\030F\000\000\000\022\222\001\n\034xtreemfs_xloc_set_inva" - "lidate\0223.xtreemfs.pbrpc.xtreemfs_xloc_se" - "t_invalidateRequest\0324.xtreemfs.pbrpc.xtr" - "eemfs_xloc_set_invalidateResponse\"\007\215\265\030Q\000" - "\000\000\022}\n#xtreemfs_rwr_auth_state_invalidate" - "d\022..xtreemfs.pbrpc.xtreemfs_rwr_auth_sta" - "teRequest\032\035.xtreemfs.pbrpc.emptyResponse" - "\"\007\215\265\030R\000\000\000\032\007\225\265\0301u\000\000B(\n&org.xtreemfs.pbrpc" - ".generatedinterfaces", 8980); + "ct_version\030\004 \002(\006\022\016\n\006offset\030\005 \002(\007\022\016\n\006leng" + "th\030\006 \002(\007\022\032\n\022attach_object_list\030\007 \002(\010\0224\n\020" + "required_objects\030\010 \003(\0132\032.xtreemfs.pbrpc." + "ObjectList\"u\n\'xtreemfs_internal_get_obje" + "ct_setRequest\0229\n\020file_credentials\030\001 \002(\0132" + "\037.xtreemfs.pbrpc.FileCredentials\022\017\n\007file" + "_id\030\002 \002(\t\"=\n)xtreemfs_internal_get_filei" + "d_listResponse\022\020\n\010file_ids\030\001 \003(\t\"t\n\013lock" + "Request\0229\n\020file_credentials\030\001 \002(\0132\037.xtre" + "emfs.pbrpc.FileCredentials\022*\n\014lock_reque" + "st\030\002 \002(\0132\024.xtreemfs.pbrpc.Lock\"j\n\025xtreem" + "fs_pingMesssage\0227\n\013coordinates\030\001 \002(\0132\".x" + "treemfs.pbrpc.VivaldiCoordinates\022\030\n\020requ" + "est_response\030\002 \002(\010\"\246\001\n\036xtreemfs_rwr_auth" + "_stateRequest\0229\n\020file_credentials\030\001 \002(\0132" + "\037.xtreemfs.pbrpc.FileCredentials\022\017\n\007file" + "_id\030\002 \002(\t\0228\n\005state\030\003 \002(\0132).xtreemfs.pbrp" + "c.AuthoritativeReplicaState\"\207\001\n\"xtreemfs" + "_rwr_reset_completeRequest\0229\n\020file_crede" + "ntials\030\001 \002(\0132\037.xtreemfs.pbrpc.FileCreden" + "tials\022\017\n\007file_id\030\002 \002(\t\022\025\n\rprimary_epoch\030" + "\003 \002(\007\"q\n#xtreemfs_xloc_set_invalidateReq" + "uest\0229\n\020file_credentials\030\001 \002(\0132\037.xtreemf" + "s.pbrpc.FileCredentials\022\017\n\007file_id\030\002 \002(\t" + "\"i\n$xtreemfs_xloc_set_invalidateResponse" + "\022\022\n\nis_primary\030\001 \002(\010\022-\n\006status\030\002 \001(\0132\035.x" + "treemfs.pbrpc.ReplicaStatus*\215\001\n\017OSDHealt" + "hResult\022\034\n\030OSD_HEALTH_RESULT_PASSED\020\000\022\035\n" + "\031OSD_HEALTH_RESULT_WARNING\020\001\022\034\n\030OSD_HEAL" + "TH_RESULT_FAILED\020\002\022\037\n\033OSD_HEALTH_RESULT_" + "NOT_AVAIL\020\0032\277\036\n\nOSDService\022L\n\004read\022\033.xtr" + "eemfs.pbrpc.readRequest\032\032.xtreemfs.pbrpc" + ".ObjectData\"\013\215\265\030\n\000\000\000\230\265\030\001\022V\n\010truncate\022\037.x" + "treemfs.pbrpc.truncateRequest\032 .xtreemfs" + ".pbrpc.OSDWriteResponse\"\007\215\265\030\013\000\000\000\022T\n\006unli" + "nk\022\".xtreemfs.pbrpc.unlink_osd_Request\032\035" + ".xtreemfs.pbrpc.emptyResponse\"\007\215\265\030\014\000\000\000\022T" + "\n\005write\022\034.xtreemfs.pbrpc.writeRequest\032 ." + "xtreemfs.pbrpc.OSDWriteResponse\"\013\215\265\030\r\000\000\000" + "\240\265\030\001\022q\n\027xtreemfs_broadcast_gmax\022..xtreem" + "fs.pbrpc.xtreemfs_broadcast_gmaxRequest\032" + "\035.xtreemfs.pbrpc.emptyResponse\"\007\215\265\030\024\000\000\000\022" + "j\n\025xtreemfs_check_object\022,.xtreemfs.pbrp" + "c.xtreemfs_check_objectRequest\032\032.xtreemf" + "s.pbrpc.ObjectData\"\007\215\265\030\025\000\000\000\022{\n\034xtreemfs_" + "cleanup_get_results\022\034.xtreemfs.pbrpc.emp" + "tyRequest\0324.xtreemfs.pbrpc.xtreemfs_clea" + "nup_get_resultsResponse\"\007\215\265\030\036\000\000\000\022y\n\033xtre" + "emfs_cleanup_is_running\022\034.xtreemfs.pbrpc" + ".emptyRequest\0323.xtreemfs.pbrpc.xtreemfs_" + "cleanup_is_runningResponse\"\007\215\265\030\037\000\000\000\022o\n\026x" + "treemfs_cleanup_start\022-.xtreemfs.pbrpc.x" + "treemfs_cleanup_startRequest\032\035.xtreemfs." + "pbrpc.emptyResponse\"\007\215\265\030 \000\000\000\022q\n\027xtreemfs" + "_cleanup_status\022\034.xtreemfs.pbrpc.emptyRe" + "quest\032/.xtreemfs.pbrpc.xtreemfs_cleanup_" + "statusResponse\"\007\215\265\030!\000\000\000\022]\n\025xtreemfs_clea" + "nup_stop\022\034.xtreemfs.pbrpc.emptyRequest\032\035" + ".xtreemfs.pbrpc.emptyResponse\"\007\215\265\030\"\000\000\000\022g" + "\n\037xtreemfs_cleanup_versions_start\022\034.xtre" + "emfs.pbrpc.emptyRequest\032\035.xtreemfs.pbrpc" + ".emptyResponse\"\007\215\265\030#\000\000\000\022o\n\026xtreemfs_repa" + "ir_object\022-.xtreemfs.pbrpc.xtreemfs_repa" + "ir_objectRequest\032\035.xtreemfs.pbrpc.emptyR" + "esponse\"\007\215\265\030$\000\000\000\022d\n\022xtreemfs_rwr_fetch\022)" + ".xtreemfs.pbrpc.xtreemfs_rwr_fetchReques" + "t\032\032.xtreemfs.pbrpc.ObjectData\"\007\215\265\030I\000\000\000\022u" + "\n\027xtreemfs_rwr_flease_msg\022..xtreemfs.pbr" + "pc.xtreemfs_rwr_flease_msgRequest\032\035.xtre" + "emfs.pbrpc.emptyResponse\"\013\215\265\030G\000\000\000\240\265\030\001\022^\n" + "\023xtreemfs_rwr_notify\022\037.xtreemfs.pbrpc.Fi" + "leCredentials\032\035.xtreemfs.pbrpc.emptyResp" + "onse\"\007\215\265\030K\000\000\000\022|\n\036xtreemfs_rwr_set_primar" + "y_epoch\0225.xtreemfs.pbrpc.xtreemfs_rwr_se" + "t_primary_epochRequest\032\032.xtreemfs.pbrpc." + "ObjectData\"\007\215\265\030N\000\000\000\022i\n\023xtreemfs_rwr_stat" + "us\022*.xtreemfs.pbrpc.xtreemfs_rwr_statusR" + "equest\032\035.xtreemfs.pbrpc.ReplicaStatus\"\007\215" + "\265\030L\000\000\000\022m\n\025xtreemfs_rwr_truncate\022,.xtreem" + "fs.pbrpc.xtreemfs_rwr_truncateRequest\032\035." + "xtreemfs.pbrpc.emptyResponse\"\007\215\265\030J\000\000\000\022m\n" + "\023xtreemfs_rwr_update\022*.xtreemfs.pbrpc.xt" + "reemfs_rwr_updateRequest\032\035.xtreemfs.pbrp" + "c.emptyResponse\"\013\215\265\030H\000\000\000\240\265\030\001\022q\n\027xtreemfs" + "_rwr_auth_state\022..xtreemfs.pbrpc.xtreemf" + "s_rwr_auth_stateRequest\032\035.xtreemfs.pbrpc" + ".emptyResponse\"\007\215\265\030O\000\000\000\022y\n\033xtreemfs_rwr_" + "reset_complete\0222.xtreemfs.pbrpc.xtreemfs" + "_rwr_reset_completeRequest\032\035.xtreemfs.pb" + "rpc.emptyResponse\"\007\215\265\030P\000\000\000\022v\n\032xtreemfs_i" + "nternal_get_gmax\0221.xtreemfs.pbrpc.xtreem" + "fs_internal_get_gmaxRequest\032\034.xtreemfs.p" + "brpc.InternalGmax\"\007\215\265\030(\000\000\000\022h\n\032xtreemfs_i" + "nternal_truncate\022\037.xtreemfs.pbrpc.trunca" + "teRequest\032 .xtreemfs.pbrpc.OSDWriteRespo" + "nse\"\007\215\265\030)\000\000\000\022\233\001\n\037xtreemfs_internal_get_f" + "ile_size\0226.xtreemfs.pbrpc.xtreemfs_inter" + "nal_get_file_sizeRequest\0327.xtreemfs.pbrp" + "c.xtreemfs_internal_get_file_sizeRespons" + "e\"\007\215\265\030*\000\000\000\022\207\001\n\034xtreemfs_internal_read_lo" + "cal\0223.xtreemfs.pbrpc.xtreemfs_internal_r" + "ead_localRequest\032).xtreemfs.pbrpc.Intern" + "alReadLocalResponse\"\007\215\265\030+\000\000\000\022\200\001\n xtreemf" + "s_internal_get_object_set\0227.xtreemfs.pbr" + "pc.xtreemfs_internal_get_object_setReque" + "st\032\032.xtreemfs.pbrpc.ObjectList\"\007\215\265\030,\000\000\000\022" + "\205\001\n!xtreemfs_internal_get_fileid_list\022\034." + "xtreemfs.pbrpc.emptyRequest\0329.xtreemfs.p" + "brpc.xtreemfs_internal_get_fileid_listRe" + "sponse\"\007\215\265\030-\000\000\000\022S\n\025xtreemfs_lock_acquire" + "\022\033.xtreemfs.pbrpc.lockRequest\032\024.xtreemfs" + ".pbrpc.Lock\"\007\215\265\0302\000\000\000\022Q\n\023xtreemfs_lock_ch" + "eck\022\033.xtreemfs.pbrpc.lockRequest\032\024.xtree" + "mfs.pbrpc.Lock\"\007\215\265\0303\000\000\000\022\\\n\025xtreemfs_lock" + "_release\022\033.xtreemfs.pbrpc.lockRequest\032\035." + "xtreemfs.pbrpc.emptyResponse\"\007\215\265\0304\000\000\000\022f\n" + "\rxtreemfs_ping\022%.xtreemfs.pbrpc.xtreemfs" + "_pingMesssage\032%.xtreemfs.pbrpc.xtreemfs_" + "pingMesssage\"\007\215\265\030<\000\000\000\022Y\n\021xtreemfs_shutdo" + "wn\022\034.xtreemfs.pbrpc.emptyRequest\032\035.xtree" + "mfs.pbrpc.emptyResponse\"\007\215\265\030F\000\000\000\022\222\001\n\034xtr" + "eemfs_xloc_set_invalidate\0223.xtreemfs.pbr" + "pc.xtreemfs_xloc_set_invalidateRequest\0324" + ".xtreemfs.pbrpc.xtreemfs_xloc_set_invali" + "dateResponse\"\007\215\265\030Q\000\000\000\022}\n#xtreemfs_rwr_au" + "th_state_invalidated\022..xtreemfs.pbrpc.xt" + "reemfs_rwr_auth_stateRequest\032\035.xtreemfs." + "pbrpc.emptyResponse\"\007\215\265\030R\000\000\000\032\007\225\265\0301u\000\000B(\n" + "&org.xtreemfs.pbrpc.generatedinterfaces", 9199); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "xtreemfs/OSD.proto", &protobuf_RegisterTypes); InternalGmax::default_instance_ = new InternalGmax(); @@ -1364,6 +1374,22 @@ struct StaticDescriptorInitializer_xtreemfs_2fOSD_2eproto { protobuf_AddDesc_xtreemfs_2fOSD_2eproto(); } } static_descriptor_initializer_xtreemfs_2fOSD_2eproto_; +const ::google::protobuf::EnumDescriptor* OSDHealthResult_descriptor() { + protobuf_AssignDescriptorsOnce(); + return OSDHealthResult_descriptor_; +} +bool OSDHealthResult_IsValid(int value) { + switch(value) { + case 0: + case 1: + case 2: + case 3: + return true; + default: + return false; + } +} + // =================================================================== @@ -3303,6 +3329,7 @@ void TruncateLog::Swap(TruncateLog* other) { #ifndef _MSC_VER const int XLocSetVersionState::kVersionFieldNumber; const int XLocSetVersionState::kInvalidatedFieldNumber; +const int XLocSetVersionState::kModifiedTimeFieldNumber; #endif // !_MSC_VER XLocSetVersionState::XLocSetVersionState() @@ -3323,6 +3350,7 @@ void XLocSetVersionState::SharedCtor() { _cached_size_ = 0; version_ = 0u; invalidated_ = false; + modified_time_ = GOOGLE_ULONGLONG(0); ::memset(_has_bits_, 0, sizeof(_has_bits_)); } @@ -3360,6 +3388,7 @@ void XLocSetVersionState::Clear() { if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { version_ = 0u; invalidated_ = false; + modified_time_ = GOOGLE_ULONGLONG(0); } ::memset(_has_bits_, 0, sizeof(_has_bits_)); mutable_unknown_fields()->Clear(); @@ -3398,6 +3427,22 @@ bool XLocSetVersionState::MergePartialFromCodedStream( } else { goto handle_uninterpreted; } + if (input->ExpectTag(25)) goto parse_modified_time; + break; + } + + // optional fixed64 modified_time = 3; + case 3: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED64) { + parse_modified_time: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED64>( + input, &modified_time_))); + set_has_modified_time(); + } else { + goto handle_uninterpreted; + } if (input->ExpectAtEnd()) return true; break; } @@ -3430,6 +3475,11 @@ void XLocSetVersionState::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->invalidated(), output); } + // optional fixed64 modified_time = 3; + if (has_modified_time()) { + ::google::protobuf::internal::WireFormatLite::WriteFixed64(3, this->modified_time(), output); + } + if (!unknown_fields().empty()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( unknown_fields(), output); @@ -3448,6 +3498,11 @@ void XLocSetVersionState::SerializeWithCachedSizes( target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->invalidated(), target); } + // optional fixed64 modified_time = 3; + if (has_modified_time()) { + target = ::google::protobuf::internal::WireFormatLite::WriteFixed64ToArray(3, this->modified_time(), target); + } + if (!unknown_fields().empty()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); @@ -3469,6 +3524,11 @@ int XLocSetVersionState::ByteSize() const { total_size += 1 + 1; } + // optional fixed64 modified_time = 3; + if (has_modified_time()) { + total_size += 1 + 8; + } + } if (!unknown_fields().empty()) { total_size += @@ -3502,6 +3562,9 @@ void XLocSetVersionState::MergeFrom(const XLocSetVersionState& from) { if (from.has_invalidated()) { set_invalidated(from.invalidated()); } + if (from.has_modified_time()) { + set_modified_time(from.modified_time()); + } } mutable_unknown_fields()->MergeFrom(from.unknown_fields()); } @@ -3528,6 +3591,7 @@ void XLocSetVersionState::Swap(XLocSetVersionState* other) { if (other != this) { std::swap(version_, other->version_); std::swap(invalidated_, other->invalidated_); + std::swap(modified_time_, other->modified_time_); std::swap(_has_bits_[0], other->_has_bits_[0]); _unknown_fields_.Swap(&other->_unknown_fields_); std::swap(_cached_size_, other->_cached_size_); @@ -7444,6 +7508,8 @@ void xtreemfs_cleanup_is_runningResponse::Swap(xtreemfs_cleanup_is_runningRespon const int xtreemfs_cleanup_startRequest::kRemoveZombiesFieldNumber; const int xtreemfs_cleanup_startRequest::kRemoveUnavailVolumeFieldNumber; const int xtreemfs_cleanup_startRequest::kLostAndFoundFieldNumber; +const int xtreemfs_cleanup_startRequest::kDeleteMetadataFieldNumber; +const int xtreemfs_cleanup_startRequest::kMetadataTimeoutFieldNumber; #endif // !_MSC_VER xtreemfs_cleanup_startRequest::xtreemfs_cleanup_startRequest() @@ -7465,6 +7531,8 @@ void xtreemfs_cleanup_startRequest::SharedCtor() { remove_zombies_ = false; remove_unavail_volume_ = false; lost_and_found_ = false; + delete_metadata_ = false; + metadata_timeout_ = 0u; ::memset(_has_bits_, 0, sizeof(_has_bits_)); } @@ -7503,6 +7571,8 @@ void xtreemfs_cleanup_startRequest::Clear() { remove_zombies_ = false; remove_unavail_volume_ = false; lost_and_found_ = false; + delete_metadata_ = false; + metadata_timeout_ = 0u; } ::memset(_has_bits_, 0, sizeof(_has_bits_)); mutable_unknown_fields()->Clear(); @@ -7557,6 +7627,38 @@ bool xtreemfs_cleanup_startRequest::MergePartialFromCodedStream( } else { goto handle_uninterpreted; } + if (input->ExpectTag(32)) goto parse_delete_metadata; + break; + } + + // required bool delete_metadata = 4; + case 4: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_delete_metadata: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &delete_metadata_))); + set_has_delete_metadata(); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(45)) goto parse_metadata_timeout; + break; + } + + // required fixed32 metadata_timeout = 5; + case 5: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { + parse_metadata_timeout: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>( + input, &metadata_timeout_))); + set_has_metadata_timeout(); + } else { + goto handle_uninterpreted; + } if (input->ExpectAtEnd()) return true; break; } @@ -7594,6 +7696,16 @@ void xtreemfs_cleanup_startRequest::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::WriteBool(3, this->lost_and_found(), output); } + // required bool delete_metadata = 4; + if (has_delete_metadata()) { + ::google::protobuf::internal::WireFormatLite::WriteBool(4, this->delete_metadata(), output); + } + + // required fixed32 metadata_timeout = 5; + if (has_metadata_timeout()) { + ::google::protobuf::internal::WireFormatLite::WriteFixed32(5, this->metadata_timeout(), output); + } + if (!unknown_fields().empty()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( unknown_fields(), output); @@ -7617,6 +7729,16 @@ void xtreemfs_cleanup_startRequest::SerializeWithCachedSizes( target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, this->lost_and_found(), target); } + // required bool delete_metadata = 4; + if (has_delete_metadata()) { + target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(4, this->delete_metadata(), target); + } + + // required fixed32 metadata_timeout = 5; + if (has_metadata_timeout()) { + target = ::google::protobuf::internal::WireFormatLite::WriteFixed32ToArray(5, this->metadata_timeout(), target); + } + if (!unknown_fields().empty()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); @@ -7643,6 +7765,16 @@ int xtreemfs_cleanup_startRequest::ByteSize() const { total_size += 1 + 1; } + // required bool delete_metadata = 4; + if (has_delete_metadata()) { + total_size += 1 + 1; + } + + // required fixed32 metadata_timeout = 5; + if (has_metadata_timeout()) { + total_size += 1 + 4; + } + } if (!unknown_fields().empty()) { total_size += @@ -7679,6 +7811,12 @@ void xtreemfs_cleanup_startRequest::MergeFrom(const xtreemfs_cleanup_startReques if (from.has_lost_and_found()) { set_lost_and_found(from.lost_and_found()); } + if (from.has_delete_metadata()) { + set_delete_metadata(from.delete_metadata()); + } + if (from.has_metadata_timeout()) { + set_metadata_timeout(from.metadata_timeout()); + } } mutable_unknown_fields()->MergeFrom(from.unknown_fields()); } @@ -7696,7 +7834,7 @@ void xtreemfs_cleanup_startRequest::CopyFrom(const xtreemfs_cleanup_startRequest } bool xtreemfs_cleanup_startRequest::IsInitialized() const { - if ((_has_bits_[0] & 0x00000007) != 0x00000007) return false; + if ((_has_bits_[0] & 0x0000001f) != 0x0000001f) return false; return true; } @@ -7706,6 +7844,8 @@ void xtreemfs_cleanup_startRequest::Swap(xtreemfs_cleanup_startRequest* other) { std::swap(remove_zombies_, other->remove_zombies_); std::swap(remove_unavail_volume_, other->remove_unavail_volume_); std::swap(lost_and_found_, other->lost_and_found_); + std::swap(delete_metadata_, other->delete_metadata_); + std::swap(metadata_timeout_, other->metadata_timeout_); std::swap(_has_bits_[0], other->_has_bits_[0]); _unknown_fields_.Swap(&other->_unknown_fields_); std::swap(_cached_size_, other->_cached_size_); diff --git a/cpp/generated/xtreemfs/OSD.pb.h b/cpp/generated/xtreemfs/OSD.pb.h index 000d4fcc141c4d9ecab5054c0e5b8706a6043aef..153d018405614a58388b68a3c796a916fc0eb62b 100644 --- a/cpp/generated/xtreemfs/OSD.pb.h +++ b/cpp/generated/xtreemfs/OSD.pb.h @@ -23,6 +23,7 @@ #include #include #include +#include #include #include "include/PBRPC.pb.h" #include "include/Common.pb.h" @@ -79,6 +80,27 @@ class xtreemfs_rwr_reset_completeRequest; class xtreemfs_xloc_set_invalidateRequest; class xtreemfs_xloc_set_invalidateResponse; +enum OSDHealthResult { + OSD_HEALTH_RESULT_PASSED = 0, + OSD_HEALTH_RESULT_WARNING = 1, + OSD_HEALTH_RESULT_FAILED = 2, + OSD_HEALTH_RESULT_NOT_AVAIL = 3 +}; +bool OSDHealthResult_IsValid(int value); +const OSDHealthResult OSDHealthResult_MIN = OSD_HEALTH_RESULT_PASSED; +const OSDHealthResult OSDHealthResult_MAX = OSD_HEALTH_RESULT_NOT_AVAIL; +const int OSDHealthResult_ARRAYSIZE = OSDHealthResult_MAX + 1; + +const ::google::protobuf::EnumDescriptor* OSDHealthResult_descriptor(); +inline const ::std::string& OSDHealthResult_Name(OSDHealthResult value) { + return ::google::protobuf::internal::NameOfEnum( + OSDHealthResult_descriptor(), value); +} +inline bool OSDHealthResult_Parse( + const ::std::string& name, OSDHealthResult* value) { + return ::google::protobuf::internal::ParseNamedEnum( + OSDHealthResult_descriptor(), name, value); +} // =================================================================== class InternalGmax : public ::google::protobuf::Message { @@ -856,20 +878,30 @@ class XLocSetVersionState : public ::google::protobuf::Message { inline bool invalidated() const; inline void set_invalidated(bool value); + // optional fixed64 modified_time = 3; + inline bool has_modified_time() const; + inline void clear_modified_time(); + static const int kModifiedTimeFieldNumber = 3; + inline ::google::protobuf::uint64 modified_time() const; + inline void set_modified_time(::google::protobuf::uint64 value); + // @@protoc_insertion_point(class_scope:xtreemfs.pbrpc.XLocSetVersionState) private: inline void set_has_version(); inline void clear_has_version(); inline void set_has_invalidated(); inline void clear_has_invalidated(); + inline void set_has_modified_time(); + inline void clear_has_modified_time(); ::google::protobuf::UnknownFieldSet _unknown_fields_; ::google::protobuf::uint32 version_; bool invalidated_; + ::google::protobuf::uint64 modified_time_; mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; + ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32]; friend void protobuf_AddDesc_xtreemfs_2fOSD_2eproto(); friend void protobuf_AssignDesc_xtreemfs_2fOSD_2eproto(); @@ -2320,6 +2352,20 @@ class xtreemfs_cleanup_startRequest : public ::google::protobuf::Message { inline bool lost_and_found() const; inline void set_lost_and_found(bool value); + // required bool delete_metadata = 4; + inline bool has_delete_metadata() const; + inline void clear_delete_metadata(); + static const int kDeleteMetadataFieldNumber = 4; + inline bool delete_metadata() const; + inline void set_delete_metadata(bool value); + + // required fixed32 metadata_timeout = 5; + inline bool has_metadata_timeout() const; + inline void clear_metadata_timeout(); + static const int kMetadataTimeoutFieldNumber = 5; + inline ::google::protobuf::uint32 metadata_timeout() const; + inline void set_metadata_timeout(::google::protobuf::uint32 value); + // @@protoc_insertion_point(class_scope:xtreemfs.pbrpc.xtreemfs_cleanup_startRequest) private: inline void set_has_remove_zombies(); @@ -2328,15 +2374,21 @@ class xtreemfs_cleanup_startRequest : public ::google::protobuf::Message { inline void clear_has_remove_unavail_volume(); inline void set_has_lost_and_found(); inline void clear_has_lost_and_found(); + inline void set_has_delete_metadata(); + inline void clear_has_delete_metadata(); + inline void set_has_metadata_timeout(); + inline void clear_has_metadata_timeout(); ::google::protobuf::UnknownFieldSet _unknown_fields_; bool remove_zombies_; bool remove_unavail_volume_; bool lost_and_found_; + bool delete_metadata_; + ::google::protobuf::uint32 metadata_timeout_; mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32]; + ::google::protobuf::uint32 _has_bits_[(5 + 31) / 32]; friend void protobuf_AddDesc_xtreemfs_2fOSD_2eproto(); friend void protobuf_AssignDesc_xtreemfs_2fOSD_2eproto(); @@ -5084,6 +5136,28 @@ inline void XLocSetVersionState::set_invalidated(bool value) { invalidated_ = value; } +// optional fixed64 modified_time = 3; +inline bool XLocSetVersionState::has_modified_time() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +inline void XLocSetVersionState::set_has_modified_time() { + _has_bits_[0] |= 0x00000004u; +} +inline void XLocSetVersionState::clear_has_modified_time() { + _has_bits_[0] &= ~0x00000004u; +} +inline void XLocSetVersionState::clear_modified_time() { + modified_time_ = GOOGLE_ULONGLONG(0); + clear_has_modified_time(); +} +inline ::google::protobuf::uint64 XLocSetVersionState::modified_time() const { + return modified_time_; +} +inline void XLocSetVersionState::set_modified_time(::google::protobuf::uint64 value) { + set_has_modified_time(); + modified_time_ = value; +} + // ------------------------------------------------------------------- // ReplicaStatus @@ -6633,6 +6707,50 @@ inline void xtreemfs_cleanup_startRequest::set_lost_and_found(bool value) { lost_and_found_ = value; } +// required bool delete_metadata = 4; +inline bool xtreemfs_cleanup_startRequest::has_delete_metadata() const { + return (_has_bits_[0] & 0x00000008u) != 0; +} +inline void xtreemfs_cleanup_startRequest::set_has_delete_metadata() { + _has_bits_[0] |= 0x00000008u; +} +inline void xtreemfs_cleanup_startRequest::clear_has_delete_metadata() { + _has_bits_[0] &= ~0x00000008u; +} +inline void xtreemfs_cleanup_startRequest::clear_delete_metadata() { + delete_metadata_ = false; + clear_has_delete_metadata(); +} +inline bool xtreemfs_cleanup_startRequest::delete_metadata() const { + return delete_metadata_; +} +inline void xtreemfs_cleanup_startRequest::set_delete_metadata(bool value) { + set_has_delete_metadata(); + delete_metadata_ = value; +} + +// required fixed32 metadata_timeout = 5; +inline bool xtreemfs_cleanup_startRequest::has_metadata_timeout() const { + return (_has_bits_[0] & 0x00000010u) != 0; +} +inline void xtreemfs_cleanup_startRequest::set_has_metadata_timeout() { + _has_bits_[0] |= 0x00000010u; +} +inline void xtreemfs_cleanup_startRequest::clear_has_metadata_timeout() { + _has_bits_[0] &= ~0x00000010u; +} +inline void xtreemfs_cleanup_startRequest::clear_metadata_timeout() { + metadata_timeout_ = 0u; + clear_has_metadata_timeout(); +} +inline ::google::protobuf::uint32 xtreemfs_cleanup_startRequest::metadata_timeout() const { + return metadata_timeout_; +} +inline void xtreemfs_cleanup_startRequest::set_metadata_timeout(::google::protobuf::uint32 value) { + set_has_metadata_timeout(); + metadata_timeout_ = value; +} + // ------------------------------------------------------------------- // xtreemfs_cleanup_statusResponse @@ -9048,6 +9166,10 @@ inline void xtreemfs_xloc_set_invalidateResponse::set_allocated_status(::xtreemf namespace google { namespace protobuf { +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::xtreemfs::pbrpc::OSDHealthResult>() { + return ::xtreemfs::pbrpc::OSDHealthResult_descriptor(); +} } // namespace google } // namespace protobuf diff --git a/cpp/generated/xtreemfs/OSDServiceClient.h b/cpp/generated/xtreemfs/OSDServiceClient.h index 88d6d2735bf531c13c39353ae95746ce427d3e2d..3f0b144bbf0eb283b297a8c6b33a3206c1549703 100644 --- a/cpp/generated/xtreemfs/OSDServiceClient.h +++ b/cpp/generated/xtreemfs/OSDServiceClient.h @@ -1,5 +1,5 @@ -//automatically generated from OSD.proto at Wed Nov 20 11:39:08 CET 2013 -//(c) 2013. See LICENSE file for details. +//automatically generated from OSD.proto at Wed Nov 12 13:55:48 CET 2014 +//(c) 2014. See LICENSE file for details. #ifndef OSDSERVICECLIENT_H #define OSDSERVICECLIENT_H diff --git a/cpp/generated/xtreemfs/OSDServiceConstants.h b/cpp/generated/xtreemfs/OSDServiceConstants.h index 421a7b82fd5623c561fbc1ae44bdce7c5837917e..dd87c21e5f7a59c228db8b40f2b4b553808f4520 100644 --- a/cpp/generated/xtreemfs/OSDServiceConstants.h +++ b/cpp/generated/xtreemfs/OSDServiceConstants.h @@ -1,5 +1,5 @@ -//automatically generated from OSD.proto at Wed Nov 20 11:39:08 CET 2013 -//(c) 2013. See LICENSE file for details. +//automatically generated from OSD.proto at Wed Nov 12 13:55:48 CET 2014 +//(c) 2014. See LICENSE file for details. #ifndef OSDSERVICECONSTANTS_H_ #define OSDSERVICECONSTANTS_H_ diff --git a/cpp/generated/xtreemfs/get_request_message.cc b/cpp/generated/xtreemfs/get_request_message.cc index 27ec8b270f65cc4a461bfa720e2660b8790076ce..ad87262cea54a266b5d5f112f0988c1f9affb1f9 100644 --- a/cpp/generated/xtreemfs/get_request_message.cc +++ b/cpp/generated/xtreemfs/get_request_message.cc @@ -1,5 +1,5 @@ -//automatically generated at Wed Nov 20 11:42:24 CET 2013 -//(c) 2013. See LICENSE file for details. +//automatically generated at Wed Nov 12 13:55:48 CET 2014 +//(c) 2014. See LICENSE file for details. #include "xtreemfs/get_request_message.h" diff --git a/cpp/generated/xtreemfs/get_request_message.h b/cpp/generated/xtreemfs/get_request_message.h index 7fd73aeaf502acd6f386670295b04b3769e6d8d8..65298664acdd2df8cbd9955af7d5a20f0b9a3def 100644 --- a/cpp/generated/xtreemfs/get_request_message.h +++ b/cpp/generated/xtreemfs/get_request_message.h @@ -1,5 +1,5 @@ -//automatically generated at Wed Nov 20 11:42:24 CET 2013 -//(c) 2013. See LICENSE file for details. +//automatically generated at Wed Nov 12 13:55:48 CET 2014 +//(c) 2014. See LICENSE file for details. #ifndef CPP_GENERATED_XTREEMFS_GET_REQUEST_MESSAGE_H_ #define CPP_GENERATED_XTREEMFS_GET_REQUEST_MESSAGE_H_ diff --git a/cpp/include/ld_preload/environment.h b/cpp/include/ld_preload/environment.h new file mode 100644 index 0000000000000000000000000000000000000000..fb221a5096956f2cd82d9301752e054d29199b0f --- /dev/null +++ b/cpp/include/ld_preload/environment.h @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2014 by Matthias Noack, Zuse Institute Berlin + * + * Licensed under the BSD License, see LICENSE file for details. + * + */ + +#ifndef PRELOAD_ENVIRONMENT_H_ +#define PRELOAD_ENVIRONMENT_H_ + +#include +#include +#include + +#include "libxtreemfs/system_user_mapping_unix.h" +#include "libxtreemfs/volume_implementation.h" + +#include "ld_preload/open_file_table.h" +#include "ld_preload/path.h" +#include "ld_preload/preload_options.h" + +namespace xtreemfs { +class Client; +class VolumeHandle; +} + +class Environment { + public: + Environment(); + ~Environment(); + //xtreemfs::Volume* GetVolume(const std::string& volume_name); + xtreemfs::Volume* GetVolume(); + xtreemfs::SystemUserMappingUnix& GetSystemUserMapping(); + + + xtreemfs::PreloadOptions options_; + xtreemfs::Client* client_; + xtreemfs::Volume* volume_; + std::string volume_name_; + + /** Translates between local and remote usernames and groups. */ + xtreemfs::SystemUserMappingUnix system_user_mapping_; + xtreemfs::pbrpc::UserCredentials user_creds_; + OpenFileTable open_file_table_; +}; + +#endif // PRELOAD_ENVIRONMENT_H_ diff --git a/cpp/include/ld_preload/misc.h b/cpp/include/ld_preload/misc.h new file mode 100644 index 0000000000000000000000000000000000000000..231082405a25927aa8f5e7aeca4294d1f117271a --- /dev/null +++ b/cpp/include/ld_preload/misc.h @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2014 by Matthias Noack, Zuse Institute Berlin + * + * Licensed under the BSD License, see LICENSE file for details. + * + */ + +#ifndef PRELOAD_MISC_H_ +#define PRELOAD_MISC_H_ + +#include +#include +#include + +#include "libxtreemfs/pbrpc_url.h" +#include "xtreemfs/GlobalTypes.pb.h" + +#include "ld_preload/environment.h" +#include "ld_preload/passthrough.h" + +xtreemfs::pbrpc::SYSTEM_V_FCNTL ConvertFlagsUnixToXtreemFS(int flags); +int TranslateMode(const char* mode); +int ConvertXtreemFSErrnoToUnix(xtreemfs::pbrpc::POSIXErrno xtreemfs_errno); + +template +void ConvertXtreemFSStatToUnix(const xtreemfs::pbrpc::Stat& xtreemfs_stat, T* unix_stat, xtreemfs::SystemUserMappingUnix& system_user_mapping) { + unix_stat->st_dev = xtreemfs_stat.dev(); + unix_stat->st_blksize = 8 * 128 * 1024; + unix_stat->st_ino = xtreemfs_stat.ino(); // = fileId + unix_stat->st_mode = xtreemfs_stat.mode(); + unix_stat->st_nlink = xtreemfs_stat.nlink(); + + // Map user- and groupnames. + unix_stat->st_uid = system_user_mapping.UsernameToUID(xtreemfs_stat.user_id()); + unix_stat->st_gid = system_user_mapping.GroupnameToGID(xtreemfs_stat.group_id()); + + unix_stat->st_size = xtreemfs_stat.size(); +#ifdef __linux + unix_stat->st_atim.tv_sec = xtreemfs_stat.atime_ns() / 1000000000; + unix_stat->st_atim.tv_nsec = xtreemfs_stat.atime_ns() % 1000000000; + unix_stat->st_mtim.tv_sec = xtreemfs_stat.mtime_ns() / 1000000000; + unix_stat->st_mtim.tv_nsec = xtreemfs_stat.mtime_ns() % 1000000000; + unix_stat->st_ctim.tv_sec = xtreemfs_stat.ctime_ns() / 1000000000; + unix_stat->st_ctim.tv_nsec = xtreemfs_stat.ctime_ns() % 1000000000; +#elif __APPLE__ + unix_stat->st_atimespec.tv_sec = xtreemfs_stat.atime_ns() / 1000000000; + unix_stat->st_atimespec.tv_nsec = xtreemfs_stat.atime_ns() % 1000000000; + unix_stat->st_mtimespec.tv_sec = xtreemfs_stat.mtime_ns() / 1000000000; + unix_stat->st_mtimespec.tv_nsec = xtreemfs_stat.mtime_ns() % 1000000000; + unix_stat->st_ctimespec.tv_sec = xtreemfs_stat.ctime_ns() / 1000000000; + unix_stat->st_ctimespec.tv_nsec = xtreemfs_stat.ctime_ns() % 1000000000; +#endif + + unix_stat->st_rdev = 0; + unix_stat->st_blocks = xtreemfs_stat.size() / 512; +} + +#endif // PRELOAD_MISC_H_ diff --git a/cpp/include/ld_preload/open_file_table.h b/cpp/include/ld_preload/open_file_table.h new file mode 100644 index 0000000000000000000000000000000000000000..42bc67c2c7d5e1a3dfe05e73863a7676b4b674c8 --- /dev/null +++ b/cpp/include/ld_preload/open_file_table.h @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2014 by Matthias Noack, Zuse Institute Berlin + * + * Licensed under the BSD License, see LICENSE file for details. + * + */ + +#ifndef PRELOAD_OPEN_FILE_TABLE_H_ +#define PRELOAD_OPEN_FILE_TABLE_H_ + +#include +#include +#include +#include + +#include +#include "libxtreemfs/file_handle.h" + +namespace xtreemfs { +class Client; +class VolumeHandle; +} + +class OpenFile { + public: + OpenFile(xtreemfs::FileHandle* fh); + + void Initialise(); + void Deinitialise(); + int GetFileDescriptor(); + + xtreemfs::FileHandle* fh_; + uint64_t offset_; + +private: + FILE * tmp_file_; + int tmp_file_fd_; +}; + +class OpenFileTable { + public: + OpenFileTable(); + ~OpenFileTable(); + + int Register(xtreemfs::FileHandle* handle); + void Unregister(int fd); + OpenFile Get(int fd); + int Set(int fd, xtreemfs::FileHandle* handle); + void SetOffset(int fd, uint64_t offset); + bool Has(int fd); + + private: + boost::mutex mutex_; + typedef std::map FileTable; + FileTable open_files_;// GUARDED_BY(mutex_); + FILE * tmp_file_; + int tmp_file_fd_; + int next_fd_; +}; + +#endif // PRELOAD_OPEN_FILE_TABLE_H_ diff --git a/cpp/include/ld_preload/passthrough.h b/cpp/include/ld_preload/passthrough.h new file mode 100644 index 0000000000000000000000000000000000000000..08a29c1d0d67d37d198e52bf32c25a4d89b4197d --- /dev/null +++ b/cpp/include/ld_preload/passthrough.h @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2014 by Matthias Noack, Zuse Institute Berlin + * + * Licensed under the BSD License, see LICENSE file for details. + * + */ + +#ifndef PRELOAD_PASSTHROUGH_H_ +#define PRELOAD_PASSTHROUGH_H_ + +#include +#include + +typedef int (*funcptr_open)(const char*, int, int); +typedef int (*funcptr_close)(int); + +typedef ssize_t (*funcptr_read)(int, void*, size_t); +typedef ssize_t (*funcptr_write)(int, const void*, size_t); +typedef ssize_t (*funcptr_pread)(int, void*, size_t, off_t); +typedef ssize_t (*funcptr_pwrite)(int, const void*, size_t, off_t); + +typedef int (*funcptr_dup)(int); +typedef int (*funcptr_dup2)(int, int); +typedef off_t (*funcptr_lseek)(int, off_t, int); + +typedef int (*funcptr_stat)(const char*, struct stat*); +typedef int (*funcptr_fstat)(int, struct stat*); +typedef int (*funcptr___xstat)(int, const char*, struct stat*); +typedef int (*funcptr___xstat64)(int, const char*, struct stat64*); +typedef int (*funcptr___fxstat)(int, int, struct stat*); +typedef int (*funcptr___fxstat64)(int, int, struct stat64*); +typedef int (*funcptr___lxstat)(int, const char*, struct stat*); +typedef int (*funcptr___lxstat64)(int, const char*, struct stat64*); + +typedef FILE* (*funcptr_fopen)(const char*, const char*); +typedef int (*funcptr_truncate)(const char*, off_t); +typedef int (*funcptr_ftruncate)(int, off_t); + +typedef int (*funcptr_setxattr)(const char*, const char*, const void*, size_t, int); +typedef int (*funcptr_fsetxattr)(int, const char*, const void*, size_t, int); + + +extern void* libc_open; +extern void* libc_close; +extern void* libc___close; +extern void* libc_pread; +extern void* libc_read; +extern void* libc_write; +extern void* libc_dup; +extern void* libc_dup2; +extern void* libc_lseek; + +extern void* libc_stat; +extern void* libc_fstat; +extern void* libc___xstat; +extern void* libc___xstat64; +extern void* libc___fxstat; +extern void* libc___fxstat64; +extern void* libc___lxstat; +extern void* libc___lxstat64; + +extern void* libc_fopen; +extern void* libc_truncate; +extern void* libc_ftruncate; + +extern void* libattr_setxattr; +extern void* libattr_fsetxattr; + +void initialize_passthrough_if_necessary(); + +#ifdef XTREEMFS_PRELOAD_QUIET + #define xprintf(...) +#else + #define xprintf(...) fprintf(xtreemfs_stdout() ? xtreemfs_stdout() : stdout, __VA_ARGS__) +#endif + +FILE* xtreemfs_stdout(); + +#endif // PRELOAD_PASSTHROUGH_H_ diff --git a/cpp/include/ld_preload/path.h b/cpp/include/ld_preload/path.h new file mode 100644 index 0000000000000000000000000000000000000000..c0e442594309dc0b49c168a0df8b1be8c0e916a8 --- /dev/null +++ b/cpp/include/ld_preload/path.h @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2014 by Matthias Noack, Zuse Institute Berlin + * + * Licensed under the BSD License, see LICENSE file for details. + * + */ + +#ifndef PRELOAD_PATH_H_ +#define PRELOAD_PATH_H_ + +#include + +class Path { + public: + Path(const char* pathname); + + bool IsXtreemFS(); + void Parse(); + const char* GetXtreemFSPath(); + static void SetXtreemFSPrefix(const std::string& prefix); + +private: + static std::string& GetXtreemFSPrefix(); + + const char* pathname_; + const char* xtreemfs_path_; +}; + +#endif // PRELOAD_PATH_H_ diff --git a/cpp/include/ld_preload/preload.h b/cpp/include/ld_preload/preload.h new file mode 100644 index 0000000000000000000000000000000000000000..b70c2348904e62afed91253ea555af643df0f2e5 --- /dev/null +++ b/cpp/include/ld_preload/preload.h @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2014 by Matthias Noack, Zuse Institute Berlin + * + * Licensed under the BSD License, see LICENSE file for details. + * + */ + +#ifndef PRELOAD_PRELOAD_H_ +#define PRELOAD_PRELOAD_H_ + +#include +#include + +#include "ld_preload/environment.h" + +bool overlay_initialized(bool toggle = false); +Environment* get_env(); + +bool is_xtreemfs_fd(int fd); +bool is_xtreemfs_path(const char *path); + +int xtreemfs_open(const char* pathname, int flags, int mode); +int xtreemfs_close(int fd); +uint64_t xtreemfs_pread(int fd, void* buf, uint64_t nbyte, uint64_t offset); +uint64_t xtreemfs_read(int fd, void* buf, uint64_t nbyte); +uint64_t xtreemfs_write(int fd, const void* buf, uint64_t nbyte); +int xtreemfs_dup2(int oldfd, int newfd); +int xtreemfs_dup(int fd); +off_t xtreemfs_lseek(int fd, off_t offset, int mode); +int xtreemfs_stat(const char *path, struct stat *buf); +int xtreemfs_stat64(const char *pathname, struct stat64 *buf); +int xtreemfs_fstat(int fd, struct stat *buf); +int xtreemfs_fstat64(int fd, struct stat64 *buf); + +int xtreemfs_setxattr(const char *pathname, const char *name, const void *value, size_t size, int flags); +int xtreemfs_fsetxattr(int fd, const char *name, const void *value, size_t size, int flags); + +#endif // PRELOAD_PRELOAD_H_ + diff --git a/cpp/include/ld_preload/preload_options.h b/cpp/include/ld_preload/preload_options.h new file mode 100644 index 0000000000000000000000000000000000000000..233919d3d67fdc74ed97584d51df6b2f9d882de4 --- /dev/null +++ b/cpp/include/ld_preload/preload_options.h @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2014 by Matthias Noack, Zuse Institute Berlin + * + * Licensed under the BSD License, see LICENSE file for details. + * + */ + +#ifndef CPP_INCLUDE_LD_PRELOAD_PRELOAD_OPTIONS_H_ +#define CPP_INCLUDE_LD_PRELOAD_PRELOAD_OPTIONS_H_ + +#include "libxtreemfs/options.h" + +#include +#include +#include + +namespace xtreemfs { + +class PreloadOptions : public Options { + public: + /** Sets the default values. */ + PreloadOptions(); + + /** Set options parsed from command line which must contain at least the URL + * to an XtreemFS volume. + * + * Calls Options::ParseCommandLine() to parse general options. + * + * @throws InvalidCommandLineParametersException + * @throws InvalidURLException */ + void ParseCommandLine(int argc, char** argv); + + /** Outputs usage of the command line parameters. */ + virtual std::string ShowCommandLineHelp(); + + // TODO: add preload-specific options here + + private: + /** Contains all available preload options and its descriptions. */ + boost::program_options::options_description preload_descriptions_; +}; + +} // namespace xtreemfs + +#endif // CPP_INCLUDE_LD_PRELOAD_PRELOAD_OPTIONS_H_ diff --git a/cpp/include/libxtreemfs/async_write_handler.h b/cpp/include/libxtreemfs/async_write_handler.h index 95e7ecc7eddd2d6eef1ef0733308f58623f79a3a..0f4be06108f0b55c79b5bb7cf311c5fa358e73f4 100644 --- a/cpp/include/libxtreemfs/async_write_handler.h +++ b/cpp/include/libxtreemfs/async_write_handler.h @@ -65,7 +65,8 @@ class AsyncWriteHandler xtreemfs::pbrpc::OSDServiceClient* osd_service_client, const xtreemfs::pbrpc::Auth& auth_bogus, const xtreemfs::pbrpc::UserCredentials& user_credentials_bogus, - const Options& volume_options); + const Options& volume_options, + util::SynchronizedQueue& callback_queue_); ~AsyncWriteHandler(); @@ -91,7 +92,7 @@ class AsyncWriteHandler /** This static method runs in its own thread and does the real callback * handling to avoid load and blocking on the RPC thread. */ - static void ProcessCallbacks(); + static void ProcessCallbacks(util::SynchronizedQueue& callback_queue); private: /** Possible states of this object. */ @@ -290,9 +291,8 @@ class AsyncWriteHandler /** The write buffer to whom the worst_error_ belongs. */ AsyncWriteBuffer* worst_write_buffer_; - /** Holds the Callbacks enqueued be CallFinished() (producer). They are - * processed by ProcessCallbacks(consumer), running in its own thread. */ - static util::SynchronizedQueue callback_queue; + /** Used by CallFinished (enqueue) */ + util::SynchronizedQueue& callback_queue_; }; } // namespace xtreemfs diff --git a/cpp/include/libxtreemfs/client.h b/cpp/include/libxtreemfs/client.h index 9ae79b6a1e223b09732ceb1aba7f1ec5744535f3..c6f64935645330898f08ec7e44848c21ae0f47ad 100644 --- a/cpp/include/libxtreemfs/client.h +++ b/cpp/include/libxtreemfs/client.h @@ -139,6 +139,7 @@ class Client { const std::string& owner_username, const std::string& owner_groupname, const xtreemfs::pbrpc::AccessControlPolicyType& access_policy_type, + long quota, const xtreemfs::pbrpc::StripingPolicyType& default_striping_policy_type, int default_stripe_size, int default_stripe_width, diff --git a/cpp/include/libxtreemfs/client_implementation.h b/cpp/include/libxtreemfs/client_implementation.h index 09909675a4a854f0712812427741fe713a2d2361..caf7d8727f16b366cff65561f2cda63de342d28f 100644 --- a/cpp/include/libxtreemfs/client_implementation.h +++ b/cpp/include/libxtreemfs/client_implementation.h @@ -19,6 +19,8 @@ #include "libxtreemfs/simple_uuid_iterator.h" #include "libxtreemfs/typedefs.h" #include "libxtreemfs/uuid_resolver.h" +#include "util/synchronized_queue.h" +#include "libxtreemfs/async_write_handler.h" namespace boost { class thread; @@ -112,6 +114,7 @@ class ClientImplementation : public Client { const std::string& owner_username, const std::string& owner_groupname, const pbrpc::AccessControlPolicyType& access_policy, + long volume_quota, const pbrpc::StripingPolicyType& default_striping_policy_type, int default_stripe_size, int default_stripe_width, @@ -133,6 +136,8 @@ class ClientImplementation : public Client { const pbrpc::VivaldiCoordinates& GetVivaldiCoordinates() const; + util::SynchronizedQueue& GetAsyncWriteCallbackQueue(); + private: /** True if Shutdown() was executed. */ bool was_shutdown_; @@ -166,6 +171,9 @@ class ClientImplementation : public Client { /** Thread that handles the callbacks for asynchronous writes. */ boost::scoped_ptr async_write_callback_thread_; + /** Holds the Callbacks enqueued be CallFinished() (producer). They are + * processed by ProcessCallbacks(consumer), running in its own thread. */ + util::SynchronizedQueue async_write_callback_queue_; FRIEND_TEST(rpc::ClientTestFastLingerTimeout, LingerTests); FRIEND_TEST(rpc::ClientTestFastLingerTimeoutConnectTimeout, LingerTests); diff --git a/cpp/include/libxtreemfs/helper.h b/cpp/include/libxtreemfs/helper.h index fda99013f5b4933409d7c93abd2744ccb2726571..2fcc7c6a591102b8544336793255238be3994bd0 100644 --- a/cpp/include/libxtreemfs/helper.h +++ b/cpp/include/libxtreemfs/helper.h @@ -13,6 +13,8 @@ #include #include +#include "xtreemfs/GlobalTypes.pb.h" + #include #ifdef __linux__ @@ -70,6 +72,9 @@ std::string GetOSDUUIDFromXlocSet(const xtreemfs::pbrpc::XLocSet& xlocs, /** Returns UUID of the head OSD (block = 0) of the first replica (r = 0). */ std::string GetOSDUUIDFromXlocSet(const xtreemfs::pbrpc::XLocSet& xlocs); +/** Convert StripePolicyType to string */ +std::string StripePolicyTypeToString(xtreemfs::pbrpc::StripingPolicyType policy); + /** Generates a random UUID (needed to distinguish clients for locks). */ void GenerateVersion4UUID(std::string* result); @@ -138,6 +143,11 @@ boost::unordered_set GetNetworks(); std::string GetNetworkStringUnix(const struct ifaddrs* ifaddr); #endif // __linux__ +/** + * Parses human-readable byte numbers to byte counts + */ +long parseByteNumber(std::string byte_number); + } // namespace xtreemfs #endif // CPP_INCLUDE_LIBXTREEMFS_HELPER_H_ diff --git a/cpp/include/libxtreemfs/options.h b/cpp/include/libxtreemfs/options.h index f1c994a93007f64824d6706a0d3c12e418aa995a..d15f032dad49e519cca9a97903e30c800260080e 100644 --- a/cpp/include/libxtreemfs/options.h +++ b/cpp/include/libxtreemfs/options.h @@ -221,6 +221,9 @@ class Options { /** Skewness of the Zipf distribution used for vivaldi OSD selection */ double vivaldi_zipf_generator_skew; + /** May contain all previous options in key=value pair lists. */ + std::vector alternative_options_list; + // Internal options, not available from the command line interface. /** If not NULL, called to find out if request was interrupted. */ CheckIfInterruptedQueryFunction was_interrupted_function; @@ -299,6 +302,9 @@ class Options { /** Deprecated options which are kept to ensure backward compatibility. */ boost::program_options::options_description deprecated_options_; + + /** Specify all previous options in key=value pair lists. */ + boost::program_options::options_description alternative_options_; }; } // namespace xtreemfs diff --git a/cpp/include/libxtreemfs/pbrpc_url.h b/cpp/include/libxtreemfs/pbrpc_url.h index 49235e315dac4edfa2c5a8b7b11a0338da4eb5f5..d672ad6f18458b30171c06e9d5180fe6dae7216a 100644 --- a/cpp/include/libxtreemfs/pbrpc_url.h +++ b/cpp/include/libxtreemfs/pbrpc_url.h @@ -20,11 +20,6 @@ namespace xtreemfs { class PBRPCURL { public: - static const std::string SCHEME_PBRPC; - static const std::string SCHEME_PBRPCG; - static const std::string SCHEME_PBRPCS; - static const std::string SCHEME_PBRPCU; - PBRPCURL(); /** Parses the URL of the form [scheme://]host[:port][/volume]. @@ -50,6 +45,23 @@ class PBRPCURL { ServiceAddresses GetAddresses() const; + static const std::string& GetSchemePBRPC() { + static const std::string SCHEME_PBRPC_STRING = "pbrpc"; + return SCHEME_PBRPC_STRING; + } + static const std::string& GetSchemePBRPCS() { + static const std::string SCHEME_PBRPCS_STRING = "pbrpcs"; + return SCHEME_PBRPCS_STRING; + } + static const std::string& GetSchemePBRPCG() { + static const std::string SCHEME_PBRPCG_STRING = "pbrpcg"; + return SCHEME_PBRPCG_STRING; + } + static const std::string GetSchemePBRPCU() { + static const std::string SCHEME_PBRPCU_STRING = "pbrpcu"; + return SCHEME_PBRPCU_STRING; + } + private: /** List of servers (hostnames only) */ typedef std::list ServerList; diff --git a/cpp/include/mkfs.xtreemfs/mkfs_options.h b/cpp/include/mkfs.xtreemfs/mkfs_options.h index 2cd0950cc83dc6ad020bca7529f2ff6feba11ead..9db5d01f6462679adac25051308f3a77cb0b234a 100644 --- a/cpp/include/mkfs.xtreemfs/mkfs_options.h +++ b/cpp/include/mkfs.xtreemfs/mkfs_options.h @@ -66,6 +66,9 @@ class MkfsOptions : public Options { /** Volume mode in octal form as specified at the command line. */ int volume_mode_octal; + /** Quota of the volume*/ + std::string volume_quota; + /** Name of the owner of the new volume. */ std::string owner_username; diff --git a/cpp/include/xtfsutil/xtfsutil_server.h b/cpp/include/xtfsutil/xtfsutil_server.h index 1585c489c2121b61304ea3f9c36cd48f4ff70880..b04ff2a9d638f20b8bc37ddbfa317d642975fcb0 100644 --- a/cpp/include/xtfsutil/xtfsutil_server.h +++ b/cpp/include/xtfsutil/xtfsutil_server.h @@ -221,6 +221,10 @@ class XtfsUtilServer { const Json::Value& input, Json::Value* output); + void OpSetVolumeQuota(const xtreemfs::pbrpc::UserCredentials& uc, + const Json::Value& input, + Json::Value* output); + /** Mutex to protect xctl_files_. */ boost::mutex xctl_files_mutex_; /** Map of xctl pseudo files. */ diff --git a/cpp/src/example_libxtreemfs/example_replication.cpp b/cpp/src/example_libxtreemfs/example_replication.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6a7468ce6ac5f505cd15f70efb9e69c2a314ff67 --- /dev/null +++ b/cpp/src/example_libxtreemfs/example_replication.cpp @@ -0,0 +1,171 @@ +/* + * Copyright (c) 2011 by Michael Berlin, Zuse Institute Berlin + * + * Licensed under the BSD License, see LICENSE file for details. + * + */ + +#include + +#include +#include +#include + +#include "libxtreemfs/client.h" +#include "libxtreemfs/file_handle.h" +#include "libxtreemfs/options.h" +#include "libxtreemfs/volume.h" +#include "libxtreemfs/xtreemfs_exception.h" +#include "pbrpc/RPC.pb.h" // xtreemfs::pbrpc::UserCredentials +#include "xtreemfs/MRC.pb.h" // xtreemfs::pbrpc::Stat + +using namespace std; + +int main(int argc, char* argv[]) { + // Every operation is executed in the context of a given user and his groups. + // The UserCredentials object does store this information and is currently + // (08/2011) *only* evaluated by the MRC (although the protocol requires to + // send user_credentials to DIR and OSD, too). + xtreemfs::pbrpc::UserCredentials user_credentials; + user_credentials.set_username("example_libxtreemfs"); + user_credentials.add_groups("example_libxtreemfs"); + + // Class which allows to change options of the library. + xtreemfs::Options options; + + try { + options.ParseCommandLine(argc, argv); + } catch(const xtreemfs::XtreemFSException& e) { + cout << "Invalid parameters found, error: " << e.what() << endl << endl; + return 1; + } + + xtreemfs::Client* client = NULL; + xtreemfs::FileHandle* file = NULL; + int return_code = 0; + try { + // Create a new instance of a client using the DIR service at + // localhost because we need extended priviliges. + // This requires the DIR with etc/xos/xtreemfs/dirconfig.test, + // an OSD with osdconfig.test, an OSD with osdconfig2.test and + // an MRC with mrcconfig.test, all of them on localhost. + client = xtreemfs::Client::CreateClient( + "localhost:32638", + user_credentials, + NULL, // No SSL options. + options); + + // Start the client (a connection to the DIR service will be setup). + client->Start(); + + // setup the auth object + xtreemfs::pbrpc::Auth auth = xtreemfs::pbrpc::Auth::default_instance(); + auth.set_auth_type(xtreemfs::pbrpc::AUTH_NONE); + + // Create a new volume named 'demo'. + xtreemfs::pbrpc::Volumes *volumes = client->ListVolumes("localhost:32636", auth); + bool has_volume = false; + for(int i = 0; i < volumes->volumes_size() && !has_volume; ++i) { + has_volume = volumes->volumes(i).name().compare("demo") == 0; + } + if(has_volume) { + client->DeleteVolume("localhost:32636", auth, user_credentials, "demo"); + } + client->CreateVolume("localhost:32636", auth, user_credentials, "demo"); + + // Open the volume. + xtreemfs::Volume *volume = NULL; + volume = client->OpenVolume("demo", + NULL, // No SSL options. + options); + + // Open a file. + file = volume->OpenFile(user_credentials, + "/example_replication.txt", + static_cast( + xtreemfs::pbrpc::SYSTEM_V_FCNTL_H_O_CREAT | + xtreemfs::pbrpc::SYSTEM_V_FCNTL_H_O_TRUNC | + xtreemfs::pbrpc::SYSTEM_V_FCNTL_H_O_RDWR), + 511); // = 777 Octal. + + // Write to file. + cout << "Writing the string\n" + "\n" + "\t\"Replication Example.\"\n" + "\n" + "to the file example_replication.txt..." << endl; + char write_buf[] = "Replication Example."; + file->Write(reinterpret_cast(&write_buf), + sizeof(write_buf), + 0); + + cout << endl << "Closing /example_replication.txt... "; + file->Close(); + file = NULL; + cout << "ok!" << endl; + + // mark the file as read-only + cout << endl << "Marking /example_replication.txt read only... "; + volume->SetXAttr(user_credentials, "/example_replication.txt", "xtreemfs.read_only", "true", xtreemfs::pbrpc::XATTR_FLAGS_CREATE); + cout << "ok!" << endl; + + // list replica(s) and their OSD(s) + // we expect one replica and one OSD here because we created a new volume above + xtreemfs::pbrpc::Replicas* replicas = volume->ListReplicas(user_credentials, "/example_replication.txt"); + const int repls = replicas->replicas_size(); + cout << endl << repls << " replica(s) for /example_replication.txt:" << endl; + for(int i = 0; i < repls; ++i) { + xtreemfs::pbrpc::Replica replica = replicas->replicas(i); + const int osds = replica.osd_uuids_size(); + cout << "\t" << osds << " OSD(s) for replica " << i << ":"; + for(int j = 0; j < osds; ++j) { + cout << " " << replica.osd_uuids(j); + } + cout << endl; + } + + // grab one suitable OSD which we can use for manual replication of the file + list osd_uuids; + volume->GetSuitableOSDs(user_credentials, "/example_replication.txt", 1, &osd_uuids); + + // replicate to second OSD if available + if(osd_uuids.size() > 0) { + string osd_uuid = osd_uuids.front(); + cout << endl << "Replicating to suitable OSD " << osd_uuid << "... "; + + // add replication + xtreemfs::pbrpc::Replica replica; + replica.add_osd_uuids(osd_uuid); + + // read-only files have partial replication by default, we want full + replica.set_replication_flags(xtreemfs::pbrpc::REPL_FLAG_FULL_REPLICA | xtreemfs::pbrpc::REPL_FLAG_STRATEGY_RAREST_FIRST); + xtreemfs::pbrpc::StripingPolicy *striping = new xtreemfs::pbrpc::StripingPolicy; + striping->set_type(xtreemfs::pbrpc::STRIPING_POLICY_RAID0); + striping->set_stripe_size(128); + striping->set_width(1); + replica.set_allocated_striping_policy(striping); + + volume->AddReplica(user_credentials, "/example_replication.txt", replica); + cout << "ok!" << endl; + } else { + cout << endl << "No second OSD found for replication." << endl; + } + + } catch(const xtreemfs::XtreemFSException& e) { + cout << "An error occurred:\n" << e.what() << endl; + return_code = 1; + } + + if (file != NULL) { + // Close the file (no need to delete it, see documentation volume.h). + file->Close(); + } + + if (client != NULL) { + // Shutdown() does also invoke a volume->Close(). + client->Shutdown(); + delete client; + } + + return return_code; +} diff --git a/cpp/src/fuse/fuse_adapter.cpp b/cpp/src/fuse/fuse_adapter.cpp index ab2551217ff5cc49ef855c41e0f790f504e0abc0..76590d1f4b290f4d0359dd404d3f3daa82d858c3 100644 --- a/cpp/src/fuse/fuse_adapter.cpp +++ b/cpp/src/fuse/fuse_adapter.cpp @@ -449,6 +449,8 @@ int FuseAdapter::ConvertXtreemFSErrnoToFuse( return ENOTEMPTY; case POSIX_ERROR_ENODATA: return ENODATA; + case POSIX_ERROR_ENOSPC: + return ENOSPC; default: return xtreemfs_errno; @@ -1440,6 +1442,23 @@ int FuseAdapter::setxattr( UserCredentials user_credentials; GenerateUserCredentials(fuse_get_context(), &user_credentials); + // Ignore system attributes to avoid warnings while copying files (e.g. on OS X) + if (string(name) == string("xtreemfs.file_id") || + string(name) == string("xtreemfs.owner") || + string(name) == string("xtreemfs.group") || + string(name) == string("xtreemfs.url") || + string(name) == string("xtreemfs.object_type") || + string(name) == string("xtreemfs.acl") || + string(name) == string("xtreemfs.locations")) { + + if (Logging::log->loggingActive(LEVEL_WARN)) { + Logging::log->getLog(LEVEL_WARN) + << "Skipped setting immutable system attribute " << name << endl; + } + + return 0; + } + try { // Fuse reuses the value parameter. Therefore we may only use "size" // (null-termination is not counted) characters of value. diff --git a/cpp/src/fuse/fuse_options.cpp b/cpp/src/fuse/fuse_options.cpp index 41c6ec93692406626817232eb019a99c914c825e..c732b5b7700465e9d5c7305c73a1170d8d6d3d32 100644 --- a/cpp/src/fuse/fuse_options.cpp +++ b/cpp/src/fuse/fuse_options.cpp @@ -70,7 +70,8 @@ FuseOptions::FuseOptions() : Options(), fuse_descriptions_("Fuse Options") { "Do not fork into background.") ("fuse_option,o", po::value< vector >(&fuse_options), - "Passes -o=