client-snapc.patch
src/client/Client.cc | ||
---|---|---|
11350 | 11350 |
snprintf(oid_buf, sizeof(oid_buf), "%llx.00000000", (unsigned long long)in->ino); |
11351 | 11351 |
object_t oid = oid_buf; |
11352 | 11352 | |
11353 |
SnapContext nullsnapc; |
|
11354 | ||
11353 | 11355 |
C_SaferCond rd_cond; |
11354 | 11356 |
ObjectOperation rd_op; |
11355 | 11357 |
rd_op.stat(NULL, (utime_t*)NULL, NULL); |
11356 | 11358 | |
11357 | 11359 |
objecter->mutate(oid, OSDMap::file_to_object_locator(in->layout), rd_op, |
11358 |
in->snaprealm->get_snap_context(), ceph_clock_now(cct), 0, |
|
11359 |
&rd_cond, NULL); |
|
11360 |
nullsnapc, ceph_clock_now(cct), 0, &rd_cond, NULL); |
|
11360 | 11361 | |
11361 | 11362 |
C_SaferCond wr_cond; |
11362 | 11363 |
ObjectOperation wr_op; |
11363 | 11364 |
wr_op.create(true); |
11364 | 11365 | |
11365 | 11366 |
objecter->mutate(oid, OSDMap::file_to_object_locator(in->layout), wr_op, |
11366 |
in->snaprealm->get_snap_context(), ceph_clock_now(cct), 0, |
|
11367 |
&wr_cond, NULL); |
|
11367 |
nullsnapc, ceph_clock_now(cct), 0, &wr_cond, NULL); |
|
11368 | 11368 | |
11369 | 11369 |
client_lock.Unlock(); |
11370 | 11370 |
int rd_ret = rd_cond.wait(); |