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) 2014 john spray <john.spray@inktank.com>
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 JOURNAL_FILTER_H
16 #define JOURNAL_FILTER_H
18 #include "mds/mdstypes.h"
19 #include "mds/LogEvent.h"
22 * A set of conditions for narrowing down a search through the journal
28 /* Filtering by journal offset range */
31 static const std::string range_separator;
33 /* Filtering by file (sub) path */
34 std::string path_expr;
36 /* Filtering by inode */
39 /* Filtering by type */
40 LogEvent::EventType event_type;
42 /* Filtering by dirfrag */
44 std::string frag_dentry; //< optional, filter dentry name within fragment
46 /* Filtering by metablob client name */
47 entity_name_t client_name;
56 bool get_range(uint64_t &start, uint64_t &end) const;
57 bool apply(uint64_t pos, LogEvent &le) const;
59 std::vector<const char*> &argv,
60 std::vector<const char*>::iterator &arg);
63 #endif // JOURNAL_FILTER_H