From: zab Date: Thu, 23 Jan 2003 19:09:24 +0000 (+0000) Subject: - add fs_sink filter method which blocks until the backing filter is synced. X-Git-Tag: v1_7_100~1^248~120 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=3bcf827ff0d047ccd89723322d5897f5d954f99e;p=fs%2Flustre-release.git - add fs_sink filter method which blocks until the backing filter is synced. ext* uses ext*_force_commit, reiser is unimplemented - add /proc/sys/lustre/filter_sync_on_commit tunable, disabled by default. when enabled it calls the filter sync after each filter_commitrw for write --- diff --git a/lustre/include/linux/lustre_fsfilt.h b/lustre/include/linux/lustre_fsfilt.h index eeae647..341d082 100644 --- a/lustre/include/linux/lustre_fsfilt.h +++ b/lustre/include/linux/lustre_fsfilt.h @@ -56,6 +56,7 @@ struct fsfilt_operations { int (* fs_set_last_rcvd)(struct obd_device *obd, __u64 last_rcvd, void *handle, fsfilt_cb_t cb_func); int (* fs_statfs)(struct super_block *sb, struct obd_statfs *osfs); + int (* fs_sync)(struct super_block *sb); }; extern int fsfilt_register_ops(struct fsfilt_operations *fs_ops); @@ -146,6 +147,11 @@ static inline int fsfilt_statfs(struct obd_device *obd, struct super_block *fs, return obd->obd_fsops->fs_statfs(fs, osfs); } +static inline int fsfilt_sync(struct obd_device *obd, struct super_block *fs) +{ + return obd->obd_fsops->fs_sync(fs); +} + #endif /* __KERNEL__ */ #endif diff --git a/lustre/obdclass/fsfilt_ext3.c b/lustre/obdclass/fsfilt_ext3.c index e979c37..5c52b43 100644 --- a/lustre/obdclass/fsfilt_ext3.c +++ b/lustre/obdclass/fsfilt_ext3.c @@ -271,6 +271,11 @@ static int fsfilt_ext3_statfs(struct super_block *sb, struct statfs *sfs) return rc; } +static int fsfilt_ext3_sync(struct super_block *sb) +{ + return ext3_force_commit(sb); +} + static struct fsfilt_operations fsfilt_ext3_ops = { fs_type: "ext3", fs_owner: THIS_MODULE, @@ -283,6 +288,7 @@ static struct fsfilt_operations fsfilt_ext3_ops = { fs_journal_data: fsfilt_ext3_journal_data, fs_set_last_rcvd: fsfilt_ext3_set_last_rcvd, fs_statfs: fsfilt_ext3_statfs, + fs_sync: fsfilt_ext3_sync, }; static int __init fsfilt_ext3_init(void)