X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fosp%2Flproc_osp.c;h=f9b3fe572e39fe9d9042dcb9d162364e049d6784;hb=d0ba82e44038b2658bbd1a06d52641fda9fc1fe7;hp=c23ce18840ef18e7edb222917ddac793ae350131;hpb=ea766f3be969997ce9e92cf9b359fc818583851a;p=fs%2Flustre-release.git diff --git a/lustre/osp/lproc_osp.c b/lustre/osp/lproc_osp.c index c23ce18..f9b3fe5 100644 --- a/lustre/osp/lproc_osp.c +++ b/lustre/osp/lproc_osp.c @@ -117,7 +117,26 @@ static int osp_syn_changes_seq_show(struct seq_file *m, void *data) return seq_printf(m, "%lu\n", osp->opd_syn_changes); } -LPROC_SEQ_FOPS_RO(osp_syn_changes); + +static ssize_t osp_syn_changes_seq_write(struct file *file, const char *buffer, + size_t count, loff_t *off) +{ + struct seq_file *m = file->private_data; + struct obd_device *dev = m->private; + struct osp_device *osp = lu2osp_dev(dev->obd_lu_dev); + struct lu_env env; + int rc; + + rc = lu_env_init(&env, LCT_LOCAL); + if (rc != 0) + return rc; + + rc = dt_sync(&env, &osp->opd_dt_dev); + lu_env_fini(&env); + + return rc == 0 ? count : rc; +} +LPROC_SEQ_FOPS(osp_syn_changes); static int osp_max_rpcs_in_flight_seq_show(struct seq_file *m, void *data) {