MCPcopy Create free account
hub / github.com/ceph/ceph / Sync

Function Sync

src/libcephsqlite.cc:419–438  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

417}
418
419static int Sync(sqlite3_file *file, int flags)
420{
421 auto f = (cephsqlite_file*)file;
422 auto start = ceph::coarse_mono_clock::now();
423 df(5) << flags << dendl;
424
425 if (int rc = f->io.rs->flush(); rc < 0) {
426 df(5) << "failed: " << cpp_strerror(rc) << dendl;
427 if (rc == -EBLOCKLISTED) {
428 getdata(f->vfs).maybe_reconnect(f->io.cluster);
429 }
430 return SQLITE_IOERR;
431 }
432
433 df(5) << " = 0" << dendl;
434
435 auto end = ceph::coarse_mono_clock::now();
436 getdata(f->vfs).logger->tinc(P_OPF_SYNC, end-start);
437 return SQLITE_OK;
438}
439
440
441static int FileSize(sqlite3_file *file, sqlite_int64 *osize)

Callers

nothing calls this directly

Calls 5

cpp_strerrorFunction · 0.85
maybe_reconnectMethod · 0.80
nowFunction · 0.50
flushMethod · 0.45
tincMethod · 0.45

Tested by

no test coverage detected