"Fossies" - the Fresh Open Source Software Archive

Member "aoe-aoe6-86/conf/README" (4 Jul 2015, 4158 Bytes) of archive /linux/misc/aoe-aoe6-86.tar.gz:

As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 This directory contains files to help the build system adjust the
    2 driver sources to fit a particular kernel.
    4 Originally the patches here handled only two states for each
    5 compatibility issue: old and new.  A patch that updated the driver
    6 from compatibility with "old" kernels to "new" ones was included for
    7 each patch.
    9 The increasing amount of churn in the Linux kernel, especially in
   10 sysfs, has caused many problem areas to have multiple states---not
   11 just the two old and new states.
   13 Where there are more than two possible states, descriptive tags will
   14 be used instead of "old" and "new".  Currently, the patches will get
   15 from any state to any other state with a single patch operation.
   17 (This is a complete graph, where the states are vertices and the
   18 patches are edges, which is fine as long as N*(N-1)/2 is smallish.  By
   19 patching more than once and ordering the states, it would be possible
   20 and pretty easy to have only N (or even N-1) patches, but we don't
   21 need that now.)
   23 Description of files:
   25   N.txt       A description of the compatibility issue.
   27   N-av.sh     A script that says whether the aoe sources are old or
   28               new style (or just emits the "tag" for the style).
   30   N-kv.sh     A script that says whether the kernel sources are old or
   31               new style (or emits a more general tag for the style).
   33   N.c         A minimal C file that is used by N-kv.sh.
   35   N-{tag}.c   A minimal C file that is used by N-kv.sh to detect the
   36               state identified by this tag.
   38   N-patches/a-b.diff
   40               A patch that will change style-"a" aoe sources to "b"
   41               style, where "a" and "b" are the above mentioned tags.
   43 To support the way the "realrealclean" Makefile target reverts to
   44 unconfigured sources, the unconfigured state for a conf test, which by
   45 convention is the one that matches the newest kernels, is marked with
   46 NEW in its .txt file.
   48 There is a bit of infrastructure that helps me to insert a new test
   49 after an old one.  For example, test 15 today handles two related
   50 changes, but RHEL 5.2 has makes one of them inappropriate.  Now I must
   51 split test 15 into two separate tests.  The scripts below help.
   53   bump.sh     print git commands that will increment the number of
   54 	      tests after and including the specified test
   56   kv.sh	      common code for *-kv.sh scripts, including the "what is
   57 	      my test number" code
   59   pairs.sh    print the needed patches for a set of states
   63   Sometimes if one test says the kernel is "old", then a newer
   64   compatibility test (which runs later) becomes irrelevant and can be
   65   skipped when the *-kv.sh and *-av.sh scripts both say, "skip".
   67   The two compatibility tests are thereby simplified.  Hopefully there
   68   is little danger that interdependencies between tests will cause
   69   problems, because they are always run in strict order.  By
   70   searching for "skip" in conf/*.sh, though, they're findable.
   74   When older kernels lack a feature that current kernels use, the
   75   easiest way to provide backwards compatibility is to create a
   76   trivial implementation for the old kernels and keep the code that
   77   uses the feature as is.
   79   If, for example, the code using the feature was removed by the
   80   backwards compatibility patch, then more aoe driver code will appear
   81   in the compatibility patches, and each time we edit the driver, the
   82   patches will need to be recreated.
   86   For the *-kv.sh tests, it's often important to check for compiler
   87   warnings or errors, not just a zero status from the "make" command,
   88   as illustrated by this improvement to test 31, which allows aoe6-73
   89   to build correctly for CentOS 4.7.
   91   diff --git a/conf/31-kv.sh b/conf/31-kv.sh
   92   index 8843a84..0c5a73b 100644
   93   --- a/conf/31-kv.sh
   94   +++ b/conf/31-kv.sh
   95   @@ -1,7 +1,10 @@
   96    . conf/kv.sh
   98    echo 'obj-$(CONFIG_ATA_OVER_ETH) += '"$TESTNO"'.o' > conf/Makefile
   99   -$make_cmd > conf/$TESTNO.log 2>&1
  100   -test "$?" = "0" && { echo new; exit 0; }
  101   +log=conf/$TESTNO.log
  102   +$make_cmd > $log 2>&1
  103   +test "$?" = "0" &&
  104   +       test -z "`egrep -i '(warning|error).*blk_start_request' $log`" &&
  105   +       { echo new; exit 0; }