From 1621d91a8772aafc9e0fd47e799d00628507500c Mon Sep 17 00:00:00 2001 From: pschwan Date: Mon, 5 May 2003 04:29:59 +0000 Subject: [PATCH] partial merge of b_open into b_devel: - Lustre kernel patch version 16 - extN no longer built; ext3 patched as part of the kernel patch - related changes to lconf/lmc, to load and mkfs ext3 instead of extN now --- .../patches/uml_check_get_page.patch | 9 ++--- lustre/kernel_patches/patches/uml_no_panic.patch | 11 +++--- lustre/kernel_patches/pc/uml_check_get_page.pc | 1 - lustre/kernel_patches/pc/uml_compile_fixes.pc | 1 - lustre/kernel_patches/pc/uml_no_panic.pc | 1 - lustre/kernel_patches/pc/vfs_intent.pc | 8 ----- lustre/kernel_patches/prepare_tree.sh | 2 +- lustre/kernel_patches/scripts/apatch | 5 ++- lustre/kernel_patches/scripts/patchfns | 21 +++++++++--- lustre/kernel_patches/scripts/poppatch | 2 ++ lustre/kernel_patches/scripts/pushpatch | 2 ++ lustre/kernel_patches/scripts/refpatch | 1 + lustre/kernel_patches/scripts/rpatch | 39 ++++++++++++++-------- lustre/kernel_patches/txt/vfs_intent.txt | 3 -- 14 files changed, 62 insertions(+), 44 deletions(-) delete mode 100644 lustre/kernel_patches/pc/vfs_intent.pc delete mode 100644 lustre/kernel_patches/txt/vfs_intent.txt diff --git a/lustre/kernel_patches/patches/uml_check_get_page.patch b/lustre/kernel_patches/patches/uml_check_get_page.patch index fafdf90..228d086 100644 --- a/lustre/kernel_patches/patches/uml_check_get_page.patch +++ b/lustre/kernel_patches/patches/uml_check_get_page.patch @@ -1,11 +1,12 @@ - 0 files changed + arch/um/kernel/mem.c | 15 +++++++++++++++ + 1 files changed, 15 insertions(+) ---- linux-2.4.18-17.8.0/arch/um/kernel/mem.c~uml_check_get_page 2002-12-06 14:52:30.000000000 -0800 -+++ linux-2.4.18-17.8.0-zab/arch/um/kernel/mem.c 2002-12-06 14:52:30.000000000 -0800 -@@ -529,6 +529,21 @@ struct page *pte_mem_map(pte_t pte) +--- linux-2.4.20/arch/um/kernel/mem.c~uml_check_get_page 2003-04-08 23:34:50.000000000 -0600 ++++ linux-2.4.20-braam/arch/um/kernel/mem.c 2003-04-08 23:34:50.000000000 -0600 +@@ -712,6 +712,21 @@ struct page *pte_mem_map(pte_t pte) return(phys_mem_map(pte_val(pte))); } diff --git a/lustre/kernel_patches/patches/uml_no_panic.patch b/lustre/kernel_patches/patches/uml_no_panic.patch index b0c305b..59069f9 100644 --- a/lustre/kernel_patches/patches/uml_no_panic.patch +++ b/lustre/kernel_patches/patches/uml_no_panic.patch @@ -1,11 +1,12 @@ - 0 files changed + arch/um/kernel/mem.c | 8 ++++++-- + 1 files changed, 6 insertions(+), 2 deletions(-) ---- linux-2.4.18-17.8.0/arch/um/kernel/mem.c~uml_no_panic 2002-12-06 14:52:30.000000000 -0800 -+++ linux-2.4.18-17.8.0-zab/arch/um/kernel/mem.c 2002-12-06 14:52:30.000000000 -0800 -@@ -559,7 +559,9 @@ struct mem_region *page_region(struct pa +--- linux-2.4.20/arch/um/kernel/mem.c~uml_no_panic 2003-04-08 23:34:57.000000000 -0600 ++++ linux-2.4.20-braam/arch/um/kernel/mem.c 2003-04-08 23:34:57.000000000 -0600 +@@ -742,7 +742,9 @@ struct mem_region *page_region(struct pa return(region); } } @@ -16,7 +17,7 @@ return(NULL); } -@@ -581,7 +583,9 @@ unsigned long region_pa(void *virt) +@@ -814,7 +816,9 @@ extern unsigned long region_pa(void *vir (addr <= region->start + region->len)) return(mk_phys(addr - region->start, i)); } diff --git a/lustre/kernel_patches/pc/uml_check_get_page.pc b/lustre/kernel_patches/pc/uml_check_get_page.pc index 3dbf042..0e90ce5 100644 --- a/lustre/kernel_patches/pc/uml_check_get_page.pc +++ b/lustre/kernel_patches/pc/uml_check_get_page.pc @@ -1,2 +1 @@ arch/um/kernel/mem.c -arch/um/kernel/mem.c.uml-fixes diff --git a/lustre/kernel_patches/pc/uml_compile_fixes.pc b/lustre/kernel_patches/pc/uml_compile_fixes.pc index c1caa12..cd28cbd 100644 --- a/lustre/kernel_patches/pc/uml_compile_fixes.pc +++ b/lustre/kernel_patches/pc/uml_compile_fixes.pc @@ -1,2 +1 @@ include/asm-um/pgtable.h -include/asm-um/pgtable.h.orig diff --git a/lustre/kernel_patches/pc/uml_no_panic.pc b/lustre/kernel_patches/pc/uml_no_panic.pc index 3dbf042..0e90ce5 100644 --- a/lustre/kernel_patches/pc/uml_no_panic.pc +++ b/lustre/kernel_patches/pc/uml_no_panic.pc @@ -1,2 +1 @@ arch/um/kernel/mem.c -arch/um/kernel/mem.c.uml-fixes diff --git a/lustre/kernel_patches/pc/vfs_intent.pc b/lustre/kernel_patches/pc/vfs_intent.pc deleted file mode 100644 index 881576c..0000000 --- a/lustre/kernel_patches/pc/vfs_intent.pc +++ /dev/null @@ -1,8 +0,0 @@ -fs/dcache.c -fs/namei.c -fs/nfsd/vfs.c -fs/open.c -fs/stat.c -include/linux/dcache.h -include/linux/fs.h -kernel/ksyms.c diff --git a/lustre/kernel_patches/prepare_tree.sh b/lustre/kernel_patches/prepare_tree.sh index f512132..7d688db 100755 --- a/lustre/kernel_patches/prepare_tree.sh +++ b/lustre/kernel_patches/prepare_tree.sh @@ -67,7 +67,7 @@ REVINO=`(cd $TREE ; stat $REVERSE | awk '($3 == "Inode:") {print $4}')` [ $ABSINO != $REVINO ] && die "inodes differ, my reverse path is bad?" -echo export PATCHSCRIPTS=$REVERSE +echo export PATCHSCRIPTS_LIBDIR=$REVERSE cd $TREE ln -sf $REVERSE/series/$SERIES series diff --git a/lustre/kernel_patches/scripts/apatch b/lustre/kernel_patches/scripts/apatch index 4b63598..be1c68e 100755 --- a/lustre/kernel_patches/scripts/apatch +++ b/lustre/kernel_patches/scripts/apatch @@ -5,8 +5,6 @@ echo "Check your install, or go to the right directory" exit 1 } - - do_apply() { FILES=$(cat $P/pc/$PATCH_NAME.pc) @@ -70,7 +68,7 @@ apatch() echo "$PATCH_NAME" is already applied exit 1 fi - + if [ $opt_force != 0 ] then echo FORCING PATCH @@ -78,6 +76,7 @@ apatch() if [ $opt_force != 0 ] || can_apply $P/patches/"$PATCH_NAME".patch then + check_pc_match $P/patches/"$PATCH_NAME".patch $P/pc/"$PATCH_NAME".pc do_apply $P/patches/"$PATCH_NAME".patch add_to_db "$PATCH_NAME" echo applied $PATCH_NAME diff --git a/lustre/kernel_patches/scripts/patchfns b/lustre/kernel_patches/scripts/patchfns index b6cc468..92c0be1 100644 --- a/lustre/kernel_patches/scripts/patchfns +++ b/lustre/kernel_patches/scripts/patchfns @@ -11,9 +11,9 @@ DB=applied-patches # Otherwise use "." # -if [ x$PATCHSCRIPTS != x ] +if [ x$PATCHSCRIPTS_LIBDIR != x ] then - P=$PATCHSCRIPTS + P=$PATCHSCRIPTS_LIBDIR elif [ -d ./patch-scripts ] then P=./patch-scripts @@ -69,7 +69,20 @@ is_applied() return 1 fi } - +check_pc_match() +{ + if [ -f /usr/bin/lsdiff ]; then + tmpfile=$(mktemp /tmp/p_XXXXXX) || exit 1 + lsdiff --strip=1 $1 > $tmpfile + diff $2 $tmpfile > /dev/null + if [ $? != 0 ]; then + echo " $1 do not match with $2 " + echo " $2 will be changed to match $2" + cat $tmpfile > $P/pc/$PATCH_NAME.pc + fi + rm -rf $tmpfile + fi +} can_apply() { if patch -p1 --dry-run -i "$1" -f @@ -175,7 +188,7 @@ copy_file_to_bup() if [ -e $file ] then - cp $file "$file"~"$patch" + cp -p $file "$file"~"$patch" else echo "file $file appears to be newly added" fi diff --git a/lustre/kernel_patches/scripts/poppatch b/lustre/kernel_patches/scripts/poppatch index 792cb9b..70055d6 100755 --- a/lustre/kernel_patches/scripts/poppatch +++ b/lustre/kernel_patches/scripts/poppatch @@ -64,7 +64,9 @@ do then if [ $STOP_AT == $(toppatch) ] then + sum-series applied-patch exit 0 fi fi done +sum-series applied-patch diff --git a/lustre/kernel_patches/scripts/pushpatch b/lustre/kernel_patches/scripts/pushpatch index 018716d..6702e63 100755 --- a/lustre/kernel_patches/scripts/pushpatch +++ b/lustre/kernel_patches/scripts/pushpatch @@ -78,7 +78,9 @@ do then if [ $STOP_AT == $(toppatch) ] then + sum-series applied-patch exit 0 fi fi done +sum-series applied-patch diff --git a/lustre/kernel_patches/scripts/refpatch b/lustre/kernel_patches/scripts/refpatch index 88f3caf..3195a57 100755 --- a/lustre/kernel_patches/scripts/refpatch +++ b/lustre/kernel_patches/scripts/refpatch @@ -28,4 +28,5 @@ fi TOP_PATCH=$(top_patch) mpatch $* $(top_patch) +sum-series applied-patch echo "Refreshed $TOP_PATCH" diff --git a/lustre/kernel_patches/scripts/rpatch b/lustre/kernel_patches/scripts/rpatch index 42e1533..d6d9950 100755 --- a/lustre/kernel_patches/scripts/rpatch +++ b/lustre/kernel_patches/scripts/rpatch @@ -6,15 +6,28 @@ exit 1 } +# do_remove() +# { +# if patch -R -p1 -s -i $P/patches/"$1".patch +# then +# true +# else +# echo SOMETHING WENT WRONG +# exit 1 +# fi +# } + do_remove() { - if patch -R -p1 -s -i $P/patches/"$1".patch - then - true - else - echo SOMETHING WENT WRONG - exit 1 - fi + FILES=$(cat $P/pc/$1.pc) + for file in $FILES ; do + if [ -f "$file"~"$1" ]; then + mv -f "$file"~"$1" "$file" + else + rm -f "$file" + fi + done + true } kill_old_ones() @@ -43,15 +56,15 @@ warn_top_current if is_applied "$PATCH_NAME" then - if can_remove "$PATCH_NAME" - then +# if can_remove "$PATCH_NAME" +# then do_remove "$PATCH_NAME" kill_old_ones "$PATCH_NAME" remove_from_db "$PATCH_NAME" - else - echo "$PATCH_NAME" does not remove cleanly - exit 1 - fi +# else +# echo "$PATCH_NAME" does not remove cleanly +# exit 1 +# fi else echo "$PATCH_NAME" is not applied exit 1 diff --git a/lustre/kernel_patches/txt/vfs_intent.txt b/lustre/kernel_patches/txt/vfs_intent.txt deleted file mode 100644 index 010cdb7..0000000 --- a/lustre/kernel_patches/txt/vfs_intent.txt +++ /dev/null @@ -1,3 +0,0 @@ -DESC -(undescribed patch) -EDESC -- 1.8.3.1