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

Feature/nfs integration #15

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

ahuja-gautam
Copy link
Contributor

No description provided.

@@ -38,6 +38,7 @@ PML_SRC="./mcfs-main.pml"
PML_TEMP="./.pml_tmp"
PML_START_PATN="\/\* The persistent content of the file systems \*\/"
PML_END_PATN="\/\* Abstract state signatures of the file systems \*\/"
NFS_SUFFIX="server";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Creates the fs directory on server with suffix -server


static const char *dev_all[]= {"ram", "ram", "ram", "ram",
"mtdblock", "", "", "",
"", "ram", "ram", "ram",
"pmem"};
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently for nfs-ext4, this approach works.
To expand for using nfs with other file systems, this requires a more careful approach.
Maybe we can create an extra variable in globals.h to specify the underlying fs so that we can remove this dependency on ramdisk only

@@ -77,6 +77,22 @@ void mountall()
char cmdbuf[PATH_MAX];
snprintf(cmdbuf, PATH_MAX, "mount -t NOVA -o noatime %s %s", get_devlist()[i], get_basepaths()[i]);
ret = execute_cmd_status(cmdbuf);
} else if(is_nfs(get_fslist()[i])) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mount server
export directory
Mount nfsv3

"exportfs -u %s", clientmountpath);
execute_cmd_status(cmdbuf);
}
if(retNFS == 0) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unmount ext4 only if nfs unmount succeeded

if(retNFS == 0) {
retServerFS = umount2(serverbasepath,0);
}
ret = retNFS | retServerFS;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both unmounts should succeed

char cmdbuf[PATH_MAX];
FILE *exports;

fprintf(stderr, "Will setup %s with underlying fs= %s\n",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perform setup of underlying fs

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.

2 participants