[Pkg-lustre-svn-commit] r335 - in /trunk/debian/patches: 00list bug11720-enable-checksumming.dpatch bug11771-fix-nfs-export-norootsquash.dpatch

pwinnertz-guest at users.alioth.debian.org pwinnertz-guest at users.alioth.debian.org
Wed Sep 19 10:33:51 UTC 2007


Author: pwinnertz-guest
Date: Wed Sep 19 10:33:51 2007
New Revision: 335

URL: http://svn.debian.org/wsvn/pkg-lustre/?sc=1&rev=335
Log:
Added two more patches from upstream bts. the checksumming patch should be discussed.

Added:
    trunk/debian/patches/bug11771-fix-nfs-export-norootsquash.dpatch
Modified:
    trunk/debian/patches/00list
    trunk/debian/patches/bug11720-enable-checksumming.dpatch

Modified: trunk/debian/patches/00list
URL: http://svn.debian.org/wsvn/pkg-lustre/trunk/debian/patches/00list?rev=335&op=diff
==============================================================================
--- trunk/debian/patches/00list (original)
+++ trunk/debian/patches/00list Wed Sep 19 10:33:51 2007
@@ -21,6 +21,7 @@
 bug12691-fixtypos.dpatch
 bug12567-fix-ldlm_cli_enqueue-errormsg.dpatch
 bug12704-fix-2tb-ost-corruption.dpatch
+bug11771-fix-nfs-export-norootsquash.dpatch
 
 # Debian patches
 autogen-run.dpatch

Modified: trunk/debian/patches/bug11720-enable-checksumming.dpatch
URL: http://svn.debian.org/wsvn/pkg-lustre/trunk/debian/patches/bug11720-enable-checksumming.dpatch?rev=335&op=diff
==============================================================================
--- trunk/debian/patches/bug11720-enable-checksumming.dpatch (original)
+++ trunk/debian/patches/bug11720-enable-checksumming.dpatch Wed Sep 19 10:33:51 2007
@@ -1,6 +1,13 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: enable file checksumming by default
+
+
+ at DPATCH@
 diff -u -p -r1.23.2.9 lustre-core.m4
---- lustre/autoconf/lustre-core.m4	17 Jul 2007 00:14:33 -0000	1.23.2.9
-+++ lustre/autoconf/lustre-core.m4	20 Jul 2007 18:08:50 -0000
+--- ./lustre/autoconf/lustre-core.m4	17 Jul 2007 00:14:33 -0000	1.23.2.9
++++ ./lustre/autoconf/lustre-core.m4	20 Jul 2007 18:08:50 -0000
 @@ -352,6 +352,23 @@ fi
  ])
  
@@ -47,8 +54,8 @@
          /* This value may be changed at connect time in
             ptlrpc_connect_interpret. */
 diff -u -p -r1.134.2.12 llite_lib.c
---- lustre/llite/llite_lib.c	2 Jul 2007 18:48:31 -0000	1.134.2.12
-+++ lustre/llite/llite_lib.c	20 Jul 2007 18:08:53 -0000
+--- ./lustre/llite/llite_lib.c	2 Jul 2007 18:48:31 -0000	1.134.2.12
++++ ./lustre/llite/llite_lib.c	20 Jul 2007 18:08:53 -0000
 @@ -86,11 +86,15 @@ static struct ll_sb_info *ll_init_sbi(vo
          list_add_tail(&sbi->ll_list, &ll_super_blocks);
          spin_unlock(&ll_sb_lock);

Added: trunk/debian/patches/bug11771-fix-nfs-export-norootsquash.dpatch
URL: http://svn.debian.org/wsvn/pkg-lustre/trunk/debian/patches/bug11771-fix-nfs-export-norootsquash.dpatch?rev=335&op=file
==============================================================================
--- trunk/debian/patches/bug11771-fix-nfs-export-norootsquash.dpatch (added)
+++ trunk/debian/patches/bug11771-fix-nfs-export-norootsquash.dpatch Wed Sep 19 10:33:51 2007
@@ -1,0 +1,154 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: enable file checksumming by default
+
+
+ at DPATCH@
+diff -u -p -r1.17 llite_nfs.c
+--- ./lustre/llite/llite_nfs.c	10 Feb 2007 06:31:59 -0000	1.17
++++ ./lustre/llite/llite_nfs.c	25 Jul 2007 06:39:10 -0000
+@@ -63,15 +63,16 @@ static struct inode * search_inode_for_l
+         int eadatalen = 0, rc;
+         struct inode *inode = NULL;
+         struct ll_fid iid = { .id = ino, .generation = generation };
++        ENTRY;
+ 
+         inode = ILOOKUP(sb, ino, ll_nfs_test_inode, &iid);
+ 
+         if (inode)
+-                return inode;
++                RETURN(inode);
+         if (S_ISREG(mode)) {
+                 rc = ll_get_max_mdsize(sbi, &eadatalen);
+                 if (rc) 
+-                        return ERR_PTR(rc); 
++                        RETURN(ERR_PTR(rc));
+                 valid |= OBD_MD_FLEASIZE;
+         }
+         fid.id = (__u64)ino;
+@@ -81,17 +82,17 @@ static struct inode * search_inode_for_l
+         rc = mdc_getattr(sbi->ll_mdc_exp, &fid, valid, eadatalen, &req);
+         if (rc) {
+                 CERROR("failure %d inode %lu\n", rc, ino);
+-                return ERR_PTR(rc);
++                RETURN(ERR_PTR(rc));
+         }
+ 
+         rc = ll_prep_inode(sbi->ll_osc_exp, &inode, req, REPLY_REC_OFF, sb);
+         if (rc) {
+                 ptlrpc_req_finished(req);
+-                return ERR_PTR(rc);
++                RETURN(ERR_PTR(rc));
+         }
+         ptlrpc_req_finished(req);
+ 
+-        return inode;
++        RETURN(inode);
+ }
+ 
+ extern struct dentry_operations ll_d_ops;
+@@ -104,13 +105,14 @@ static struct dentry *ll_iget_for_nfs(st
+ #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
+         struct list_head *lp;
+ #endif
++        ENTRY;
+ 
+         if (ino == 0)
+-                return ERR_PTR(-ESTALE);
++                RETURN(ERR_PTR(-ESTALE));
+ 
+         inode = search_inode_for_lustre(sb, ino, generation, mode);
+         if (IS_ERR(inode)) {
+-                return ERR_PTR(PTR_ERR(inode));
++                RETURN(ERR_PTR(PTR_ERR(inode)));
+         }
+         if (is_bad_inode(inode) ||
+             (generation && inode->i_generation != generation)){
+@@ -120,14 +122,14 @@ static struct dentry *ll_iget_for_nfs(st
+                        atomic_read(&inode->i_count), inode->i_generation,
+                        generation);
+                 iput(inode);
+-                return ERR_PTR(-ESTALE);
++                RETURN(ERR_PTR(-ESTALE));
+         }
+ 
+ #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
+         result = d_alloc_anon(inode);
+         if (!result) {
+                 iput(inode);
+-                return ERR_PTR(-ENOMEM);
++                RETURN(ERR_PTR(-ENOMEM));
+         }
+ #else
+         /* now to find a dentry.
+@@ -143,7 +145,7 @@ static struct dentry *ll_iget_for_nfs(st
+                         unlock_dentry(result);
+                         spin_unlock(&dcache_lock);
+                         iput(inode);
+-                        return result;
++                        RETURN(result);
+                 }
+                 unlock_dentry(result);
+         }
+@@ -151,14 +153,14 @@ static struct dentry *ll_iget_for_nfs(st
+         result = d_alloc_root(inode);
+         if (result == NULL) {
+                 iput(inode);
+-                return ERR_PTR(-ENOMEM);
++                RETURN(ERR_PTR(-ENOMEM));
+         }
+         result->d_flags |= DCACHE_DISCONNECTED;
+ 
+ #endif
+         ll_set_dd(result);
+         result->d_op = &ll_d_ops;
+-        return result;
++        RETURN(result);
+ }
+ 
+ struct dentry *ll_fh_to_dentry(struct super_block *sb, __u32 *data, int len,
+diff -u -p -r1.218.12.10 file.c
+--- ./lustre/llite/file.c	18 Jul 2007 21:13:11 -0000	1.218.12.10
++++ ./lustre/llite/file.c	25 Jul 2007 06:39:10 -0000
+@@ -262,6 +262,7 @@ static int ll_intent_file_open(struct fi
+         struct inode *inode = file->f_dentry->d_inode;
+         struct ptlrpc_request *req;
+         int rc;
++        ENTRY;
+ 
+         if (!parent)
+                 RETURN(-ENOENT);
+@@ -296,7 +297,7 @@ static int ll_intent_file_open(struct fi
+ 
+         if (rc != 0 || it_open_error(DISP_OPEN_OPEN, itp)) {
+                 rc = rc ? rc : it_open_error(DISP_OPEN_OPEN, itp);
+-                CERROR("lock enqueue: err: %d\n", rc);
++                CDEBUG(D_VFSTRACE, "lock enqueue: err: %d\n", rc);
+                 GOTO(out, rc);
+         }
+ 
+diff -u -p -r1.150.32.6 mds_open.c
+--- lustre/mds/mds_open.c	19 Jul 2007 00:22:00 -0000	1.150.32.6
++++ lustre/mds/mds_open.c	25 Jul 2007 06:39:10 -0000
+@@ -982,7 +982,19 @@ int mds_open(struct mds_update_record *r
+         }
+ 
+         /* Step 2: Lookup the child */
+-        dchild = ll_lookup_one_len(rec->ur_name, dparent, rec->ur_namelen - 1);
++      
++        if (!(lustre_msg_get_flags(req->rq_reqmsg) & MSG_REPLAY) &&
++            (rec->ur_flags & MDS_OPEN_LOCK) && (rec->ur_namelen == 1)) {
++                /* hack for nfsd with no_subtree_check, it will use anon
++                 * dentry w/o filename to open the file. 
++                 * And in MDC it cannot derive the dentry's parent dentry,
++                 * hence the file's name, so we hack here in MDS,
++                 * refer to bug 13030. */
++                dchild = mds_fid2dentry(mds, rec->ur_fid1, NULL);
++        } else {
++                dchild = ll_lookup_one_len(rec->ur_name, dparent,
++                                           rec->ur_namelen - 1);
++        }
+         if (IS_ERR(dchild)) {
+                 rc = PTR_ERR(dchild);
+                 dchild = NULL; /* don't confuse mds_finish_transno() below */




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