-
Notifications
You must be signed in to change notification settings - Fork 3
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
base: master
Are you sure you want to change the base?
Conversation
@@ -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"; |
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.
Creates the fs directory on server with suffix -server
|
||
static const char *dev_all[]= {"ram", "ram", "ram", "ram", | ||
"mtdblock", "", "", "", | ||
"", "ram", "ram", "ram", | ||
"pmem"}; |
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.
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])) { |
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.
Mount server
export directory
Mount nfsv3
"exportfs -u %s", clientmountpath); | ||
execute_cmd_status(cmdbuf); | ||
} | ||
if(retNFS == 0) { |
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.
Unmount ext4 only if nfs unmount succeeded
if(retNFS == 0) { | ||
retServerFS = umount2(serverbasepath,0); | ||
} | ||
ret = retNFS | retServerFS; |
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.
Both unmounts should succeed
char cmdbuf[PATH_MAX]; | ||
FILE *exports; | ||
|
||
fprintf(stderr, "Will setup %s with underlying fs= %s\n", |
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.
Perform setup of underlying fs
No description provided.