Project

General

Profile

Bug #13714 » client-snapc.patch

Zheng Yan, 11/09/2015 02:40 AM

View differences:

src/client/Client.cc
snprintf(oid_buf, sizeof(oid_buf), "%llx.00000000", (unsigned long long)in->ino);
object_t oid = oid_buf;
SnapContext nullsnapc;
C_SaferCond rd_cond;
ObjectOperation rd_op;
rd_op.stat(NULL, (utime_t*)NULL, NULL);
objecter->mutate(oid, OSDMap::file_to_object_locator(in->layout), rd_op,
in->snaprealm->get_snap_context(), ceph_clock_now(cct), 0,
&rd_cond, NULL);
nullsnapc, ceph_clock_now(cct), 0, &rd_cond, NULL);
C_SaferCond wr_cond;
ObjectOperation wr_op;
wr_op.create(true);
objecter->mutate(oid, OSDMap::file_to_object_locator(in->layout), wr_op,
in->snaprealm->get_snap_context(), ceph_clock_now(cct), 0,
&wr_cond, NULL);
nullsnapc, ceph_clock_now(cct), 0, &wr_cond, NULL);
client_lock.Unlock();
int rd_ret = rd_cond.wait();
(2-2/2)