From: rread Date: Wed, 21 May 2003 21:23:31 +0000 (+0000) Subject: b=1276 X-Git-Tag: v1_7_100~1^368~97 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=e2bcaa3825c66aac0325000de46e3cbee043d69c;p=fs%2Flustre-release.git b=1276 r=adilger - add the force_sync flag to fsfilt_commit - sync to filter_disconnect, which should cause the remaining requests on the client resend list to be purged after disconnect completes --- diff --git a/lustre/include/linux/lustre_fsfilt.h b/lustre/include/linux/lustre_fsfilt.h index 92c59b7..1dd9339 100644 --- a/lustre/include/linux/lustre_fsfilt.h +++ b/lustre/include/linux/lustre_fsfilt.h @@ -44,7 +44,7 @@ struct fsfilt_operations { void *(* fs_start)(struct inode *inode, int op); void *(* fs_brw_start)(int objcount, struct fsfilt_objinfo *fso, int niocount, struct niobuf_remote *nb); - int (* fs_commit)(struct inode *inode, void *handle); + int (* fs_commit)(struct inode *inode, void *handle,int force_sync); int (* fs_setattr)(struct dentry *dentry, void *handle, struct iattr *iattr); int (* fs_set_md)(struct inode *inode, void *handle, void *md, @@ -93,10 +93,10 @@ static inline void *fsfilt_brw_start(struct obd_device *obd, int objcount, } static inline int fsfilt_commit(struct obd_device *obd, struct inode *inode, - void *handle) + void *handle, int force_sync) { CDEBUG(D_HA, "committing handle %p\n", handle); - return obd->obd_fsops->fs_commit(inode, handle); + return obd->obd_fsops->fs_commit(inode, handle, force_sync); } static inline int fsfilt_setattr(struct obd_device *obd, struct dentry *dentry, diff --git a/lustre/obdclass/fsfilt_ext3.c b/lustre/obdclass/fsfilt_ext3.c index e94f25f..8dc795e 100644 --- a/lustre/obdclass/fsfilt_ext3.c +++ b/lustre/obdclass/fsfilt_ext3.c @@ -222,15 +222,13 @@ static void *fsfilt_ext3_brw_start(int objcount, struct fsfilt_objinfo *fso, RETURN(handle); } -static int fsfilt_ext3_commit(struct inode *inode, void *h /*, force_sync */) +static int fsfilt_ext3_commit(struct inode *inode, void *h, int force_sync) { int rc; handle_t *handle = h; -#if 0 if (force_sync) handle->h_sync = 1; /* recovery likes this */ -#endif lock_kernel(); rc = journal_stop(handle); diff --git a/lustre/obdclass/fsfilt_reiserfs.c b/lustre/obdclass/fsfilt_reiserfs.c index 06302c5..2aba0f1 100644 --- a/lustre/obdclass/fsfilt_reiserfs.c +++ b/lustre/obdclass/fsfilt_reiserfs.c @@ -59,7 +59,8 @@ static void *fsfilt_reiserfs_brw_start(int objcount, struct fsfilt_objinfo *fso, return (void *)0xf00f00be; } -static int fsfilt_reiserfs_commit(struct inode *inode, void *handle) +static int fsfilt_reiserfs_commit(struct inode *inode, void *handle, + int force_sync) { if (handle != (void *)0xf00f00be) { CERROR("bad handle %p", handle);