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