Merge pull request #37 from mingnus/v0.5.6-fix
Several patches for v0.5.6
This commit is contained in:
commit
4222a3f850
@ -93,14 +93,17 @@ SOURCE=\
|
|||||||
|
|
||||||
CC:=@CC@
|
CC:=@CC@
|
||||||
CXX:=@CXX@
|
CXX:=@CXX@
|
||||||
|
STRIP:=@STRIP@
|
||||||
OBJECTS:=$(subst .cc,.o,$(SOURCE))
|
OBJECTS:=$(subst .cc,.o,$(SOURCE))
|
||||||
TOP_DIR:=@top_srcdir@
|
TOP_DIR:=@top_srcdir@
|
||||||
TOP_BUILDDIR:=@top_builddir@
|
TOP_BUILDDIR:=@top_builddir@
|
||||||
CFLAGS+=-g -Wall -O3
|
CFLAGS+=-g -Wall -O3
|
||||||
|
CFLAGS+=@LFS_FLAGS@
|
||||||
CXXFLAGS+=-g -Wall -fno-strict-aliasing
|
CXXFLAGS+=-g -Wall -fno-strict-aliasing
|
||||||
CXXFLAGS+=@CXXOPTIMISE_FLAG@
|
CXXFLAGS+=@CXXOPTIMISE_FLAG@
|
||||||
CXXFLAGS+=@CXXDEBUG_FLAG@
|
CXXFLAGS+=@CXXDEBUG_FLAG@
|
||||||
CXXFLAGS+=@CXX_STRERROR_FLAG@
|
CXXFLAGS+=@CXX_STRERROR_FLAG@
|
||||||
|
CXXFLAGS+=@LFS_FLAGS@
|
||||||
INCLUDES+=-I$(TOP_BUILDDIR) -I$(TOP_DIR) -I$(TOP_DIR)/thin-provisioning
|
INCLUDES+=-I$(TOP_BUILDDIR) -I$(TOP_DIR) -I$(TOP_DIR)/thin-provisioning
|
||||||
LIBS:=-lstdc++ -laio -lexpat
|
LIBS:=-lstdc++ -laio -lexpat
|
||||||
INSTALL:=@INSTALL@
|
INSTALL:=@INSTALL@
|
||||||
@ -112,7 +115,7 @@ MANPATH:=$(DATADIR)/man
|
|||||||
vpath %.cc $(TOP_DIR)
|
vpath %.cc $(TOP_DIR)
|
||||||
|
|
||||||
INSTALL_DIR = $(INSTALL) -m 755 -d
|
INSTALL_DIR = $(INSTALL) -m 755 -d
|
||||||
INSTALL_PROGRAM = $(INSTALL) -m 755 -s
|
INSTALL_PROGRAM = $(INSTALL) -m 755
|
||||||
INSTALL_DATA = $(INSTALL) -p -m 644
|
INSTALL_DATA = $(INSTALL) -p -m 644
|
||||||
|
|
||||||
ifeq ("@TESTING@", "yes")
|
ifeq ("@TESTING@", "yes")
|
||||||
@ -165,6 +168,7 @@ distclean: clean
|
|||||||
install: bin/pdata_tools
|
install: bin/pdata_tools
|
||||||
$(INSTALL_DIR) $(BINDIR)
|
$(INSTALL_DIR) $(BINDIR)
|
||||||
$(INSTALL_PROGRAM) bin/pdata_tools $(BINDIR)
|
$(INSTALL_PROGRAM) bin/pdata_tools $(BINDIR)
|
||||||
|
$(STRIP) $(BINDIR)/pdata_tools
|
||||||
ln -s -f pdata_tools $(BINDIR)/cache_check
|
ln -s -f pdata_tools $(BINDIR)/cache_check
|
||||||
ln -s -f pdata_tools $(BINDIR)/cache_dump
|
ln -s -f pdata_tools $(BINDIR)/cache_dump
|
||||||
ln -s -f pdata_tools $(BINDIR)/cache_metadata_size
|
ln -s -f pdata_tools $(BINDIR)/cache_metadata_size
|
||||||
|
14
configure.ac
14
configure.ac
@ -41,6 +41,19 @@ AC_PROG_LN_S
|
|||||||
AC_PROG_MAKE_SET
|
AC_PROG_MAKE_SET
|
||||||
AC_PROG_MKDIR_P
|
AC_PROG_MKDIR_P
|
||||||
AC_PROG_INSTALL
|
AC_PROG_INSTALL
|
||||||
|
AC_DEFUN([AC_PROG_STRIP], [AC_CHECK_TOOL(STRIP, strip, :)])
|
||||||
|
AC_PROG_STRIP
|
||||||
|
AC_ARG_VAR(STRIP, [Command for discarding symbols from object files])
|
||||||
|
|
||||||
|
################################################################
|
||||||
|
dnl -- Check for large file support
|
||||||
|
AC_SYS_LARGEFILE
|
||||||
|
if test x$ac_cv_sys_file_offset_bits = x64; then
|
||||||
|
LFS_FLAGS+="-D_FILE_OFFSET_BITS=64"
|
||||||
|
fi
|
||||||
|
if test x$ac_cv_sys_large_files = x1; then
|
||||||
|
LFS_FLAGS+="-D_LARGE_FILES"
|
||||||
|
fi
|
||||||
|
|
||||||
################################################################
|
################################################################
|
||||||
dnl -- Checks for functions.
|
dnl -- Checks for functions.
|
||||||
@ -144,6 +157,7 @@ VERSION_PATCHLEVEL=`echo "$VER" | $AWK -F '[[(.]]' '{print $3}'`
|
|||||||
AC_SUBST(CXXDEBUG_FLAG)
|
AC_SUBST(CXXDEBUG_FLAG)
|
||||||
AC_SUBST(CXXOPTIMISE_FLAG)
|
AC_SUBST(CXXOPTIMISE_FLAG)
|
||||||
AC_SUBST(CXX_STRERROR_FLAG)
|
AC_SUBST(CXX_STRERROR_FLAG)
|
||||||
|
AC_SUBST(LFS_FLAGS)
|
||||||
AC_SUBST(INSTALL)
|
AC_SUBST(INSTALL)
|
||||||
AC_SUBST(prefix)
|
AC_SUBST(prefix)
|
||||||
AC_SUBST(RELEASE_DATE)
|
AC_SUBST(RELEASE_DATE)
|
||||||
|
@ -197,6 +197,7 @@ namespace persistent_data {
|
|||||||
|
|
||||||
error_outcome error_accessing_node(node_location const &l, block_address b,
|
error_outcome error_accessing_node(node_location const &l, block_address b,
|
||||||
std::string const &what) {
|
std::string const &what) {
|
||||||
|
update_path(l.path);
|
||||||
report_damage(what);
|
report_damage(what);
|
||||||
return btree<Levels, ValueTraits>::visitor::EXCEPTION_HANDLED;
|
return btree<Levels, ValueTraits>::visitor::EXCEPTION_HANDLED;
|
||||||
}
|
}
|
||||||
|
@ -109,7 +109,7 @@ metadata::metadata(std::string const &dev_path, open_type ot,
|
|||||||
sb_.data_mapping_root_ = mappings_->get_root();
|
sb_.data_mapping_root_ = mappings_->get_root();
|
||||||
sb_.device_details_root_ = details_->get_root();
|
sb_.device_details_root_ = details_->get_root();
|
||||||
sb_.data_block_size_ = data_block_size;
|
sb_.data_block_size_ = data_block_size;
|
||||||
sb_.metadata_block_size_ = MD_BLOCK_SIZE;
|
sb_.metadata_block_size_ = MD_BLOCK_SIZE >> SECTOR_SHIFT;
|
||||||
sb_.metadata_nr_blocks_ = tm_->get_bm()->get_nr_blocks();
|
sb_.metadata_nr_blocks_ = tm_->get_bm()->get_nr_blocks();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@ -177,7 +177,7 @@ metadata::metadata(block_manager<>::ptr bm, open_type ot,
|
|||||||
sb_.data_mapping_root_ = mappings_->get_root();
|
sb_.data_mapping_root_ = mappings_->get_root();
|
||||||
sb_.device_details_root_ = details_->get_root();
|
sb_.device_details_root_ = details_->get_root();
|
||||||
sb_.data_block_size_ = data_block_size;
|
sb_.data_block_size_ = data_block_size;
|
||||||
sb_.metadata_block_size_ = MD_BLOCK_SIZE;
|
sb_.metadata_block_size_ = MD_BLOCK_SIZE >> SECTOR_SHIFT;
|
||||||
sb_.metadata_nr_blocks_ = tm_->get_bm()->get_nr_blocks();
|
sb_.metadata_nr_blocks_ = tm_->get_bm()->get_nr_blocks();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -50,7 +50,8 @@ namespace {
|
|||||||
in_superblock_ = true;
|
in_superblock_ = true;
|
||||||
nr_data_blocks_ = nr_data_blocks;
|
nr_data_blocks_ = nr_data_blocks;
|
||||||
superblock &sb = md_->sb_;
|
superblock &sb = md_->sb_;
|
||||||
memcpy(&sb.uuid_, &uuid, sizeof(sb.uuid_));
|
memset(&sb.uuid_, 0, sizeof(sb.uuid_));
|
||||||
|
memcpy(&sb.uuid_, uuid.c_str(), std::min(sizeof(sb.uuid_), uuid.length()));
|
||||||
sb.time_ = time;
|
sb.time_ = time;
|
||||||
sb.trans_id_ = trans_id;
|
sb.trans_id_ = trans_id;
|
||||||
sb.data_block_size_ = data_block_size;
|
sb.data_block_size_ = data_block_size;
|
||||||
|
@ -6,6 +6,10 @@
|
|||||||
|
|
||||||
#undef BLOCK_SIZE
|
#undef BLOCK_SIZE
|
||||||
|
|
||||||
|
#ifndef BLKDISCARD
|
||||||
|
#define BLKDISCARD _IO(0x12,119)
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "thin-provisioning/commands.h"
|
#include "thin-provisioning/commands.h"
|
||||||
#include "metadata.h"
|
#include "metadata.h"
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user