8000 src/aiori-CEPHFS: Add sync by markhpc · Pull Request #223 · hpc/ior · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

src/aiori-CEPHFS: Add sync #223

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

Merged
merged 1 commit into from
May 28, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/aiori-CEPHFS.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ static int CEPHFS_MkDir(const char *, mode_t, IOR_param_t *);
static int CEPHFS_RmDir(const char *, IOR_param_t *);
static int CEPHFS_Access(const char *, int, IOR_param_t *);
static int CEPHFS_Stat(const char *, struct stat *, IOR_param_t *);
static void CEPHFS_Sync(IOR_param_t *);
static option_help * CEPHFS_options();

/************************** D E C L A R A T I O N S ***************************/
Expand All @@ -97,6 +98,7 @@ ior_aiori_t cephfs_aiori = {
.rmdir = CEPHFS_RmDir,
.access = CEPHFS_Access,
.stat = CEPHFS_Stat,
.sync = CEPHFS_Sync,
.get_options = CEPHFS_options,
};

Expand Down Expand Up @@ -359,3 +361,12 @@ static int CEPHFS_Stat(const char *testFileName, struct stat *buf, IOR_param_t *
{
return ceph_stat(cmount, pfix(testFileName), buf);
}

static void CEPHFS_Sync(IOR_param_t *param)
{
int ret = ceph_sync_fs(cmount);
if (ret < 0) {
CEPHFS_ERR("ceph_sync_fs failed", ret);
}

}
0