Skip to content

Feature/nfs integration#15

Open
ahuja-gautam wants to merge 4 commits intomasterfrom
feature/NFSIntegration
Open

Feature/nfs integration#15
ahuja-gautam wants to merge 4 commits intomasterfrom
feature/NFSIntegration

Conversation

@ahuja-gautam
Copy link
Copy Markdown
Contributor

No description provided.

Comment thread driver-fs-state/setup.sh
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
Copy Markdown
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

Comment thread fs-state/init_globals.h
static const char *dev_all[]= {"ram", "ram", "ram", "ram",
"mtdblock", "", "", "",
"", "ram", "ram", "ram",
"pmem"};
Copy link
Copy Markdown
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

Comment thread fs-state/mount.c
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
Copy Markdown
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

Comment thread fs-state/mount.c
"exportfs -u %s", clientmountpath);
execute_cmd_status(cmdbuf);
}
if(retNFS == 0) {
Copy link
Copy Markdown
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

Comment thread fs-state/mount.c
if(retNFS == 0) {
retServerFS = umount2(serverbasepath,0);
}
ret = retNFS | retServerFS;
Copy link
Copy Markdown
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

Comment thread fs-state/setup.c
char cmdbuf[PATH_MAX];
FILE *exports;

fprintf(stderr, "Will setup %s with underlying fs= %s\n",
Copy link
Copy Markdown
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