Merge branch '2015-08-19-thin-show-duplicates' into merge-thin-ls
Conflicts: Makefile.in block-cache/block_cache.h main.cc thin-provisioning/commands.h
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
#ifndef BLOCK_CACHE_H
|
||||
#define BLOCK_CACHE_H
|
||||
|
||||
#include "base/container_of.h"
|
||||
|
||||
#include <boost/intrusive/list.hpp>
|
||||
#include <boost/intrusive/set.hpp>
|
||||
#include <boost/noncopyable.hpp>
|
||||
@@ -13,26 +15,12 @@
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
|
||||
namespace bi = boost::intrusive;
|
||||
|
||||
//----------------------------------------------------------------
|
||||
|
||||
// FIXME: move to own file in base
|
||||
template<class P, class M>
|
||||
size_t offsetof__(const M P::*member)
|
||||
{
|
||||
return (size_t) &( reinterpret_cast<P*>(0)->*member);
|
||||
}
|
||||
|
||||
template<class P, class M>
|
||||
P *container_of(M *ptr, M const P::*member)
|
||||
{
|
||||
return (P *)((char *)(ptr) - offsetof__(member));
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------
|
||||
|
||||
namespace bcache {
|
||||
typedef uint64_t block_address;
|
||||
typedef uint64_t sector_t;
|
||||
|
||||
Reference in New Issue
Block a user