mirror of
https://github.com/ceph/ceph
synced 2025-02-22 02:27:29 +00:00
Merge pull request #1254 from ceph/wip-barrier
libcephfs: disable barriers for now
This commit is contained in:
commit
62532fb025
@ -8222,7 +8222,7 @@ int Client::ll_write_block(Inode *in, uint64_t blockid,
|
||||
if (length == 0) {
|
||||
return -EINVAL;
|
||||
}
|
||||
if (sync) {
|
||||
if (true || sync) {
|
||||
/* if write is stable, the epilogue is waiting on
|
||||
* flock */
|
||||
onack = new C_NoopContext;
|
||||
@ -8232,8 +8232,9 @@ int Client::ll_write_block(Inode *in, uint64_t blockid,
|
||||
/* if write is unstable, we just place a barrier for
|
||||
* future commits to wait on */
|
||||
onack = new C_NoopContext;
|
||||
onsafe = new C_Block_Sync(this, vino.ino,
|
||||
/*onsafe = new C_Block_Sync(this, vino.ino,
|
||||
barrier_interval(offset, offset + length), &r);
|
||||
*/
|
||||
done = true;
|
||||
}
|
||||
object_t oid = file_object_t(vino.ino, blockid);
|
||||
@ -8282,6 +8283,7 @@ int Client::ll_commit_blocks(Inode *in,
|
||||
uint64_t length)
|
||||
{
|
||||
Mutex::Locker lock(client_lock);
|
||||
/*
|
||||
BarrierContext *bctx;
|
||||
vinodeno_t vino = ll_get_vino(in);
|
||||
uint64_t ino = vino.ino;
|
||||
@ -8293,12 +8295,12 @@ int Client::ll_commit_blocks(Inode *in,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
bctx = this->barriers[ino];
|
||||
if (bctx) {
|
||||
barrier_interval civ(offset, length);
|
||||
bctx->commit_barrier(civ);
|
||||
map<uint64_t, BarrierContext*>::iterator p = barriers.find(ino);
|
||||
if (p != barriers.end()) {
|
||||
barrier_interval civ(offset, offset + length);
|
||||
p->second->commit_barrier(civ);
|
||||
}
|
||||
|
||||
*/
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@ using std::fstream;
|
||||
#include "include/interval_set.h"
|
||||
#include "include/lru.h"
|
||||
|
||||
#include "barrier.h"
|
||||
//#include "barrier.h"
|
||||
|
||||
#include "mds/mdstypes.h"
|
||||
|
||||
@ -315,7 +315,7 @@ protected:
|
||||
ceph::unordered_map<inodeno_t,SnapRealm*> snap_realms;
|
||||
|
||||
/* async block write barrier support */
|
||||
map<uint64_t, BarrierContext* > barriers;
|
||||
//map<uint64_t, BarrierContext* > barriers;
|
||||
|
||||
SnapRealm *get_snap_realm(inodeno_t r);
|
||||
SnapRealm *get_snap_realm_maybe(inodeno_t r);
|
||||
|
@ -1,6 +1,5 @@
|
||||
libclient_la_SOURCES = \
|
||||
client/Client.cc \
|
||||
client/barrier.cc \
|
||||
client/Inode.cc \
|
||||
client/Dentry.cc \
|
||||
client/MetaRequest.cc \
|
||||
@ -21,7 +20,6 @@ noinst_HEADERS += \
|
||||
client/ClientSnapRealm.h \
|
||||
client/SyntheticClient.h \
|
||||
client/Trace.h \
|
||||
client/barrier.h \
|
||||
client/ioctl.h \
|
||||
client/ObjecterWriteback.h
|
||||
|
||||
|
@ -121,7 +121,6 @@ private:
|
||||
|
||||
// commits in progress, with their claimed writes
|
||||
BarrierList active_commits;
|
||||
boost::icl::interval_set<uint64_t> active_commit_interval;
|
||||
|
||||
public:
|
||||
BarrierContext(Client *c, uint64_t ino);
|
||||
|
Loading…
Reference in New Issue
Block a user