Some members once ininitalized in the Fh constructor they won't
change in the whole lifetime, and putting them under the client_lock
makes no sense.
And this could help simplify the inode lock code in some cases.
Signed-off-by: Xiubo Li <xiubli@redhat.com>
#include "Fh.h"
Fh::Fh(InodeRef in, int flags, int cmode, uint64_t _gen, const UserPerm &perms) :
- inode(in), mode(cmode), gen(_gen), flags(flags), actor_perms(perms),
+ inode(in), flags(flags), gen(_gen), actor_perms(perms), mode(cmode),
readahead()
{
inode->add_fh(this);
struct Fh {
InodeRef inode;
+ int flags;
+ uint64_t gen;
+ UserPerm actor_perms; // perms I opened the file with
+
+ // the members above once ininitalized in the constructor
+ // they won't change, and putting them under the client_lock
+ // makes no sense.
+
int _ref = 1;
loff_t pos = 0;
int mds = 0; // have to talk to mds we opened with (for now)
int mode; // the mode i opened the file with
- uint64_t gen;
- int flags;
bool pos_locked = false; // pos is currently in use
std::list<ceph::condition_variable*> pos_waiters; // waiters for pos
- UserPerm actor_perms; // perms I opened the file with
-
Readahead readahead;
// file lock