#include "buffer.h"
#include "encoding.h"
+#include "include/types.h"
#include "common/Formatter.h"
MutationImpl::drop_local_auth_pins();
}
+const filepath& MDRequestImpl::get_filepath()
+{
+ if (client_request)
+ return client_request->get_filepath();
+ return more()->filepath1;
+}
+
+const filepath& MDRequestImpl::get_filepath2()
+{
+ if (client_request)
+ return client_request->get_filepath2();
+ return more()->filepath2;
+}
+
+void MDRequestImpl::set_filepath(const filepath& fp)
+{
+ assert(!client_request);
+ more()->filepath1 = fp;
+}
+void MDRequestImpl::set_filepath2(const filepath& fp)
+{
+ assert(!client_request);
+ more()->filepath2 = fp;
+}
+
void MDRequestImpl::print(ostream &out)
{
out << "request(" << reqid;
#include "include/interval_set.h"
#include "include/elist.h"
+#include "include/filepath.h"
#include "mdstypes.h"
CDir* export_dir;
dirfrag_t fragment_base;
+ // for internal ops doing lookup
+ filepath filepath1;
+ filepath filepath2;
+
More() :
has_journaled_slaves(false), slave_update_journaled(false),
srcdn_auth_mds(-1), inode_import_v(0), rename_inode(0),
void drop_local_auth_pins();
void set_ambiguous_auth(CInode *inode);
void clear_ambiguous_auth();
+ const filepath& get_filepath();
+ const filepath& get_filepath2();
+ void set_filepath(const filepath& fp);
+ void set_filepath2(const filepath& fp);
void print(ostream &out);
ceph_file_layout **layout,
bool no_lookup) // true if we cannot return a null dentry lease
{
- MClientRequest *req = mdr->client_request;
- const filepath& refpath = n ? req->get_filepath2() : req->get_filepath();
+ const filepath& refpath = n ? mdr->get_filepath2() : mdr->get_filepath();
dout(10) << "rdlock_path_pin_ref " << *mdr << " " << refpath << dendl;
if (mdr->done_locking)
bool okexist, bool mustexist, bool alwaysxlock,
ceph_file_layout **layout)
{
- MClientRequest *req = mdr->client_request;
- const filepath& refpath = n ? req->get_filepath2() : req->get_filepath();
+ const filepath& refpath = n ? mdr->get_filepath2() : mdr->get_filepath();
dout(10) << "rdlock_path_xlock_dentry " << *mdr << " " << refpath << dendl;