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

Function get_fd_data

src/tools/ceph_objectstore_tool.cc:420–438  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

418super_header sh;
419
420static int get_fd_data(int fd, bufferlist &bl)
421{
422 uint64_t total = 0;
423 do {
424 ssize_t bytes = bl.read_fd(fd, max_read);
425 if (bytes < 0) {
426 cerr << "read_fd error " << cpp_strerror(bytes) << std::endl;
427 return bytes;
428 }
429
430 if (bytes == 0)
431 break;
432
433 total += bytes;
434 } while(true);
435
436 ceph_assert(bl.length() == total);
437 return 0;
438}
439
440int get_log(CephContext *cct, ObjectStore *fs, __u8 struct_ver,
441 spg_t pgid, const pg_info_t &info,

Callers 4

do_set_attrFunction · 0.70
do_set_omapFunction · 0.70
do_set_omaphdrFunction · 0.70
mainFunction · 0.70

Calls 3

cpp_strerrorFunction · 0.85
read_fdMethod · 0.80
lengthMethod · 0.45

Tested by

no test coverage detected