1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
4 * Ceph - scalable distributed file system
6 * Copyright (C) 2015 Red Hat
8 * This is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License version 2.1, as published by the Free Software
11 * Foundation. See file COPYING.
15 #ifndef RADOS_IMPORT_H_
16 #define RADOS_IMPORT_H_
20 #include "include/rados/librados.hpp"
21 #include "include/buffer_fwd.h"
23 #include "tools/RadosDump.h"
26 * Specialization of RadosDump that adds
27 * methods for importing objects from a stream
30 class RadosImport : public RadosDump
34 int get_object_rados(librados::IoCtx &ioctx, bufferlist &bl, bool no_overwrite);
37 RadosImport(int file_fd_, uint64_t align_, bool dry_run_)
38 : RadosDump(file_fd_, dry_run_), align(align_)
41 int import(std::string pool, bool no_overwrite);
42 int import(librados::IoCtx &io_ctx, bool no_overwrite);
45 #endif // RADOS_IMPORT_H_