Whamcloud - gitweb
b=1276
authorrread <rread>
Wed, 21 May 2003 21:23:31 +0000 (21:23 +0000)
committerrread <rread>
Wed, 21 May 2003 21:23:31 +0000 (21:23 +0000)
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

lustre/include/linux/lustre_fsfilt.h
lustre/obdclass/fsfilt_ext3.c
lustre/obdclass/fsfilt_reiserfs.c

index 92c59b7..1dd9339 100644 (file)
@@ -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,
index e94f25f..8dc795e 100644 (file)
@@ -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);
index 06302c5..2aba0f1 100644 (file)
@@ -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);