]>
git.proxmox.com Git - ceph.git/blob - ceph/src/mds/SnapClient.h
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) 2004-2006 Sage Weil <sage@newdream.net>
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 CEPH_SNAPCLIENT_H
16 #define CEPH_SNAPCLIENT_H
18 #include <boost/utility/string_view.hpp>
20 #include "MDSTableClient.h"
23 class MDSInternalContextBase
;
27 class SnapClient
: public MDSTableClient
{
29 explicit SnapClient(MDSRank
*m
) : MDSTableClient(m
, TABLE_SNAP
) {}
31 void resend_queries() override
{}
32 void handle_query_result(MMDSTableRequest
*m
) override
{}
34 void prepare_create(inodeno_t dirino
, boost::string_view name
, utime_t stamp
,
35 version_t
*pstid
, bufferlist
*pbl
, MDSInternalContextBase
*onfinish
) {
37 __u32 op
= TABLE_OP_CREATE
;
42 _prepare(bl
, pstid
, pbl
, onfinish
);
45 void prepare_create_realm(inodeno_t ino
, version_t
*pstid
, bufferlist
*pbl
, MDSInternalContextBase
*onfinish
) {
47 __u32 op
= TABLE_OP_CREATE
;
50 _prepare(bl
, pstid
, pbl
, onfinish
);
53 void prepare_destroy(inodeno_t ino
, snapid_t snapid
, version_t
*pstid
, bufferlist
*pbl
, MDSInternalContextBase
*onfinish
) {
55 __u32 op
= TABLE_OP_DESTROY
;
59 _prepare(bl
, pstid
, pbl
, onfinish
);
62 void prepare_update(inodeno_t ino
, snapid_t snapid
, boost::string_view name
, utime_t stamp
,
63 version_t
*pstid
, bufferlist
*pbl
, MDSInternalContextBase
*onfinish
) {
65 __u32 op
= TABLE_OP_UPDATE
;
71 _prepare(bl
, pstid
, pbl
, onfinish
);