Whamcloud - gitweb
Branch b1_6
authoryangsheng <yangsheng>
Fri, 20 Feb 2009 10:14:54 +0000 (10:14 +0000)
committeryangsheng <yangsheng>
Fri, 20 Feb 2009 10:14:54 +0000 (10:14 +0000)
b=18289
i=shadow, johann, yibin.yang

Kernel update to rhel5.3(2.6.18.92-128.1.1). Enable the in-kernel OFED
since haven't a separate OFED release support this kernel.

build/lbuild
build/lmake
ldiskfs/kernel_patches/patches/ext3-extents-2.6.18-vanilla.patch
ldiskfs/kernel_patches/patches/ext3-uninit-2.6.18.patch

index 02a2b80..2d008a0 100755 (executable)
@@ -439,7 +439,7 @@ load_target()
                 fi
             fi
         fi
-        if [ -n "$OFED_VERSION" ] && \
+        if [ -n "$OFED_VERSION" -a "$OFED_VERSION" != "inkernel" ] && \
            [ ! -r "$KERNELTREE/../OFED-${OFED_VERSION}.tgz" ] ; then
             if (( $DOWNLOAD )) ; then
                 local location="http://downloads.lustre.org/public/OFED/"
@@ -967,7 +967,7 @@ store_for_reuse()
                dstdir="${dstdir%.rpm}"
        [ -d "$dstdir" ] && rm -rf "$dstdir"
         mv "${builddir}" "$dstdir" || return 255
-        if [ -n "$OFED_VERSION" ]; then
+        if [ -n "$OFED_VERSION" -a "$OFED_VERSION" != "inkernel" ]; then
             # move the OFED kernel-ib-devel tree as well
             mv "${builddir%/*}/kernel-ib-devel/usr/src/ofa_kernel" "${dstdir%/*}" || return 255
         fi
@@ -990,7 +990,7 @@ store_for_reuse()
     else
            [ -f "RPMS/${TARGET_ARCH}/${kernelrpmname}" ] && cp -f "RPMS/${TARGET_ARCH}/${kernelrpmname}" "${REUSEBUILD}/${TIMESTAMP}/"
     fi
-    if [ -n "$OFED_VERSION" ]; then
+    if [ -n "$OFED_VERSION" -a "$OFED_VERSION" != "inkernel" ]; then
         # store kernel-ib RPMs
         local rpmname
         for rpmname in "kernel-ib" "kernel-ib-devel"; do
@@ -1359,7 +1359,7 @@ patchless_build_sequence()
     [ -d SOURCES ] || mkdir SOURCES
 
     # first build kernel-ib
-    if [ -n "$OFED_VERSION" ]; then
+    if [ -n "$OFED_VERSION" -a "$OFED_VERSION" != "inkernel" ]; then
         $rpmfound && build_kernel_ib
     fi
     ( $rpmfound ) && build_lustre && buildsuccess=true && find_linux_source_rpm
@@ -1494,7 +1494,8 @@ build_sequence_reuse()
             local reusedkernelsourcerpm=
             local reusedkernelibrpm=
             [ -d "$curdir" ] || continue
-            [ -n "$OFED_VERSION" -a ! -d "${curdir%/*}/ofa_kernel" ] && continue
+            [ -n "$OFED_VERSION" -a "$OFED_VERSION" != "inkernel" -a 
+             ! -d "${curdir%/*}/ofa_kernel" ] && continue
             local reusedkernelprefix="kernel-lustre-"
             ( $PATCHLESS ) && reusedkernelprefix=
             [ -f ${curdir}/../${reusedkernelprefix}${REUSEDKERNELMASK}.rpm ] && \
@@ -1502,7 +1503,7 @@ build_sequence_reuse()
             reusedkernelprefix="kernel-lustre-source-"
             [ -f ${curdir}/../${reusedkernelprefix}${REUSEDKERNELMASKnew}.rpm ] && \
                 reusedkernelsourcerpm=$(ls ${curdir}/../${reusedkernelprefix}${REUSEDKERNELMASKnew}.rpm | head -1 ) 
-            if [ -n "$OFED_VERSION" ]; then
+            if [ -n "$OFED_VERSION" -a "$OFED_VERSION" != "inkernel" ]; then
                 gen_lustre_version
                 reusedkernelprefix="kernel-ib-"
                 [ -f ${curdir}/../${reusedkernelprefix}${OFED_VERSION}-${LUSTRE_EXTRA_VERSION}.${TARGET_ARCH}.rpm ] && \
@@ -1516,10 +1517,14 @@ build_sequence_reuse()
                 continue
             fi
             if [ -n "$OFED_VERSION" ]; then
+               if [ "$OFED_VERSION" != "inkernel" ]; then
                 if ! ( $NORPM ) && [ ! -f "$reusedkernelibrpm" -o ! -f "$reusedkernelibdevelrpm"]; then #kernel-ib{,-devel} rpm not found. Build all
                     continue
                 fi
                 CONFIGURE_FLAGS="--with-o2ib=${curdir%/*}/ofa_kernel ${CONFIGURE_FLAGS}"
+                else
+                    CONFIGURE_FLAGS="--with-o2ib=yes ${CONFIGURE_FLAGS}"
+               fi
             fi
             LINUX="$curdir"
             build_lustre || continue
@@ -1700,7 +1705,7 @@ unpack_lustre
 load_target
 EXTRA_VERSION_DELIMITER=${EXTRA_VERSION_DELIMITER:-"-"}
 
-if [ -n "$OFED_VERSION" ]; then
+if [ -n "$OFED_VERSION" -a "$OFED_VERSION" != "inkernel" ]; then
     unpack_ofed
 fi
 
index b917687..c9b22ea 100755 (executable)
@@ -874,7 +874,11 @@ depend_kernel
 build_kernel
 
 if [ -n "$OFED_VERSION" ]; then
+    if [ "$OFED_VERSION" = "inkernel" ]; then
+       CONFIGURE_FLAGS="--with-o2ib=yes ${CONFIGURE_FLAGS}"
+    else
     build_kernel_ib
+    fi
 fi
 
 configure_lustre
index b2ad191..27cfe46 100644 (file)
@@ -2337,20 +2337,20 @@ Index: linux-2.6.18.8/fs/ext3/inode.c
        depth = ext3_block_to_path(inode,iblock,offsets,&blocks_to_boundary);
  
 @@ -984,12 +983,10 @@ static int ext3_get_block(struct inode *
+               started = 1;
+       }
  
- get_block:
-       if (ret == 0) {
--              ret = ext3_get_blocks_handle(handle, inode, iblock,
-+              ret = ext3_get_blocks_wrap(handle, inode, iblock,
+-      ret = ext3_get_blocks_handle(handle, inode, iblock,
++      ret = ext3_get_blocks_wrap(handle, inode, iblock,
                                        max_blocks, bh_result, create, 0);
--              if (ret > 0) {
--                      bh_result->b_size = (ret << inode->i_blkbits);
-+              if (ret > 0)
-                       ret = 0;
--              }
-       }
-       return ret;
- }
+-      if (ret > 0) {
+-              bh_result->b_size = (ret << inode->i_blkbits);
++      if (ret > 0)
+               ret = 0;
+-      }
+       if (started)
+               ext3_journal_stop(handle);
+ out:
 @@ -1008,7 +1005,7 @@ struct buffer_head *ext3_getblk(handle_t
        dummy.b_state = 0;
        dummy.b_blocknr = -1000;
index ab150a1..dc506e7 100644 (file)
@@ -88,9 +88,9 @@ Index: linux-2.6.18-53.1.14/fs/ext3/resize.c
 -}
 -
 -/*
-  * Set up the block and inode bitmaps, and the inode table for the new group.
-  * This doesn't need to be part of the main transaction, since we are only
-  * changing blocks outside the actual filesystem.  We still do journaling to
+  * If we have fewer than thresh credits, extend by EXT3_MAX_TRANS_DATA.
+  * If that fails, restart the transaction & regain write access for the
+  * buffer head which is used for block_bitmap modifications.
 @@ -834,6 +816,7 @@ int ext3_group_add(struct super_block *s
        gdp->bg_inode_table = cpu_to_le32(input->inode_table);
        gdp->bg_free_blocks_count = cpu_to_le16(input->free_blocks_count);