[Pkg-lustre-maintainers] Debian 2.6.32-5-amd64 and lustre-1.8.5+dfsg-2

Hong Jin Cho hjcho616 at gmail.com
Sat May 28 02:46:46 UTC 2011


Hello everyone!

I was able to get debian 2.6.32-5 source patched with lustre and was able to
mount and copy some files in to the new file system.  I only tried x86_64
builds and applied SLES11 patches.  So I wanted to share this with everyone.
 Or maybe pkg maintainer can add some patches to current debian build and
maintain it.  I do not have regression scripts or don't know enough about
Lustre so I can't guarantee if this is fully working, so please do not use
this for your production machines until one of packaging experts can
validate that this is stable.

I followed instructions at http://wiki.lustre.org/index.php/Debian_Install.
 Instead of 2.6.18 I've downloaded 2.6.32.  Everything went smoothly until
kernel patching step.  I had to do following to get it working.

- Copy 2.6-sles11-2.6.32.series to 2.6.32-vanilla.series  (configure detects
debian source as 2.6.32-vanilla)
- Remove cacheflush_remove_mark_rodata.patch from 2.6.32-vanilla.series
(This one is already in current debian patches).
- Eliminated some warnings.  This step may not be necessary.  There are
more, but it wasn't anything that I would be using so I didn't bother.  None
of these are related to Lustre.
  -
http://git.kernel.org/?p=linux/kernel/git/hjl/linux-2.6.37.y.git;a=commitdiff_plain;h=2c5ce9c1b8eb927c131a31d4466e24e00647e9cb
  -
http://www.mail-archive.com/acpi-bugzilla@lists.sourceforge.net/msg30180.html
  -
http://answers.softpicks.net/answers/topic/-patch-6-6-virtio-fix-section-mismatch-warnings-2160406-1.htm
- CONFIG_SCSI_PROC_FS=y added to .config.  Without this symbol will be
missed and can't compile.
- added EXPORT_SYMBOL(jbd2_log_start_commit); to fs/jbd2/journal.c.
 Otherwise ldiskfs module load will fail.

Then kernel compiles ok with make-kpkg.

Lustre kernel module compile took alot more effort.  m-a a-i fails.  It
doesn't know what kernel it was dealing with so I had to fool it in the
autoMakefile.  In ldiskfs/ldiskfs/autoMakefile, set LDISKFS_SERIES
to 2.6-sles11.series. (Or maybe create 2.6.32-vanilla.series and set it
here?)

Below are the patches I had to make to patches in order to get it working.

diff -urN
lustre/ldiskfs/kernel_patches/patches/ext4-big-endian-check-2.6-sles11.patch
lustre_latest/ldiskfs/kernel_patches/patches/ext4-big-endian-check-2.6-sles11.patch
---
lustre/ldiskfs/kernel_patches/patches/ext4-big-endian-check-2.6-sles11.patch2010-06-24
23:23:17.000000000 -0500
+++
lustre_latest/ldiskfs/kernel_patches/patches/ext4-big-endian-check-2.6-sles11.patch
2011-05-23 03:13:23.000000000 -0500
@@ -11,19 +11,16 @@
  ext4_fsblk_t ext4_block_bitmap(struct super_block *sb,
                               struct ext4_group_desc *bg)
  {
-@@ -1291,7 +1293,7 @@ enum {
+@@ -1291,6 +1293,7 @@ enum {
        Opt_stripe, Opt_delalloc, Opt_nodelalloc,
        Opt_block_validity, Opt_noblock_validity,
        Opt_inode_readahead_blks, Opt_journal_ioprio,
--      Opt_discard, Opt_nodiscard,
-+      Opt_discard, Opt_nodiscard, Opt_bigendian_extents,
++      Opt_bigendian_extents,
        Opt_iopen, Opt_noiopen, Opt_iopen_nopriv,
  };

-@@ -1353,6 +1355,7 @@ static const match_table_t tokens = {
+@@ -1353,4 +1355,5 @@ static const match_table_t tokens = {
        {Opt_noauto_da_alloc, "noauto_da_alloc"},
-       {Opt_discard, "discard"},
-       {Opt_nodiscard, "nodiscard"},
 +      {Opt_bigendian_extents, "bigendian_extents"},
        {Opt_err, NULL},
  };
diff -urN lustre/ldiskfs/kernel_patches/patches/ext4-lustre-i_version.patch
lustre_latest/ldiskfs/kernel_patches/patches/ext4-lustre-i_version.patch
--- lustre/ldiskfs/kernel_patches/patches/ext4-lustre-i_version.patch
2010-06-24 23:23:17.000000000 -0500
+++ lustre_latest/ldiskfs/kernel_patches/patches/ext4-lustre-i_version.patch
  2011-05-23 03:14:38.000000000 -0500
@@ -12,9 +12,9 @@
   * storage for cached extent
   */
 @@ -138,6 +140,8 @@ struct ext4_inode_info {
-        */
-       tid_t i_sync_tid;
-       tid_t i_datasync_tid;
+       struct list_head i_aio_dio_complete_list;
+       /* current io_end structure for async DIO write*/
+       ext4_io_end_t *cur_aio_dio;
 +
 +      __u64 i_fs_version;
  };
diff -urN
lustre/ldiskfs/kernel_patches/patches/ext4-mballoc-extra-checks-sles11.patch
lustre_latest/ldiskfs/kernel_patches/patches/ext4-mballoc-extra-checks-sles11.patch
---
lustre/ldiskfs/kernel_patches/patches/ext4-mballoc-extra-checks-sles11.patch2010-06-24
23:23:17.000000000 -0500
+++
lustre_latest/ldiskfs/kernel_patches/patches/ext4-mballoc-extra-checks-sles11.patch
2011-05-23 03:12:13.000000000 -0500
@@ -123,7 +123,7 @@
        ext4_lock_group(sb, group);
        memcpy(&sg, ext4_get_group_info(sb, group), i);
        ext4_unlock_group(sb, group);
-       ext4_mb_unload_buddy(&e4b);
+       ext4_mb_release_desc(&e4b);

 -      seq_printf(seq, "#%-5u: %-5u %-5u %-5u [", group, sg.info.bb_free,
 +      seq_printf(seq, "#%-5u: %-5u %-5u %-5u %-5u [", group,
diff -urN lustre/ldiskfs/kernel_patches/patches/ext4-mmp-sles11.patch
lustre_latest/ldiskfs/kernel_patches/patches/ext4-mmp-sles11.patch
--- lustre/ldiskfs/kernel_patches/patches/ext4-mmp-sles11.patch 2010-06-24
23:23:17.000000000 -0500
+++ lustre_latest/ldiskfs/kernel_patches/patches/ext4-mmp-sles11.patch
 2011-05-23 03:10:09.000000000 -0500
@@ -397,6 +397,10 @@
        }
 +      if (sbi->s_mmp_tsk)
 +              kthread_stop(sbi->s_mmp_tsk);
+       percpu_counter_destroy(&sbi->s_freeblocks_counter);
+       percpu_counter_destroy(&sbi->s_freeinodes_counter);
+       percpu_counter_destroy(&sbi->s_dirs_counter);
+       percpu_counter_destroy(&sbi->s_dirtyblocks_counter);
  failed_mount2:
        for (i = 0; i < db_count; i++)
                brelse(sbi->s_group_desc[i]);
diff -urN
lustre/ldiskfs/kernel_patches/patches/ext4-osd-iop-common-sles11.patch
lustre_latest/ldiskfs/kernel_patches/patches/ext4-osd-iop-common-sles11.patch
--- lustre/ldiskfs/kernel_patches/patches/ext4-osd-iop-common-sles11.patch
  2010-06-24 23:23:17.000000000 -0500
+++
lustre_latest/ldiskfs/kernel_patches/patches/ext4-osd-iop-common-sles11.patch
      2011-05-23 03:19:24.000000000 -0500
@@ -119,7 +119,7 @@
 -retry:
 -      handle = ext4_journal_start(dir, EXT4_DATA_TRANS_BLOCKS(dir->i_sb) +
 -                                      EXT4_INDEX_EXTRA_TRANS_BLOCKS + 3 +
--
 EXT4_MAXQUOTAS_INIT_BLOCKS(dir->i_sb));
+-
 2*EXT4_QUOTA_INIT_BLOCKS(dir->i_sb));
        if (IS_ERR(handle))
                return PTR_ERR(handle);

diff -urN lustre/ldiskfs/kernel_patches/patches/ext4-pdir-fix.patch
lustre_latest/ldiskfs/kernel_patches/patches/ext4-pdir-fix.patch
--- lustre/ldiskfs/kernel_patches/patches/ext4-pdir-fix.patch   2010-06-24
23:23:17.000000000 -0500
+++ lustre_latest/ldiskfs/kernel_patches/patches/ext4-pdir-fix.patch
 2011-05-23 03:18:23.000000000 -0500
@@ -6,13 +6,13 @@
  #include <linux/blockgroup_lock.h>
  #include <linux/percpu_counter.h>
 +#include <linux/dynlocks.h>
- #ifdef __KERNEL__
- #include <linux/compat.h>
- #endif
+
+ #define USE_I_FS_VERSION
+
 @@ -56,7 +57,9 @@ struct ext4_inode_info {
        __u32   i_flags;
-       __u32   i_dtime;
        ext4_fsblk_t    i_file_acl;
+       __u32   i_dtime;
 -
 +      /* following fields for parallel directory operations -bzzz */
 +      struct dynlock   i_htree_lock;
diff -urN lustre/ldiskfs/kernel_patches/patches/ext4-prealloc-sles11.patch
lustre_latest/ldiskfs/kernel_patches/patches/ext4-prealloc-sles11.patch
--- lustre/ldiskfs/kernel_patches/patches/ext4-prealloc-sles11.patch
 2010-06-24 23:23:17.000000000 -0500
+++ lustre_latest/ldiskfs/kernel_patches/patches/ext4-prealloc-sles11.patch
   2011-05-23 03:10:59.000000000 -0500
@@ -330,7 +330,7 @@

        /* don't use group allocation for large files */
        size = max(size, isize);
--      if (size > sbi->s_mb_stream_request) {
+-      if (size >= sbi->s_mb_stream_request) {
 +      if (size > sbi->s_mb_large_req) {
                ac->ac_flags |= EXT4_MB_STREAM_ALLOC;
                return;
diff -urN lustre/ldiskfs/kernel_patches/patches/iopen-sles11.patch
lustre_latest/ldiskfs/kernel_patches/patches/iopen-sles11.patch
--- lustre/ldiskfs/kernel_patches/patches/iopen-sles11.patch    2010-06-24
23:23:17.000000000 -0500
+++ lustre_latest/ldiskfs/kernel_patches/patches/iopen-sles11.patch
2011-05-23 03:08:50.000000000 -0500
@@ -345,10 +345,10 @@
 ===================================================================
 --- linux-2.6.27.21-0.1.orig/fs/ext4/super.c
 +++ linux-2.6.27.21-0.1/fs/ext4/super.c
-@@ -955,6 +955,7 @@ enum {
+@@ -955,5 +955,6 @@ enum {
        Opt_block_validity, Opt_noblock_validity,
-       Opt_inode_readahead_blks, Opt_journal_ioprio,
-       Opt_discard, Opt_nodiscard,
+-      Opt_inode_readahead_blks, Opt_journal_ioprio
++      Opt_inode_readahead_blks, Opt_journal_ioprio,
 +      Opt_iopen, Opt_noiopen, Opt_iopen_nopriv,
  };

@@ -501,10 +501,9 @@
 ===================================================================
 --- linux-2.6.27.21-0.1.orig/fs/ext4/ext4.h
 +++ linux-2.6.27.21-0.1/fs/ext4/ext4.h
-@@ -540,6 +540,8 @@ do {
          \
+@@ -540,5 +540,7 @@ do {
          \
  #define EXT4_MOUNT_DATA_ERR_ABORT     0x10000000 /* Abort on file data
write */
  #define EXT4_MOUNT_BLOCK_VALIDITY     0x20000000 /* Block validity
checking */
- #define EXT4_MOUNT_DISCARD            0x40000000 /* Issue DISCARD requests
*/
 +#define EXT4_MOUNT_IOPEN              0x80000000 /* Allow access via iopen
*/
 +#define EXT4_MOUNT_IOPEN_NOPRIV       0x100000000ULL /* Make iopen
world-readable */

diff -urN lustre/ldiskfs/kernel_patches/series/ldiskfs-2.6-sles11.series
lustre_latest/ldiskfs/kernel_patches/series/ldiskfs-2.6-sles11.series
--- lustre/ldiskfs/kernel_patches/series/ldiskfs-2.6-sles11.series
 2010-06-24 23:23:17.000000000 -0500
+++ lustre_latest/ldiskfs/kernel_patches/series/ldiskfs-2.6-sles11.series
   2011-05-23 03:19:44.000000000 -0500
@@ -27,5 +27,4 @@
 ext4-disable-write-bar-by-default.patch
 ext4-mballoc-skip-grps.patch
 ext4-disable-mb-cache-sles11.patch
-ext4-bug23780-remove-i_data_sem-from-walk_space.patch
 ext4-fiemap-2.6-rhel5.patch

 Personally I am not very familiar with packaging so I just did make and
make install to get the modules (running m-a a-i wiped out my changes
once!).  Then I copied updated directory in to new linux kernel module
directory and ran depmod -a.  I had to recompile for that last step in the
kernel (journal.c) but it started working after that.  It has been less than
5 hours since I got it running so I can't tell much if it is working well or
not yet but at least it doesn't show any error messages.

Regards,
Hong
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-lustre-maintainers/attachments/20110527/d00a627b/attachment.html>


More information about the Pkg-lustre-maintainers mailing list