Fix some bugs when testing opensds ansible
[stor4nfv.git] / src / ceph / src / test / objectstore / FileStoreDiff.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
3 /*
4 * Ceph - scalable distributed file system
5 *
6 * Copyright (C) 2012 New Dream Network
7 *
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.
12 */
13 #ifndef FILESTORE_DIFF_H_
14 #define FILESTORE_DIFF_H_
15
16 #include <iostream>
17 #include <stdlib.h>
18 #include <map>
19 #include <boost/scoped_ptr.hpp>
20 #include "common/debug.h"
21 #include "os/filestore/FileStore.h"
22 #include "common/config.h"
23
24 class FileStoreDiff {
25
26  private:
27   FileStore *a_store;
28   FileStore *b_store;
29
30   bool diff_objects(FileStore *a_store, FileStore *b_store, coll_t coll);
31   bool diff_objects_stat(struct stat& a, struct stat& b);
32   bool diff_attrs(std::map<std::string,bufferptr>& b,
33       std::map<std::string,bufferptr>& a);
34
35 public:
36   FileStoreDiff(FileStore *a, FileStore *b);
37   virtual ~FileStoreDiff();
38
39   bool diff();
40 };
41
42 #endif /* FILESTOREDIFF_H_ */