]> git.proxmox.com Git - ceph.git/blob - ceph/src/mds/events/EPurged.h
import 15.2.5
[ceph.git] / ceph / src / mds / events / EPurged.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_MDS_EPURGE_H
16 #define CEPH_MDS_EPURGE_H
17
18 #include "common/config.h"
19 #include "include/types.h"
20
21 #include "../LogEvent.h"
22
23 class EPurged : public LogEvent {
24
25 protected:
26 interval_set<inodeno_t> inos;
27 version_t inotablev{0};
28 LogSegment::seq_t seq;
29 public:
30 EPurged() : LogEvent(EVENT_PURGED) {
31 }
32 EPurged(interval_set<inodeno_t> i, version_t iv, LogSegment::seq_t _seq = 0) :
33 LogEvent(EVENT_PURGED), inos(std::move(i)), inotablev(iv), seq(_seq) {
34 }
35 void encode(bufferlist& bl, uint64_t features) const override;
36 void decode(bufferlist::const_iterator& bl) override;
37 void dump(Formatter *f) const override;
38 void print(ostream& out) const override {
39
40 if (inotablev)
41 out << "Eurge complete";
42 else
43 out << "Eurge inodes ";
44 }
45
46 void update_segment() override;
47 void replay(MDSRank *mds) override;
48 };
49 WRITE_CLASS_ENCODER_FEATURES(EPurged)
50
51 #endif // CEPH_MDS_EPURGE_H