-
Notifications
You must be signed in to change notification settings - Fork 526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
curvefs: a curve filesystem can be mounted by multi fuse clients #1101
Conversation
5b14bd9
to
3be190c
Compare
curvefs/src/client/fuse_client.h
Outdated
|
||
virtual ~FuseClient() {} | ||
|
||
FuseClient(const std::shared_ptr<MdsClient> &mdsClient, | ||
const std::shared_ptr<MetaServerClient> &metaClient, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it necessary to change the format?there are many similar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
VLOG(1) << "update inode open status"; | ||
int32_t oldcount = old->openmpcount(); | ||
int32_t newcount = | ||
request.inodeopenstatuschange() == InodeOpenStatusChange::OPEN |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the status judgment of InodeOpenStatusChange is a bit confusing here, directly judge open count+1, close count-1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the request. Inodeopenstatuschange (), openmpcount plus or minus one.
Here is conditional operator, I use it instead of if else
because it only has two conditions.
Exp1 ? Exp2 : Exp3;
curvefs/src/client/inode_wrapper.h
Outdated
// TODO(xuchaojie) : get from conf maybe? | ||
const uint32_t kOptimalIOBlockSize = 0x10000u; | ||
|
||
using rpcclient::MetaServerClient; | ||
using rpcclient::MetaServerClientImpl; | ||
|
||
std::ostream &operator<<(std::ostream &os, const struct stat &attr); | ||
void AppendS3ChunkInfoToMap(uint64_t chunkIndex, const S3ChunkInfo &info, | ||
void AppendS3ChunkInfoToMap( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Too much formatting, almost nowhere to find actually modify place...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
enum InodeOpenStatusChange { | ||
OPEN = 1; | ||
CLOSE = 2; | ||
NOCHANGE = 3; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NOCHANGE is used for what?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MetaStatusCode UpdateInode(const Inode &inode,
InodeOpenStatusChange statusChange =
InodeOpenStatusChange::NOCHANGE) = 0;
UpdateInode adds a parameter InodeOpenStatusChange to update the InodeOpenStatusChange in UpdateInodeRequest,NOCHANGE is the default parameter.
f75daad
to
9a21f11
Compare
NOTES: Now we implemented close-to-open consistency and multi-mountpoint for one filesystem. A file written by a client, closed, and then opened by any client can read the latest data. The scenario where multiple mount points modify the same resource ( Any modification to a file ) at the same time is not guaranteed.
NOTES:
Now we implemented close-to-open consistency and multi-mountpoint for one filesystem.
A file written by a client, closed, and then opened by any client can read the latest data.
The scenario where multiple mount points modify the same resource ( Any modification to a
file ) at the same time is not guaranteed.
What problem does this PR solve?
Issue Number: close #xxx
Problem Summary:
What is changed and how it works?
What's Changed:
How it Works:
Side effects(Breaking backward compatibility? Performance regression?):
Check List