summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
9a9d09e)
will be used by t-f to speedup file/object removals, etc.
Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: Ic9d933b627eed0a47438b66890933ddc39cc8c8b
Reviewed-on: http://review.whamcloud.com/4083
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
mnt_get_devname(osd->od_mnt));
}
mnt_get_devname(osd->od_mnt));
}
+static int lprocfs_osd_wr_force_sync(struct file *file, const char *buffer,
+ unsigned long count, void *data)
+{
+ struct osd_device *osd = osd_dt_dev(data);
+ struct dt_device *dt = data;
+ struct lu_env env;
+ int rc;
+
+ LASSERT(osd != NULL);
+ if (unlikely(osd->od_mnt == NULL))
+ return -EINPROGRESS;
+
+ rc = lu_env_init(&env, LCT_LOCAL);
+ if (rc)
+ return rc;
+ rc = dt_sync(&env, dt);
+ lu_env_fini(&env);
+
+ return rc == 0 ? count : rc;
+}
+
#ifdef HAVE_LDISKFS_PDO
static int lprocfs_osd_rd_pdo(char *page, char **start, off_t off, int count,
int *eof, void *data)
#ifdef HAVE_LDISKFS_PDO
static int lprocfs_osd_rd_pdo(char *page, char **start, off_t off, int count,
int *eof, void *data)
{ "filesfree", lprocfs_osd_rd_filesfree, 0, 0 },
{ "fstype", lprocfs_osd_rd_fstype, 0, 0 },
{ "mntdev", lprocfs_osd_rd_mntdev, 0, 0 },
{ "filesfree", lprocfs_osd_rd_filesfree, 0, 0 },
{ "fstype", lprocfs_osd_rd_fstype, 0, 0 },
{ "mntdev", lprocfs_osd_rd_mntdev, 0, 0 },
+ { "force_sync", 0, lprocfs_osd_wr_force_sync },
#ifdef HAVE_LDISKFS_PDO
{ "pdo", lprocfs_osd_rd_pdo, lprocfs_osd_wr_pdo, 0 },
#endif
#ifdef HAVE_LDISKFS_PDO
{ "pdo", lprocfs_osd_rd_pdo, lprocfs_osd_wr_pdo, 0 },
#endif