1. 20 Jun, 2002 5 commits
    • Kai Germaschewski's avatar
      kbuild: Put flags for ld into LDFLAGS · 0be6838a
      Kai Germaschewski authored
      Some archs sneaked additional flags for ld into $(LD). This can be done
      cleaner now, by just using $(LDFLAGS).
      0be6838a
    • Kai Germaschewski's avatar
      kbuild: Rename ld flags for vmlinux to LDFLAGS_vmlinux · bfdca998
      Kai Germaschewski authored
      Everywhere else we use CFLAGS_<target> etc to designate special flags
      for an object, so handle vmlinux the same way.
      bfdca998
    • Kai Germaschewski's avatar
      kbuild: Prepare LDFLAGS for general use · 42ec3f17
      Kai Germaschewski authored
      Some arch Makefiles use LDFLAGS to keep special flags for the final
      vmlinux link. However, we'd rather use LDFLAGS along the lines of
      CFLAGS, AFLAGS etc, so get rid of these special cases.
      42ec3f17
    • Kai Germaschewski's avatar
      kbuild: Assorted cleanups · 156f72cf
      Kai Germaschewski authored
          
      o Provide $(obj),$(objtree) and friends in the top-level Makefile as well
        for consistency (Sam Ravnborg)
      o Make $(call cmd,whatever) consistent with $(call if_changed,whatever),
        i.e. both will execute $(cmd_whatever)
      o Add $(echo_target), which will print the current target in a suitable
        way for the quiet output format (i.e. target name relative to the
        top-level directory)
      o Fix the dependencies for host compiled programs to work for files in
        subdirectories (missed converting them when introducing $(depfile))
      o Add commands which will be useful when generating boot images.
      156f72cf
    • Kai Germaschewski's avatar
      Merge tp1.ruhr-uni-bochum.de:/home/kai/kernel/v2.5/linux-2.5.isdn · cec54cde
      Kai Germaschewski authored
      into tp1.ruhr-uni-bochum.de:/home/kai/kernel/v2.5/linux-2.5.make
      cec54cde
  2. 19 Jun, 2002 7 commits
  3. 18 Jun, 2002 28 commits
    • Kai Germaschewski's avatar
      kbuild: Add $(obj), $(src) for generated files · a71684b9
      Kai Germaschewski authored
      I suppose one can argue whether that is ugly or rather nice for
      documentary purposes, but make on its own cannot figure out where a file
      is supposed to live, so we have to help it.
      
      (For the targets handled by Rules.make the situation is different, there
       Rules.make knows what's source and what's object and can add prefixes
       as necessary, so the most of the Makefiles are actually not affected by
       this kind of change)
      
      For now, as $(obj) = $(src) = ., we only add "./", so the potential for
      breakage is rather small.
      a71684b9
    • Kai Germaschewski's avatar
      kbuild: Fix net/llc/Makefile · 6ce09c43
      Kai Germaschewski authored
      This wasn't quite merged up to the current kbuild.
      6ce09c43
    • Kai Germaschewski's avatar
      Merge tp1.ruhr-uni-bochum.de:/home/kai/kernel/v2.5/linux-2.5 · ef6f0bcd
      Kai Germaschewski authored
      into tp1.ruhr-uni-bochum.de:/home/kai/kernel/v2.5/linux-2.5.make
      ef6f0bcd
    • Linus Torvalds's avatar
    • Linus Torvalds's avatar
      9903dae7
    • Benjamin LaHaise's avatar
      [PATCH] export default_wake_function · e458a782
      Benjamin LaHaise authored
      akpm pointed out that an EXPORT_SYMBOL is missing for default_wake_function.
      e458a782
    • Linus Torvalds's avatar
      Merge http://gkernel.bkbits.net/net-drivers-2.5 · 7ca66aff
      Linus Torvalds authored
      into home.transmeta.com:/home/torvalds/v2.5/linux
      7ca66aff
    • Jeff Garzik's avatar
      Merge mandrakesoft.com:/home/jgarzik/vanilla/linus-2.5 · c1bc73b5
      Jeff Garzik authored
      into mandrakesoft.com:/home/jgarzik/repo/net-drivers-2.5
      c1bc73b5
    • Kai Germaschewski's avatar
      Merge tp1.ruhr-uni-bochum.de:/home/kai/kernel/v2.5/linux-2.5.make · faf49a92
      Kai Germaschewski authored
      into tp1.ruhr-uni-bochum.de:/home/kai/kernel/v2.5/linux-2.5.make-net
      faf49a92
    • Linus Torvalds's avatar
      Linux version 2.5.23 · 33e448ef
      Linus Torvalds authored
      33e448ef
    • Linus Torvalds's avatar
      revert broken select optimizations · 8733e611
      Linus Torvalds authored
      Cset exclude: torvalds@penguin.transmeta.com|ChangeSet|20020619003306|07760
      Cset exclude: ak@muc.de|ChangeSet|20020618172743|19150
      8733e611
    • Linus Torvalds's avatar
      Merge penguin.transmeta.com:/home/penguin/torvalds/repositories/kernel/md-merge · ab6094f9
      Linus Torvalds authored
      into penguin.transmeta.com:/home/penguin/torvalds/repositories/kernel/linux
      ab6094f9
    • Neil Brown's avatar
      [PATCH] md 22 of 22 - Generalise md sync threads · 86711d5e
      Neil Brown authored
      Previously each raid personality (Well, 1 and 5) started their
      own thread to do resync, but md.c had a single common thread to do
      reconstruct.  Apart from being untidy, this means that you cannot
      have two arrays reconstructing at the same time, though you can have
      to array resyncing at the same time..
      
      This patch changes the personalities so they don't start the resync,
      but just leave a flag to say that it is needed.
      The common thread (mdrecoveryd) now just monitors things and starts a
      separate per-array thread whenever resync or recovery (or both) is
      needed.
      When the recovery finishes, mdrecoveryd will be woken up to re-lock
      the device and activate the spares or whatever.
      
      raid1 needs to know when resync/recovery starts and ends so it can
      allocate and release resources.
      It allocated when a resync request for stripe 0 is received.
      Previously it deallocated for resync in it's own thread, and
      deallocated for recovery when the spare is made active or inactive
      (depending on success).
      
      As raid1 doesn't own a thread anymore this needed to change.  So to
      match the "alloc on 0", the md_do_resync now calls sync_request one
      last time asking to sync one block past the end.  This is a signal to
      release any resources.
      86711d5e
    • Neil Brown's avatar
      [PATCH] md 21 of 22 - Improve handling of MD super blocks · 7444c718
      Neil Brown authored
      1/ don't free the rdev->sb on an error -- it might be
         accessed again later.  Just wait for the device to be
         exported.
      2/ Change md_update_sb to __md_update_sb and have it
         clear the sb_dirty flag.
         New md_update_sb locks the device and calls __md_update_sb
         if sb_dirty.  This avoids any possbile races around
         updating the superblock
      7444c718
    • Neil Brown's avatar
      [PATCH] md 20 of 22 - Provide SMP safe locking for all_mddevs list. · f7bbc7e1
      Neil Brown authored
      Provide SMP safe locking for all_mddevs list.
      
      the all_mddevs_lock is added to protect all_mddevs and mddev_map.
      
      ITERATE_MDDEV is moved to md.c (it isn't needed elsewhere) and enhanced
      to take the lock appropriately and always have a refcount on the object
      that is given to the body of the loop.
      
      mddev_find is changed so that the structure is allocated outside a lock,
      but test-and-set is done inside the lock.
      f7bbc7e1
    • Neil Brown's avatar
      [PATCH] md 19 of 22 - Improve serialisation of md syncing · 2d35e42d
      Neil Brown authored
      If two md arrays which share real devices (i.e they each own a partition
      on some device) need to sync/reconstruct at the same time, it is much
      more efficient to have one wait while the other completes.
      
      The current code uses interruptible_sleep_on which isn't SMP safe (without the BKL).
      This patch re-does this code to make it more secure.  Even it two start simultaneously,
      one will reliably get priority, and the other wont wait for ever.
      2d35e42d
    • Neil Brown's avatar
      [PATCH] md 18 of 22 - More mddev tidyup - remove recovery_sem and resync_sem · 7145dd24
      Neil Brown authored
      More mddev tidyup - remove recovery_sem and resync_sem
      
      recovery_sem and resync_sem get replaced by careful use
      of recovery_running protected by reconfig_sem.
      
      As part of this, the creative:
      	down(&mddev->recovery_sem);
      	up(&mddev->recovery_sem);
      
      when stopping an array gets replaced by a more obvious
      
      	wait_event(resync_wait, mddev->recovery_running <= 0);
      7145dd24
    • Neil Brown's avatar
      [PATCH] md 17 of 22 - Strengthen the locking of mddev. · bc0eea33
      Neil Brown authored
      Strengthen the locking of mddev.
      
      mddev is only ever locked in md.c, so we move {,un}lock_mddev
      out of the header and into md.c, and rename to mddev_{,un}lock
      for consistancy with mddev_{get,put,find}.
      
      When building arrays (typically at boot time) we now lock, and unlock
      as it is the "right" thing to do.  The lock should never fail.
      
      When generating /proc/mdstat, we lock each array before inspecting it.
      
      In md_ioctl, we lock the mddev early and unlock at the end, rather than
      locking in two different places.
      
      In md_open we make sure we can get a lock before completing the open.  This
      ensures that we sync with do_md_stop properly.
      
      In md_do_recovery, we lock each mddev before checking it's status.
      
      md_do_recovery must unlock while recovery happens, and a do_md_stop at this
      point will deadlock when md_do_recovery tries to regain the lock.  This will be
      fixed in a later patch.
      bc0eea33
    • Neil Brown's avatar
      [PATCH] md 16 of 22 - Next small step to improved mddev management. · ee3208bf
      Neil Brown authored
      md_ioctl doesn't need to mddev_find, as the mddev must
      be in the bd_inode->u.generic_ip.  This means we don't need
      to mddev_put either.
      ee3208bf
    • Neil Brown's avatar
      [PATCH] md 15 of 22 - Get rid of kdev_to_mddev · dfdf2be0
      Neil Brown authored
      Only two users of kdev_to_mddev remain, md_release and
      md_queue_proc.
      
      For md_release we can store the mddev in the md_inode
      at md_open time so we can find it easily.
      
      For md_queue_proc, we use mddev_find because we only have the
      device number to work with.  Hopefully the ->queue function
      will get more arguements one day...
      dfdf2be0
    • Neil Brown's avatar
      [PATCH] md 14 of 22 - Second step to tidying mddev refcounts and locking · 2cf76fbf
      Neil Brown authored
      This patch gets md_open to use mddev_find instead of kdev_to_mddev, thus
      creating the mddev if necessary.
      This guarantees that md_release will be able to find an mddev to
      mddev_put.
      
      Now that we are certain of getting the refcount right at open/close time,
      we don't need the "countdev" stuff.  If START_ARRAY happens to start and
      array other than that the one that is currently opened, it won't confuse
      things at all.
      2cf76fbf
    • Neil Brown's avatar
      [PATCH] md 13 of 22 - First step to tidying mddev recounting and locking. · a9d0889a
      Neil Brown authored
      First step to tidying mddev recounting and locking.
      
      This patches introduces
        mddev_get   which incs the refcount on an mddev
        mddev_put   which decs it and, if it becomes unused, frees it
        mddev_find  which finds or allocated an mddev for a given minor
                    This is mostly the old alloc_mddev
      
      
      free_mddev no longer actually frees it.  It just disconnects all drives
      so that mddev_put will do the free.
      
      Now the test for "does an mddev exist" is not "mddev != NULL"
      but involves checking if the mddev has disks or a superblock
      attached.
      
      This makes the semantics of do_md_stop a bit cleaner.  Previously
      if do_md_stop succeed for a real stop (not a read-only stop) then
      you didn't have to unlock the mddev, otherwise you did.  Now
      you always unlock the mddev after do_md_stop.
      a9d0889a
    • Neil Brown's avatar
      [PATCH] md 12 of 22 - Remove "data" from dev_mapping and tidy up · 932db78f
      Neil Brown authored
      The mapping from minor number to mddev structure allows for a
      'data' that is never used.  This patch removes that and explicitly
      inlines some inline functions that become trivial.
      mddev_map also becomes completely local to md.c
      932db78f
    • Neil Brown's avatar
      [PATCH] md 11 of 22 - Get rid of "OUT" macro in md.c · 8892097c
      Neil Brown authored
      It doesn't really help clarity or brevity.
      8892097c
    • Neil Brown's avatar
      [PATCH] md 10 of 22 - Remove nb_dev from mddev_s · 2dc0a8b3
      Neil Brown authored
      The nb_dev field is not needed.
      Most uses are the test if it is zero or not, and they can be replaced
      by tests on the emptiness of the disks list.
      
      Other uses are for iterating through devices in numerical order and
      it makes the code clearer (IMO) to unroll the devices into an array first
      (which has to be done at some stage anyway) and then walk that array.
      
      This makes ITERATE_RDEV_ORDERED un-necessary.
      
      Also remove the "name" field which is never used.
      2dc0a8b3
    • Neil Brown's avatar
      [PATCH] md 9 of 22 - Discard functions that have been "not yet" for a long time · 3c0c2a7b
      Neil Brown authored
      Discard functions that have been "not yet" for a long time
      
      It is not clear what these should do, or if they will ever be
      needed, so let's clean them out.  They can easily be recreated
      if there is a need.
      3c0c2a7b
    • Neil Brown's avatar
      [PATCH] md 8 of 22 - Discard md_make_request in favour of per-personality make_request functions. · d2310fab
      Neil Brown authored
      As we now have per-device queues, we don't need a common make_request
      function that dispatches, we can dispatch directly.
      
      Each *_make_request function is changed to take a request_queue_t
      from which it extract the mddev that it needs, and to deduce the
      "rw" flag directly from the bio.
      d2310fab
    • Neil Brown's avatar
      [PATCH] md 7 of 22 - Use wait_event_interuptible in md_thread · 58aa897f
      Neil Brown authored
      It currently has several lines of code where one will do.
      58aa897f