]>
git.proxmox.com Git - ceph.git/blob - ceph/src/messages/MDentryLink.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.
16 #ifndef CEPH_MDENTRYLINK_H
17 #define CEPH_MDENTRYLINK_H
19 class MDentryLink
: public Message
{
26 dirfrag_t
get_subtree() { return subtree
; }
27 dirfrag_t
get_dirfrag() { return dirfrag
; }
28 string
& get_dn() { return dn
; }
29 bool get_is_primary() { return is_primary
; }
34 Message(MSG_MDS_DENTRYLINK
) { }
35 MDentryLink(dirfrag_t r
, dirfrag_t df
, string
& n
, bool p
) :
36 Message(MSG_MDS_DENTRYLINK
),
42 ~MDentryLink() override
{}
45 const char *get_type_name() const override
{ return "dentry_link";}
46 void print(ostream
& o
) const override
{
47 o
<< "dentry_link(" << dirfrag
<< " " << dn
<< ")";
50 void decode_payload() override
{
51 bufferlist::iterator p
= payload
.begin();
55 ::decode(is_primary
, p
);
58 void encode_payload(uint64_t features
) override
{
59 ::encode(subtree
, payload
);
60 ::encode(dirfrag
, payload
);
61 ::encode(dn
, payload
);
62 ::encode(is_primary
, payload
);
63 ::encode(bl
, payload
);