Skip to content
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

Merged
merged 1 commit into from
Mar 1, 2022

Conversation

ilixiaocui
Copy link
Contributor

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

  • Relevant documentation/comments is changed or added
  • I acknowledge that all my contributions will be made under the project's license

@ilixiaocui ilixiaocui force-pushed the master branch 2 times, most recently from 5b14bd9 to 3be190c Compare February 25, 2022 02:10

virtual ~FuseClient() {}

FuseClient(const std::shared_ptr<MdsClient> &mdsClient,
const std::shared_ptr<MetaServerClient> &metaClient,

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

Copy link
Contributor Author

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

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

Copy link
Contributor Author

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;

// 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(
Copy link
Member

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...

Copy link
Contributor Author

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;
Copy link
Member

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?

Copy link
Contributor Author

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.

@ilixiaocui ilixiaocui force-pushed the master branch 3 times, most recently from f75daad to 9a21f11 Compare February 28, 2022 14:24
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.
@ilixiaocui ilixiaocui merged commit c933bb6 into opencurve:master Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants