Whamcloud - gitweb
b=1883
authorzab <zab>
Wed, 17 Sep 2003 22:06:43 +0000 (22:06 +0000)
committerzab <zab>
Wed, 17 Sep 2003 22:06:43 +0000 (22:06 +0000)
r=braam
Wait for dirty data to be handled (writeback, truncate, etc) before issueing
the mdc close.  This is done by tracking opens for write and dirty data and
deferring mdc close at file_release if there aren't other opens for write and
there is dirty data.  We perform these deferred closes when the dirty data is
taken care of or when another open for write comes along.

Also, a hot sanity test to verify the behaviour.

lustre/llite/llite_internal.h

index cb68b46..5bc13f4 100644 (file)
@@ -98,6 +98,9 @@ int ll_sync_page(struct page *page);
 int ll_ocp_update_obdo(struct obd_client_page *ocp, int cmd, struct obdo *oa);
 void ll_removepage(struct page *page);
 int ll_readpage(struct file *file, struct page *page);
+void ll_check_inode_clean(struct inode *inode, int force);
+void ll_ocp_dirty(struct ll_inode_info *lli, struct obd_client_page *ocp);
+void ll_ocp_clean(struct ll_inode_info *lli, struct obd_client_page *ocp);
 
 void ll_truncate(struct inode *inode);
 
@@ -117,6 +120,8 @@ int ll_extent_lock_no_validate(struct ll_file_data *, struct inode *,
                                struct lov_stripe_md *, int mode,
                                struct ldlm_extent *, struct lustre_handle *,
                                int ast_flags);
+int ll_mdc_close(struct obd_export *mdc_exp, struct inode *inode,
+                 struct ll_file_data *fd);
 #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
 int ll_getattr(struct vfsmount *mnt, struct dentry *de,
                struct lookup_intent *it, struct kstat *stat);