Whamcloud - gitweb
LU-1030 clio: reimplement ll_fsync in clio way
[fs/lustre-release.git] / lustre / llite / llite_internal.h
index f5e54f7..b03ce4b 100644 (file)
@@ -1,6 +1,4 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
+/*
  * GPL HEADER START
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -229,6 +227,15 @@ struct ll_inode_info {
                         cfs_time_t                      f_glimpse_time;
                         cfs_list_t                      f_agl_list;
                         __u64                           f_agl_index;
+                       /*
+                        * whenever a process try to read/write the file, the
+                        * jobid of the process will be saved here, and it'll
+                        * be packed into the write PRC when flush later.
+                        *
+                        * so the read/write statistics for jobid will not be
+                        * accurate if the file is shared by different jobs.
+                        */
+                       char                     f_jobid[JOBSTATS_JOBID_SIZE];
                 } f;
 
 #define lli_size_sem            u.f.f_size_sem
@@ -243,6 +250,7 @@ struct ll_inode_info {
 #define lli_glimpse_time        u.f.f_glimpse_time
 #define lli_agl_list            u.f.f_agl_list
 #define lli_agl_index           u.f.f_agl_index
+#define lli_jobid               u.f.f_jobid
 
         } u;
 
@@ -1031,7 +1039,8 @@ struct ll_lock_tree_node * ll_node_from_inode(struct inode *inode, __u64 start,
                                               __u64 end, ldlm_mode_t mode);
 void policy_from_vma(ldlm_policy_data_t *policy,
                 struct vm_area_struct *vma, unsigned long addr, size_t count);
-struct vm_area_struct *our_vma(unsigned long addr, size_t count);
+struct vm_area_struct *our_vma(struct mm_struct *mm, unsigned long addr,
+                               size_t count);
 
 static inline void ll_invalidate_page(struct page *vmpage)
 {
@@ -1393,6 +1402,8 @@ static inline int cl_merge_lvb(struct inode *inode)
 
 struct obd_capa *cl_capa_lookup(struct inode *inode, enum cl_req_type crt);
 
+int cl_sync_file_range(struct inode *inode, loff_t start, loff_t end);
+
 /** direct write pages */
 struct ll_dio_pages {
         /** page array to be written. we don't support