[Pkg-lustre-svn-commit] r334 - in /trunk/debian/patches: 00list bug11720-enable-checksumming.dpatch

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


Author: pwinnertz-guest
Date: Wed Sep 19 10:23:53 2007
New Revision: 334

URL: http://svn.debian.org/wsvn/pkg-lustre/?sc=1&rev=334
Log:
Added patch to enable checksumming by default

Added:
    trunk/debian/patches/bug11720-enable-checksumming.dpatch
Modified:
    trunk/debian/patches/00list

Modified: trunk/debian/patches/00list
URL: http://svn.debian.org/wsvn/pkg-lustre/trunk/debian/patches/00list?rev=334&op=diff
==============================================================================
--- trunk/debian/patches/00list (original)
+++ trunk/debian/patches/00list Wed Sep 19 10:23:53 2007
@@ -25,3 +25,6 @@
 # Debian patches
 autogen-run.dpatch
 lustre_config.dpatch
+
+#discuss needed:
+bug11720-enable-checksumming.dpatch

Added: trunk/debian/patches/bug11720-enable-checksumming.dpatch
URL: http://svn.debian.org/wsvn/pkg-lustre/trunk/debian/patches/bug11720-enable-checksumming.dpatch?rev=334&op=file
==============================================================================
--- trunk/debian/patches/bug11720-enable-checksumming.dpatch (added)
+++ trunk/debian/patches/bug11720-enable-checksumming.dpatch Wed Sep 19 10:23:53 2007
@@ -1,0 +1,106 @@
+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
+@@ -352,6 +352,23 @@ fi
+ ])
+ 
+ #
++# LC_CONFIG_CHECKSUM
++#
++# do checksum of bulk data between client and OST
++#
++AC_DEFUN([LC_CONFIG_CHECKSUM],
++[AC_MSG_CHECKING([whether to enable data checksum support])
++AC_ARG_ENABLE([checksum],
++	AC_HELP_STRING([--disable-checksum],
++			[disable data checksum support]),
++	[],[enable_checksum='yes'])
++AC_MSG_RESULT([$enable_checksum])
++if test x$enable_checksum != xno ; then
++  AC_DEFINE(ENABLE_CHECKSUM, 1, do data checksums)
++fi
++])
++
++#
+ # LC_CONFIG_HEALTH_CHECK_WRITE
+ #
+ # Turn on the actual write to the disk
+@@ -1068,6 +1085,7 @@ if test x$enable_server = xyes ; then
+         LC_CONFIG_BACKINGFS
+ fi
+ LC_CONFIG_PINGER
++LC_CONFIG_CHECKSUM
+ LC_CONFIG_LIBLUSTRE_RECOVERY
+ LC_CONFIG_QUOTA
+ LC_CONFIG_HEALTH_CHECK_WRITE
+diff -u -p -r1.96.6.3 ldlm_lib.c
+--- lustre/ldlm/ldlm_lib.c	21 Jun 2007 06:21:38 -0000	1.96.6.3
++++ lustre/ldlm/ldlm_lib.c	20 Jul 2007 18:08:51 -0000
+@@ -264,6 +264,9 @@ int client_obd_setup(struct obd_device *
+         spin_lock_init(&cli->cl_write_page_hist.oh_lock);
+         spin_lock_init(&cli->cl_read_offset_hist.oh_lock);
+         spin_lock_init(&cli->cl_write_offset_hist.oh_lock);
++#ifdef ENABLE_CHECKSUM
++        cli->cl_checksum = 1;
++#endif
+ 
+         /* 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
+@@ -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);
+ 
++#ifdef ENABLE_CHECKSUM
++        sbi->ll_flags |= LL_SBI_CHECKSUM;
++#endif
++
+ #ifdef HAVE_EXPORT___IGET
+         INIT_LIST_HEAD(&sbi->ll_deathrow);
+         spin_lock_init(&sbi->ll_deathrow_lock);
+ #endif
+-        for (i = 0; i <= LL_PROCESS_HIST_MAX; i++) { 
++        for (i = 0; i <= LL_PROCESS_HIST_MAX; i++) {
+                 spin_lock_init(&sbi->ll_rw_extents_info.pp_extents[i].pp_r_hist.oh_lock);
+                 spin_lock_init(&sbi->ll_rw_extents_info.pp_extents[i].pp_w_hist.oh_lock);
+         }
+@@ -131,7 +135,7 @@ static int client_common_fill_super(stru
+         struct lustre_handle mdc_conn = {0, };
+         struct lustre_md md;
+         struct obd_connect_data *data = NULL;
+-        int err;
++        int err, checksum;
+         ENTRY;
+ 
+         obd = class_name2obd(mdc);
+@@ -353,6 +357,10 @@ static int client_common_fill_super(stru
+                 GOTO(out_root, err);
+         }
+ 
++        checksum = sbi->ll_flags & LL_SBI_CHECKSUM;
++        err = obd_set_info_async(sbi->ll_osc_exp, strlen("checksum"),"checksum",
++                                 sizeof(checksum), &checksum, NULL);
++
+         /* making vm readahead 0 for 2.4.x. In the case of 2.6.x,
+            backing dev info assigned to inode mapping is used for
+            determining maximal readahead. */
+@@ -668,6 +676,17 @@ static int ll_options(char *options, int
+                         goto next;
+                 }
+ 
++                tmp = ll_set_opt("checksum", s1, LL_SBI_CHECKSUM);
++                if (tmp) {
++                        *flags |= tmp;
++                        goto next;
++                }
++                tmp = ll_set_opt("nochecksum", s1, LL_SBI_CHECKSUM);
++                if (tmp) {
++                        *flags &= ~tmp;
++                        goto next;
++                }
++
+                 LCONSOLE_ERROR_MSG(0x152, "Unknown option '%s', won't mount.\n",
+                                    s1);
+                 RETURN(-EINVAL);




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