]> git.proxmox.com Git - ceph.git/blob - ceph/src/osd/ObjectVersioner.h
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / osd / ObjectVersioner.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) 2004-2006 Sage Weil <sage@newdream.net>
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 */
14
15 #ifndef CEPH_OSD_OBJECTVERSIONER_H
16 #define CEPH_OSD_OBJECTVERSIONER_H
17
18 class ObjectVersioner {
19 public:
20 pobject_t oid;
21
22 void get_versions(list<version_t>& ls);
23 version_t head(); // newest
24 version_t committed(); // last committed
25 version_t tail(); // oldest
26
27 /*
28 * prepare a new version, starting wit "raw" transaction t.
29 */
30 void prepare(ObjectStore::Transaction& t, version_t v);
31 void rollback_to(version_t v);
32 void commit_to(version_t v);
33 };
34
35 #endif