[Pkg-lustre-svn-commit] r516 - /trunk/debian/patches/patchless_support_2.6.24.dpatch

winnie at users.alioth.debian.org winnie at users.alioth.debian.org
Tue Oct 7 11:35:13 UTC 2008


Author: winnie
Date: Tue Oct  7 11:35:13 2008
New Revision: 516

URL: http://svn.debian.org/wsvn/pkg-lustre/?sc=1&rev=516
Log:
Okay.. remove the workaround

Modified:
    trunk/debian/patches/patchless_support_2.6.24.dpatch

Modified: trunk/debian/patches/patchless_support_2.6.24.dpatch
URL: http://svn.debian.org/wsvn/pkg-lustre/trunk/debian/patches/patchless_support_2.6.24.dpatch?rev=516&op=diff
==============================================================================
--- trunk/debian/patches/patchless_support_2.6.24.dpatch (original)
+++ trunk/debian/patches/patchless_support_2.6.24.dpatch Tue Oct  7 11:35:13 2008
@@ -7,7 +7,7 @@
 @DPATCH@
 diff -urNad trunk~/lnet/autoconf/lustre-lnet.m4 trunk/lnet/autoconf/lustre-lnet.m4
 --- trunk~/lnet/autoconf/lustre-lnet.m4	2008-06-26 06:43:33.000000000 +0200
-+++ trunk/lnet/autoconf/lustre-lnet.m4	2008-10-02 11:54:10.000000000 +0200
++++ trunk/lnet/autoconf/lustre-lnet.m4	2008-10-07 13:30:45.000000000 +0200
 @@ -1263,6 +1263,41 @@
  ])
  ])
@@ -62,7 +62,7 @@
  #
 diff -urNad trunk~/lnet/include/libcfs/curproc.h trunk/lnet/include/libcfs/curproc.h
 --- trunk~/lnet/include/libcfs/curproc.h	2007-02-10 01:04:30.000000000 +0100
-+++ trunk/lnet/include/libcfs/curproc.h	2008-10-02 11:54:10.000000000 +0200
++++ trunk/lnet/include/libcfs/curproc.h	2008-10-07 13:30:45.000000000 +0200
 @@ -49,6 +49,11 @@
   */
  cfs_kernel_cap_t cfs_curproc_cap_get(void);
@@ -77,7 +77,7 @@
  /* __LIBCFS_CURPROC_H__ */
 diff -urNad trunk~/lnet/include/libcfs/linux/linux-prim.h trunk/lnet/include/libcfs/linux/linux-prim.h
 --- trunk~/lnet/include/libcfs/linux/linux-prim.h	2008-01-14 02:12:18.000000000 +0100
-+++ trunk/lnet/include/libcfs/linux/linux-prim.h	2008-10-02 11:54:10.000000000 +0200
++++ trunk/lnet/include/libcfs/linux/linux-prim.h	2008-10-07 13:30:45.000000000 +0200
 @@ -68,6 +68,17 @@
  #endif
  #define cfs_unregister_sysctl_table(t)	unregister_sysctl_table(t)
@@ -98,7 +98,7 @@
   */
 diff -urNad trunk~/lnet/klnds/gmlnd/gmlnd_module.c trunk/lnet/klnds/gmlnd/gmlnd_module.c
 --- trunk~/lnet/klnds/gmlnd/gmlnd_module.c	2007-09-27 04:30:24.000000000 +0200
-+++ trunk/lnet/klnds/gmlnd/gmlnd_module.c	2008-10-02 11:54:10.000000000 +0200
++++ trunk/lnet/klnds/gmlnd/gmlnd_module.c	2008-10-07 13:30:45.000000000 +0200
 @@ -62,9 +62,37 @@
  };
  
@@ -203,7 +203,7 @@
                  .maxlen   = 0,
 diff -urNad trunk~/lnet/klnds/iiblnd/iiblnd_modparams.c trunk/lnet/klnds/iiblnd/iiblnd_modparams.c
 --- trunk~/lnet/klnds/iiblnd/iiblnd_modparams.c	2007-09-10 17:35:53.000000000 +0200
-+++ trunk/lnet/klnds/iiblnd/iiblnd_modparams.c	2008-10-02 11:54:10.000000000 +0200
++++ trunk/lnet/klnds/iiblnd/iiblnd_modparams.c	2008-10-07 13:30:45.000000000 +0200
 @@ -102,9 +102,50 @@
   * not to truncate the printout; it only needs to be the actual size of the
   * string buffer if we allow writes (and we don't) */
@@ -384,7 +384,7 @@
                  .maxlen   = 0,
 diff -urNad trunk~/lnet/klnds/o2iblnd/o2iblnd.h trunk/lnet/klnds/o2iblnd/o2iblnd.h
 --- trunk~/lnet/klnds/o2iblnd/o2iblnd.h	2008-03-14 19:18:05.000000000 +0100
-+++ trunk/lnet/klnds/o2iblnd/o2iblnd.h	2008-10-02 11:54:10.000000000 +0200
++++ trunk/lnet/klnds/o2iblnd/o2iblnd.h	2008-10-07 13:30:45.000000000 +0200
 @@ -759,3 +759,13 @@
  
  
@@ -401,7 +401,7 @@
 +#endif
 diff -urNad trunk~/lnet/klnds/o2iblnd/o2iblnd_cb.c trunk/lnet/klnds/o2iblnd/o2iblnd_cb.c
 --- trunk~/lnet/klnds/o2iblnd/o2iblnd_cb.c	2008-03-28 08:12:34.000000000 +0100
-+++ trunk/lnet/klnds/o2iblnd/o2iblnd_cb.c	2008-10-02 11:54:10.000000000 +0200
++++ trunk/lnet/klnds/o2iblnd/o2iblnd_cb.c	2008-10-07 13:30:45.000000000 +0200
 @@ -626,9 +626,7 @@
                  fragnob = min((int)(iov->iov_len - offset), nob);
                  fragnob = min(fragnob, (int)PAGE_SIZE - page_offset);
@@ -430,7 +430,7 @@
                  nkiov--;
 diff -urNad trunk~/lnet/klnds/o2iblnd/o2iblnd_modparams.c trunk/lnet/klnds/o2iblnd/o2iblnd_modparams.c
 --- trunk~/lnet/klnds/o2iblnd/o2iblnd_modparams.c	2007-09-10 17:35:53.000000000 +0200
-+++ trunk/lnet/klnds/o2iblnd/o2iblnd_modparams.c	2008-10-02 11:54:10.000000000 +0200
++++ trunk/lnet/klnds/o2iblnd/o2iblnd_modparams.c	2008-10-07 13:30:45.000000000 +0200
 @@ -113,9 +113,51 @@
  
  static char ipif_basename_space[32];
@@ -621,7 +621,7 @@
                  .maxlen   = 0,
 diff -urNad trunk~/lnet/klnds/openiblnd/openiblnd_modparams.c trunk/lnet/klnds/openiblnd/openiblnd_modparams.c
 --- trunk~/lnet/klnds/openiblnd/openiblnd_modparams.c	2007-09-10 17:35:54.000000000 +0200
-+++ trunk/lnet/klnds/openiblnd/openiblnd_modparams.c	2008-10-02 11:54:10.000000000 +0200
++++ trunk/lnet/klnds/openiblnd/openiblnd_modparams.c	2008-10-07 13:30:45.000000000 +0200
 @@ -83,9 +83,42 @@
  
  #if defined(CONFIG_SYSCTL) && !CFS_SYSFS_MODULE_PARM
@@ -767,7 +767,7 @@
                  .maxlen   = 0,
 diff -urNad trunk~/lnet/klnds/ptllnd/ptllnd_modparams.c trunk/lnet/klnds/ptllnd/ptllnd_modparams.c
 --- trunk~/lnet/klnds/ptllnd/ptllnd_modparams.c	2007-09-27 04:30:24.000000000 +0200
-+++ trunk/lnet/klnds/ptllnd/ptllnd_modparams.c	2008-10-02 11:54:10.000000000 +0200
++++ trunk/lnet/klnds/ptllnd/ptllnd_modparams.c	2008-10-07 13:30:45.000000000 +0200
 @@ -134,9 +134,54 @@
  }
  #endif
@@ -980,7 +980,7 @@
                  .maxlen   = 0,
 diff -urNad trunk~/lnet/klnds/qswlnd/qswlnd_modparams.c trunk/lnet/klnds/qswlnd/qswlnd_modparams.c
 --- trunk~/lnet/klnds/qswlnd/qswlnd_modparams.c	2007-09-10 17:35:55.000000000 +0200
-+++ trunk/lnet/klnds/qswlnd/qswlnd_modparams.c	2008-10-02 11:54:10.000000000 +0200
++++ trunk/lnet/klnds/qswlnd/qswlnd_modparams.c	2008-10-07 13:30:45.000000000 +0200
 @@ -1,4 +1,7 @@
  /*
 + * -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
@@ -1137,7 +1137,7 @@
                  .maxlen   = 0,
 diff -urNad trunk~/lnet/klnds/ralnd/ralnd_modparams.c trunk/lnet/klnds/ralnd/ralnd_modparams.c
 --- trunk~/lnet/klnds/ralnd/ralnd_modparams.c	2007-08-02 10:30:12.000000000 +0200
-+++ trunk/lnet/klnds/ralnd/ralnd_modparams.c	2008-10-02 11:54:10.000000000 +0200
++++ trunk/lnet/klnds/ralnd/ralnd_modparams.c	2008-10-07 13:30:45.000000000 +0200
 @@ -72,9 +72,37 @@
  };
  
@@ -1260,7 +1260,7 @@
                  .maxlen   = 0,
 diff -urNad trunk~/lnet/klnds/socklnd/socklnd_lib-linux.c trunk/lnet/klnds/socklnd/socklnd_lib-linux.c
 --- trunk~/lnet/klnds/socklnd/socklnd_lib-linux.c	2007-09-11 21:39:20.000000000 +0200
-+++ trunk/lnet/klnds/socklnd/socklnd_lib-linux.c	2008-10-02 11:54:10.000000000 +0200
++++ trunk/lnet/klnds/socklnd/socklnd_lib-linux.c	2008-10-07 13:30:45.000000000 +0200
 @@ -5,197 +5,244 @@
  #include "socklnd.h"
  
@@ -1587,7 +1587,7 @@
  
 diff -urNad trunk~/lnet/klnds/viblnd/viblnd_modparams.c trunk/lnet/klnds/viblnd/viblnd_modparams.c
 --- trunk~/lnet/klnds/viblnd/viblnd_modparams.c	2007-09-27 04:30:24.000000000 +0200
-+++ trunk/lnet/klnds/viblnd/viblnd_modparams.c	2008-10-02 11:54:10.000000000 +0200
++++ trunk/lnet/klnds/viblnd/viblnd_modparams.c	2008-10-07 13:30:45.000000000 +0200
 @@ -125,6 +125,56 @@
  #endif
  };
@@ -1827,7 +1827,7 @@
                  .maxlen   = 0,
 diff -urNad trunk~/lnet/libcfs/linux/linux-curproc.c trunk/lnet/libcfs/linux/linux-curproc.c
 --- trunk~/lnet/libcfs/linux/linux-curproc.c	2007-02-10 01:04:59.000000000 +0100
-+++ trunk/lnet/libcfs/linux/linux-curproc.c	2008-10-02 11:54:10.000000000 +0200
++++ trunk/lnet/libcfs/linux/linux-curproc.c	2008-10-07 13:30:45.000000000 +0200
 @@ -109,6 +109,19 @@
          current->cap_effective = cap;
  }
@@ -1859,7 +1859,7 @@
   * c-indentation-style: "K&R"
 diff -urNad trunk~/lnet/libcfs/linux/linux-proc.c trunk/lnet/libcfs/linux/linux-proc.c
 --- trunk~/lnet/libcfs/linux/linux-proc.c	2008-03-25 13:23:25.000000000 +0100
-+++ trunk/lnet/libcfs/linux/linux-proc.c	2008-10-02 11:54:10.000000000 +0200
++++ trunk/lnet/libcfs/linux/linux-proc.c	2008-10-07 13:30:45.000000000 +0200
 @@ -61,7 +61,8 @@
  static cfs_sysctl_table_header_t *lnet_table_header = NULL;
  extern char lnet_upcall[1024];
@@ -2104,7 +2104,7 @@
  int insert_proc(void)
 diff -urNad trunk~/lnet/lnet/router_proc.c trunk/lnet/lnet/router_proc.c
 --- trunk~/lnet/lnet/router_proc.c	2007-11-29 14:35:39.000000000 +0100
-+++ trunk/lnet/lnet/router_proc.c	2008-10-02 11:54:10.000000000 +0200
++++ trunk/lnet/lnet/router_proc.c	2008-10-07 13:30:45.000000000 +0200
 @@ -32,12 +32,13 @@
  
  /* this is really lnet_proc.c */
@@ -2148,7 +2148,7 @@
  #else
 diff -urNad trunk~/lustre/autoconf/lustre-core.m4 trunk/lustre/autoconf/lustre-core.m4
 --- trunk~/lustre/autoconf/lustre-core.m4	2008-06-26 05:05:21.000000000 +0200
-+++ trunk/lustre/autoconf/lustre-core.m4	2008-10-02 11:54:10.000000000 +0200
++++ trunk/lustre/autoconf/lustre-core.m4	2008-10-07 13:30:45.000000000 +0200
 @@ -1064,27 +1064,90 @@
  ])
  ])
@@ -2440,7 +2440,7 @@
  ])
 diff -urNad trunk~/lustre/include/liblustre.h trunk/lustre/include/liblustre.h
 --- trunk~/lustre/include/liblustre.h	2008-04-24 09:07:44.000000000 +0200
-+++ trunk/lustre/include/liblustre.h	2008-10-02 11:54:10.000000000 +0200
++++ trunk/lustre/include/liblustre.h	2008-10-07 13:30:45.000000000 +0200
 @@ -718,11 +718,13 @@
  struct _cap_struct;
  typedef struct _cap_struct *cap_t;
@@ -2492,7 +2492,7 @@
  
 diff -urNad trunk~/lustre/include/linux/lustre_compat25.h trunk/lustre/include/linux/lustre_compat25.h
 --- trunk~/lustre/include/linux/lustre_compat25.h	2008-03-27 04:32:33.000000000 +0100
-+++ trunk/lustre/include/linux/lustre_compat25.h	2008-10-02 11:54:10.000000000 +0200
++++ trunk/lustre/include/linux/lustre_compat25.h	2008-10-07 13:30:45.000000000 +0200
 @@ -43,6 +43,28 @@
  #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,14) */
  
@@ -2589,7 +2589,7 @@
  #endif /* _COMPAT25_H */
 diff -urNad trunk~/lustre/include/linux/lvfs.h trunk/lustre/include/linux/lvfs.h
 --- trunk~/lustre/include/linux/lvfs.h	2007-07-26 08:24:10.000000000 +0200
-+++ trunk/lustre/include/linux/lvfs.h	2008-10-02 11:54:10.000000000 +0200
++++ trunk/lustre/include/linux/lvfs.h	2008-10-07 13:30:45.000000000 +0200
 @@ -47,7 +47,7 @@
          struct upcall_cache_entry *luc_uce;
          __u32 luc_fsuid;
@@ -2601,7 +2601,7 @@
          __u32 luc_umask;
 diff -urNad trunk~/lustre/include/lprocfs_status.h trunk/lustre/include/lprocfs_status.h
 --- trunk~/lustre/include/lprocfs_status.h	2008-04-18 06:47:52.000000000 +0200
-+++ trunk/lustre/include/lprocfs_status.h	2008-10-02 11:54:10.000000000 +0200
++++ trunk/lustre/include/lprocfs_status.h	2008-10-07 13:30:45.000000000 +0200
 @@ -481,6 +481,8 @@
  #define LPROCFS_EXIT()            do {  \
          up_read(&_lprocfs_lock);        \
@@ -2627,7 +2627,7 @@
   * the import in a client obd_device for a lprocfs entry */
 diff -urNad trunk~/lustre/include/lustre_log.h trunk/lustre/include/lustre_log.h
 --- trunk~/lustre/include/lustre_log.h	2007-08-24 13:12:48.000000000 +0200
-+++ trunk/lustre/include/lustre_log.h	2008-10-02 11:54:10.000000000 +0200
++++ trunk/lustre/include/lustre_log.h	2008-10-07 13:30:45.000000000 +0200
 @@ -218,14 +218,6 @@
          void                    *llog_proc_cb;
  };
@@ -2690,7 +2690,7 @@
  
 diff -urNad trunk~/lustre/include/lustre_mds.h trunk/lustre/include/lustre_mds.h
 --- trunk~/lustre/include/lustre_mds.h	2008-04-24 06:41:00.000000000 +0200
-+++ trunk/lustre/include/lustre_mds.h	2008-10-02 11:54:10.000000000 +0200
++++ trunk/lustre/include/lustre_mds.h	2008-10-07 13:30:45.000000000 +0200
 @@ -177,7 +177,7 @@
                   struct page *, struct ptlrpc_request **);
  int mdc_create(struct obd_export *exp, struct mdc_op_data *op_data,
@@ -2701,8 +2701,8 @@
                 struct ptlrpc_request **request);
  int mdc_link(struct obd_export *exp, struct mdc_op_data *data,
 diff -urNad trunk~/lustre/llite/file.c trunk/lustre/llite/file.c
---- trunk~/lustre/llite/file.c	2008-10-02 11:54:09.000000000 +0200
-+++ trunk/lustre/llite/file.c	2008-10-02 11:54:10.000000000 +0200
+--- trunk~/lustre/llite/file.c	2008-10-07 13:30:45.000000000 +0200
++++ trunk/lustre/llite/file.c	2008-10-07 13:30:45.000000000 +0200
 @@ -1681,9 +1681,17 @@
  /*
   * Send file content (through pagecache) somewhere with helper
@@ -2836,7 +2836,7 @@
          .fsync          = ll_fsync,
 diff -urNad trunk~/lustre/llite/llite_internal.h trunk/lustre/llite/llite_internal.h
 --- trunk~/lustre/llite/llite_internal.h	2008-04-26 16:30:54.000000000 +0200
-+++ trunk/lustre/llite/llite_internal.h	2008-10-02 11:54:10.000000000 +0200
++++ trunk/lustre/llite/llite_internal.h	2008-10-07 13:30:45.000000000 +0200
 @@ -681,9 +681,6 @@
  /* llite/llite_nfs.c */
  extern struct export_operations lustre_export_operations;
@@ -2849,7 +2849,7 @@
  extern struct inode_operations ll_special_inode_operations;
 diff -urNad trunk~/lustre/llite/llite_lib.c trunk/lustre/llite/llite_lib.c
 --- trunk~/lustre/llite/llite_lib.c	2008-05-28 21:15:40.000000000 +0200
-+++ trunk/lustre/llite/llite_lib.c	2008-10-02 11:54:10.000000000 +0200
++++ trunk/lustre/llite/llite_lib.c	2008-10-07 13:30:45.000000000 +0200
 @@ -1347,7 +1347,7 @@
                  rc = vmtruncate(inode, new_size);
                  clear_bit(LLI_F_SRVLOCK, &lli->lli_flags);
@@ -2861,7 +2861,7 @@
          }
 diff -urNad trunk~/lustre/llite/llite_mmap.c trunk/lustre/llite/llite_mmap.c
 --- trunk~/lustre/llite/llite_mmap.c	2008-03-27 04:32:37.000000000 +0100
-+++ trunk/lustre/llite/llite_mmap.c	2008-10-02 12:00:29.000000000 +0200
++++ trunk/lustre/llite/llite_mmap.c	2008-10-07 13:32:03.000000000 +0200
 @@ -38,9 +38,6 @@
  #include <linux/mm.h>
  #include <linux/pagemap.h>
@@ -2902,7 +2902,7 @@
                      vma->vm_flags & VM_SHARED) {
                          ret = vma;
                          break;
-@@ -350,28 +340,119 @@
+@@ -350,53 +340,28 @@
          RETURN(0);
  }
  
@@ -2922,93 +2922,110 @@
 - * In 2.6, the truncate_count of address_space can cover this race.
 - */
 -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
+-struct page *ll_nopage(struct vm_area_struct *vma, unsigned long address,
+-                       int *type)
+-#else
+-struct page *ll_nopage(struct vm_area_struct *vma, unsigned long address,
+-                       int type /* unused */)
+-#endif
 +static int ll_get_extent_lock(struct vm_area_struct *vma, unsigned long pgoff,
 +                             int *save_flags, struct lustre_handle *lockh)
-+{
-+        struct file *filp = vma->vm_file;
-+        struct ll_file_data *fd = LUSTRE_FPRIVATE(filp);
-+        struct inode *inode = filp->f_dentry->d_inode;
-+        ldlm_policy_data_t policy;
-+        ldlm_mode_t mode;
-+        struct ll_inode_info *lli = ll_i2info(inode);
-+        struct ost_lvb lvb;
-+        __u64 kms, old_mtime;
+ {
+         struct file *filp = vma->vm_file;
+         struct ll_file_data *fd = LUSTRE_FPRIVATE(filp);
+         struct inode *inode = filp->f_dentry->d_inode;
+-        struct lustre_handle lockh = { 0 };
+         ldlm_policy_data_t policy;
+         ldlm_mode_t mode;
+-        struct page *page = NULL;
+         struct ll_inode_info *lli = ll_i2info(inode);
+-        struct lov_stripe_md *lsm;
+         struct ost_lvb lvb;
+         __u64 kms, old_mtime;
+-        unsigned long pgoff, size, rand_read, seq_read;
+-        int rc = 0;
+-        ENTRY;
 +        unsigned long size;
 +
-+
-+        if (lli->lli_smd == NULL) {
-+                CERROR("No lsm on fault?\n");
+ 
+         if (lli->lli_smd == NULL) {
+                 CERROR("No lsm on fault?\n");
+-                RETURN(NULL);
 +                RETURN(0);
-+        }
-+        ll_clear_file_contended(inode);
-+
-+        /* start and end the lock on the first and last bytes in the page */
+         }
+-
+         ll_clear_file_contended(inode);
+ 
+         /* start and end the lock on the first and last bytes in the page */
+-        policy_from_vma(&policy, vma, address, CFS_PAGE_SIZE);
 +        policy_from_vma(&policy, vma, pgoff, CFS_PAGE_SIZE);
-+
-+        CDEBUG(D_MMAP, "nopage vma %p inode %lu, locking ["LPU64", "LPU64"]\n",
-+               vma, inode->i_ino, policy.l_extent.start, policy.l_extent.end);
-+
-+        mode = mode_from_vma(vma);
-+        old_mtime = LTIME_S(inode->i_mtime);
-+
+ 
+         CDEBUG(D_MMAP, "nopage vma %p inode %lu, locking ["LPU64", "LPU64"]\n",
+                vma, inode->i_ino, policy.l_extent.start, policy.l_extent.end);
+@@ -404,26 +369,23 @@
+         mode = mode_from_vma(vma);
+         old_mtime = LTIME_S(inode->i_mtime);
+ 
+-        lsm = lli->lli_smd;
+-        rc = ll_extent_lock(fd, inode, lsm, mode, &policy,
+-                            &lockh, LDLM_FL_CBPENDING | LDLM_FL_NO_LRU);
+-        if (rc != 0)
+-                RETURN(NULL);
 +        if(ll_extent_lock(fd, inode, lli->lli_smd, mode, &policy,
 +                           lockh, LDLM_FL_CBPENDING | LDLM_FL_NO_LRU))
 +                RETURN(0);
-+
-+        if (vma->vm_flags & VM_EXEC && LTIME_S(inode->i_mtime) != old_mtime)
-+                CWARN("binary changed. inode %lu\n", inode->i_ino);
-+
+ 
+         if (vma->vm_flags & VM_EXEC && LTIME_S(inode->i_mtime) != old_mtime)
+                 CWARN("binary changed. inode %lu\n", inode->i_ino);
+ 
+-        lov_stripe_lock(lsm);
 +        lov_stripe_lock(lli->lli_smd);
-+        inode_init_lvb(inode, &lvb);
+         inode_init_lvb(inode, &lvb);
+-        obd_merge_lvb(ll_i2obdexp(inode), lsm, &lvb, 1);
 +        obd_merge_lvb(ll_i2obdexp(inode), lli->lli_smd, &lvb, 1);
-+        kms = lvb.lvb_size;
-+
-+        size = (kms + CFS_PAGE_SIZE - 1) >> CFS_PAGE_SHIFT;
-+        if (pgoff >= size) {
+         kms = lvb.lvb_size;
+ 
+-        pgoff = ((address - vma->vm_start) >> CFS_PAGE_SHIFT) + vma->vm_pgoff;
+         size = (kms + CFS_PAGE_SIZE - 1) >> CFS_PAGE_SHIFT;
+-
+         if (pgoff >= size) {
+-                lov_stripe_unlock(lsm);
 +                lov_stripe_unlock(lli->lli_smd);
-+                ll_glimpse_size(inode, LDLM_FL_BLOCK_GRANTED);
+                 ll_glimpse_size(inode, LDLM_FL_BLOCK_GRANTED);
 +                lov_stripe_lock(lli->lli_smd);
-+        } else {
-+                /* XXX change inode size without ll_inode_size_lock() held!
-+                 *     there is a race condition with truncate path. (see
-+                 *     ll_extent_lock) */
-+                /* XXX i_size_write() is not used because it is not safe to
-+                 *     take the ll_inode_size_lock() due to a potential lock
-+                 *     inversion (bug 6077).  And since it's not safe to use
-+                 *     i_size_write() without a covering mutex we do the
-+                 *     assignment directly.  It is not critical that the
-+                 *     size be correct. */
-+                /* NOTE: region is within kms and, hence, within real file size (A).
-+                 * We need to increase i_size to cover the read region so that
-+                 * generic_file_read() will do its job, but that doesn't mean
-+                 * the kms size is _correct_, it is only the _minimum_ size.
-+                 * If someone does a stat they will get the correct size which
-+                 * will always be >= the kms value here.  b=11081 */
-+                if (i_size_read(inode) < kms) {
-+                        inode->i_size = kms;
-+                        CDEBUG(D_INODE, "ino=%lu, updating i_size %llu\n",
-+                               inode->i_ino, i_size_read(inode));
-+                }
-+        }
-+
-+        /* If mapping is writeable, adjust kms to cover this page,
-+         * but do not extend kms beyond actual file size.
-+         * policy.l_extent.end is set to the end of the page by policy_from_vma
-+         * bug 10919 */
-+        if (mode == LCK_PW)
+         } else {
+                 /* XXX change inode size without ll_inode_size_lock() held!
+                  *     there is a race condition with truncate path. (see
+@@ -445,38 +407,85 @@
+                         CDEBUG(D_INODE, "ino=%lu, updating i_size %llu\n",
+                                inode->i_ino, i_size_read(inode));
+                 }
+-                lov_stripe_unlock(lsm);
+         }
+ 
+         /* If mapping is writeable, adjust kms to cover this page,
+          * but do not extend kms beyond actual file size.
+          * policy.l_extent.end is set to the end of the page by policy_from_vma
+          * bug 10919 */
+-        lov_stripe_lock(lsm);
+         if (mode == LCK_PW)
+-                obd_adjust_kms(ll_i2obdexp(inode), lsm,
 +                obd_adjust_kms(ll_i2obdexp(inode), lli->lli_smd,
-+                               min_t(loff_t, policy.l_extent.end + 1,
-+                               i_size_read(inode)), 0);
+                                min_t(loff_t, policy.l_extent.end + 1,
+                                i_size_read(inode)), 0);
+-        lov_stripe_unlock(lsm);
 +        lov_stripe_unlock(lli->lli_smd);
-+
-+        /* disable VM_SEQ_READ and use VM_RAND_READ to make sure that
-+         * the kernel will not read other pages not covered by ldlm in
-+         * filemap_nopage. we do our readahead in ll_readpage.
-+         */
+ 
+         /* disable VM_SEQ_READ and use VM_RAND_READ to make sure that
+          * the kernel will not read other pages not covered by ldlm in
+          * filemap_nopage. we do our readahead in ll_readpage.
+          */
+-        rand_read = vma->vm_flags & VM_RAND_READ;
+-        seq_read = vma->vm_flags & VM_SEQ_READ;
 +       *save_flags = vma->vm_flags & (VM_RAND_READ | VM_SEQ_READ);
-+        vma->vm_flags &= ~ VM_SEQ_READ;
-+        vma->vm_flags |= VM_RAND_READ;
-+
+         vma->vm_flags &= ~ VM_SEQ_READ;
+         vma->vm_flags |= VM_RAND_READ;
+ 
 +        RETURN(1);
 +}
 +
@@ -3027,25 +3044,7 @@
 +        ll_extent_unlock(fd, inode, ll_i2info(inode)->lli_smd, mode, lockh);
 +}
 +
-+#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,22))
-+# if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
- struct page *ll_nopage(struct vm_area_struct *vma, unsigned long address,
-                        int *type)
--#else
-+# else
- struct page *ll_nopage(struct vm_area_struct *vma, unsigned long address,
-                        int type /* unused */)
--#endif
-+# endif
- {
-         struct file *filp = vma->vm_file;
-         struct ll_file_data *fd = LUSTRE_FPRIVATE(filp);
-@@ -477,6 +558,49 @@
-         ll_extent_unlock(fd, inode, ll_i2info(inode)->lli_smd, mode, &lockh);
-         RETURN(page);
- }
-+#else
-+# ifndef HAVE_VM_OP_FAULT
++#ifndef HAVE_VM_OP_FAULT
 +struct page *ll_nopage(struct vm_area_struct *vma, unsigned long address,
 +                       int *type) {
 +        struct lustre_handle lockh = { 0 };
@@ -3055,18 +3054,21 @@
 +        ENTRY;
 +
 +        pgoff = ((address - vma->vm_start) >> CFS_PAGE_SHIFT) + vma->vm_pgoff;
-+        if(!ll_extent_tree_lock(vma, pgoff, &save_fags, &lockh))
++        if(!ll_get_extent_lock(vma, pgoff, &save_fags, &lockh))
 +                RETURN(NOPAGE_SIGBUS);
 +
-+        page = filemap_nopage(vma, address, type);
-+        LL_CDEBUG_PAGE(D_PAGE, page, "got addr %lu type %lx\n", address,
-+                       (long)type);
-+
-+        ll_put_tree_lock(vma, save_fags, &lockh);
-+
-+        RETURN(page);
-+}
-+# else
+         page = filemap_nopage(vma, address, type);
+         LL_CDEBUG_PAGE(D_PAGE, page, "got addr %lu type %lx\n", address,
+                        (long)type);
+-        vma->vm_flags &= ~VM_RAND_READ;
+-        vma->vm_flags |= (rand_read | seq_read);
+ 
+-        ll_extent_unlock(fd, inode, ll_i2info(inode)->lli_smd, mode, &lockh);
++        ll_put_extent_lock(vma, save_fags, &lockh);
++
+         RETURN(page);
+ }
++#else
 +/* New fault() API*/
 +int ll_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
 +{
@@ -3085,12 +3087,11 @@
 +
 +        RETURN(rc);
 +}
-+# endif
 +#endif
  
  /* To avoid cancel the locks covering mmapped region for lock cache pressure,
   * we track the mapped vma count by lli_mmap_cnt.
-@@ -542,9 +666,12 @@
+@@ -542,9 +551,12 @@
          }
  }
  
@@ -3105,7 +3106,7 @@
  #endif
  static int ll_populate(struct vm_area_struct *area, unsigned long address,
                         unsigned long len, pgprot_t prot, unsigned long pgoff,
-@@ -566,47 +693,6 @@
+@@ -566,47 +578,6 @@
  
  }
  
@@ -3153,7 +3154,7 @@
  /* XXX put nice comment here.  talk about __free_pte -> dirty pages and
   * nopage's reference passing to the pte */
  int ll_teardown_mmaps(struct address_space *mapping, __u64 first, __u64 last)
-@@ -615,32 +701,21 @@
+@@ -615,32 +586,21 @@
          ENTRY;
  
          LASSERTF(last > first, "last "LPU64" first "LPU64"\n", last, first);
@@ -3190,7 +3191,7 @@
          .populate       = ll_populate,
  #endif
  };
-@@ -653,8 +728,7 @@
+@@ -653,8 +613,7 @@
          ll_stats_ops_tally(ll_i2sbi(file->f_dentry->d_inode), LPROC_LL_MAP, 1);
          rc = generic_file_mmap(file, vma);
          if (rc == 0) {
@@ -3202,7 +3203,7 @@
  #endif
 diff -urNad trunk~/lustre/llite/llite_nfs.c trunk/lustre/llite/llite_nfs.c
 --- trunk~/lustre/llite/llite_nfs.c	2008-04-24 06:41:05.000000000 +0200
-+++ trunk/lustre/llite/llite_nfs.c	2008-10-02 11:54:10.000000000 +0200
++++ trunk/lustre/llite/llite_nfs.c	2008-10-07 13:30:45.000000000 +0200
 @@ -40,11 +40,7 @@
          return (key0 << 1);
  }
@@ -3479,7 +3480,7 @@
 +};
 diff -urNad trunk~/lustre/llite/lloop.c trunk/lustre/llite/lloop.c
 --- trunk~/lustre/llite/lloop.c	2007-11-21 13:11:10.000000000 +0100
-+++ trunk/lustre/llite/lloop.c	2008-10-02 11:54:10.000000000 +0200
++++ trunk/lustre/llite/lloop.c	2008-10-07 13:30:45.000000000 +0200
 @@ -299,7 +299,7 @@
          if (atomic_dec_and_test(&lo->lo_pending))
                  up(&lo->lo_bh_mutex);
@@ -3500,7 +3501,7 @@
  /*
 diff -urNad trunk~/lustre/llite/namei.c trunk/lustre/llite/namei.c
 --- trunk~/lustre/llite/namei.c	2008-04-24 06:41:06.000000000 +0200
-+++ trunk/lustre/llite/namei.c	2008-10-02 11:54:10.000000000 +0200
++++ trunk/lustre/llite/namei.c	2008-10-07 13:30:45.000000000 +0200
 @@ -879,7 +879,7 @@
  
          err = mdc_create(sbi->ll_mdc_exp, &op_data, tgt, tgt_len,
@@ -3512,7 +3513,7 @@
  
 diff -urNad trunk~/lustre/llite/rw.c trunk/lustre/llite/rw.c
 --- trunk~/lustre/llite/rw.c	2008-04-03 05:23:43.000000000 +0200
-+++ trunk/lustre/llite/rw.c	2008-10-02 11:54:10.000000000 +0200
++++ trunk/lustre/llite/rw.c	2008-10-07 13:30:45.000000000 +0200
 @@ -161,7 +161,7 @@
                  GOTO(out_unlock, 0);
          }
@@ -3524,7 +3525,7 @@
                  struct ost_lvb lvb;
 diff -urNad trunk~/lustre/llite/symlink.c trunk/lustre/llite/symlink.c
 --- trunk~/lustre/llite/symlink.c	2007-10-25 04:14:35.000000000 +0200
-+++ trunk/lustre/llite/symlink.c	2008-10-02 11:54:10.000000000 +0200
++++ trunk/lustre/llite/symlink.c	2008-10-07 13:30:45.000000000 +0200
 @@ -156,8 +156,12 @@
          rc = ll_readlink_internal(inode, &request, &symname);
          up(&lli->lli_size_sem);
@@ -3540,7 +3541,7 @@
  
 diff -urNad trunk~/lustre/lvfs/lvfs_linux.c trunk/lustre/lvfs/lvfs_linux.c
 --- trunk~/lustre/lvfs/lvfs_linux.c	2007-10-30 06:25:57.000000000 +0100
-+++ trunk/lustre/lvfs/lvfs_linux.c	2008-10-02 11:54:10.000000000 +0200
++++ trunk/lustre/lvfs/lvfs_linux.c	2008-10-07 13:30:45.000000000 +0200
 @@ -133,10 +133,10 @@
          */
  
@@ -3595,7 +3596,7 @@
  
 diff -urNad trunk~/lustre/mdc/mdc_internal.h trunk/lustre/mdc/mdc_internal.h
 --- trunk~/lustre/mdc/mdc_internal.h	2008-01-17 14:00:30.000000000 +0100
-+++ trunk/lustre/mdc/mdc_internal.h	2008-10-02 11:54:10.000000000 +0200
++++ trunk/lustre/mdc/mdc_internal.h	2008-10-07 13:30:45.000000000 +0200
 @@ -28,7 +28,7 @@
                        void *ea2, int ea2len);
  void mdc_create_pack(struct ptlrpc_request *req, int offset,
@@ -3607,7 +3608,7 @@
                     struct mdc_op_data *op_data, __u32 mode, __u64 rdev,
 diff -urNad trunk~/lustre/mdc/mdc_lib.c trunk/lustre/mdc/mdc_lib.c
 --- trunk~/lustre/mdc/mdc_lib.c	2008-03-26 07:22:04.000000000 +0100
-+++ trunk/lustre/mdc/mdc_lib.c	2008-10-02 11:54:10.000000000 +0200
++++ trunk/lustre/mdc/mdc_lib.c	2008-10-07 13:30:45.000000000 +0200
 @@ -46,7 +46,7 @@
          b = lustre_msg_buf(req->rq_reqmsg, offset, sizeof(*b));
          b->fsuid = current->fsuid;
@@ -3700,7 +3701,7 @@
          /* skip MDS_BFLAG_EXT_FLAGS to verify the "client < 1.4.7" case 
 diff -urNad trunk~/lustre/mdc/mdc_reint.c trunk/lustre/mdc/mdc_reint.c
 --- trunk~/lustre/mdc/mdc_reint.c	2008-02-18 13:43:18.000000000 +0100
-+++ trunk/lustre/mdc/mdc_reint.c	2008-10-02 11:54:10.000000000 +0200
++++ trunk/lustre/mdc/mdc_reint.c	2008-10-07 13:30:45.000000000 +0200
 @@ -164,7 +164,7 @@
  
  int mdc_create(struct obd_export *exp, struct mdc_op_data *op_data,
@@ -3712,7 +3713,7 @@
          struct obd_device *obd = exp->exp_obd;
 diff -urNad trunk~/lustre/mgc/mgc_request.c trunk/lustre/mgc/mgc_request.c
 --- trunk~/lustre/mgc/mgc_request.c	2008-04-24 13:54:15.000000000 +0200
-+++ trunk/lustre/mgc/mgc_request.c	2008-10-02 11:54:10.000000000 +0200
++++ trunk/lustre/mgc/mgc_request.c	2008-10-07 13:30:45.000000000 +0200
 @@ -395,7 +395,7 @@
          obd->obd_lvfs_ctxt.fs = get_ds();
  
@@ -3724,7 +3725,7 @@
          if (IS_ERR(dentry)) {
 diff -urNad trunk~/lustre/obdclass/linux/linux-module.c trunk/lustre/obdclass/linux/linux-module.c
 --- trunk~/lustre/obdclass/linux/linux-module.c	2007-11-13 21:43:24.000000000 +0100
-+++ trunk/lustre/obdclass/linux/linux-module.c	2008-10-02 11:54:10.000000000 +0200
++++ trunk/lustre/obdclass/linux/linux-module.c	2008-10-07 13:30:45.000000000 +0200
 @@ -386,7 +386,7 @@
          ENTRY;
  
@@ -3736,7 +3737,7 @@
                         "LustreError: error registering /proc/fs/lustre\n");
 diff -urNad trunk~/lustre/obdclass/linux/linux-sysctl.c trunk/lustre/obdclass/linux/linux-sysctl.c
 --- trunk~/lustre/obdclass/linux/linux-sysctl.c	2008-03-25 13:25:41.000000000 +0100
-+++ trunk/lustre/obdclass/linux/linux-sysctl.c	2008-10-02 11:54:10.000000000 +0200
++++ trunk/lustre/obdclass/linux/linux-sysctl.c	2008-10-07 13:30:45.000000000 +0200
 @@ -48,7 +48,9 @@
  
  cfs_sysctl_table_header_t *obd_table_header = NULL;
@@ -4062,7 +4063,7 @@
  void obd_sysctl_init (void)
 diff -urNad trunk~/lustre/obdclass/llog_obd.c trunk/lustre/obdclass/llog_obd.c
 --- trunk~/lustre/obdclass/llog_obd.c	2007-12-24 21:15:32.000000000 +0100
-+++ trunk/lustre/obdclass/llog_obd.c	2008-10-02 11:54:10.000000000 +0200
++++ trunk/lustre/obdclass/llog_obd.c	2008-10-07 13:30:45.000000000 +0200
 @@ -178,7 +178,7 @@
                  struct lov_stripe_md *lsm, struct llog_cookie *logcookies,
                  int numcookies)
@@ -4087,7 +4088,7 @@
  EXPORT_SYMBOL(llog_add);
 diff -urNad trunk~/lustre/obdclass/lprocfs_status.c trunk/lustre/obdclass/lprocfs_status.c
 --- trunk~/lustre/obdclass/lprocfs_status.c	2008-05-20 04:03:20.000000000 +0200
-+++ trunk/lustre/obdclass/lprocfs_status.c	2008-10-02 11:54:10.000000000 +0200
++++ trunk/lustre/obdclass/lprocfs_status.c	2008-10-07 13:30:45.000000000 +0200
 @@ -117,6 +117,8 @@
          proc->read_proc = read_proc;
          proc->write_proc = write_proc;
@@ -4117,7 +4118,7 @@
          return rc;
 diff -urNad trunk~/lustre/ptlrpc/service.c trunk/lustre/ptlrpc/service.c
 --- trunk~/lustre/ptlrpc/service.c	2008-05-13 07:10:50.000000000 +0200
-+++ trunk/lustre/ptlrpc/service.c	2008-10-02 11:54:10.000000000 +0200
++++ trunk/lustre/ptlrpc/service.c	2008-10-07 13:30:45.000000000 +0200
 @@ -1244,7 +1244,7 @@
          cfs_daemonize(name);
          exit_fs(cfs_current());
@@ -4129,7 +4130,7 @@
  static void
 diff -urNad trunk~/lustre/quota/quotacheck_test.c trunk/lustre/quota/quotacheck_test.c
 --- trunk~/lustre/quota/quotacheck_test.c	2008-01-03 07:31:16.000000000 +0100
-+++ trunk/lustre/quota/quotacheck_test.c	2008-10-02 11:54:10.000000000 +0200
++++ trunk/lustre/quota/quotacheck_test.c	2008-10-07 13:30:45.000000000 +0200
 @@ -70,7 +70,14 @@
          if (ext3_test_bit(index, bitmap_bh->b_data)) {
                  CERROR("i: %d, ino: %lu\n", index, ino);




More information about the Pkg-lustre-svn-commit mailing list