1. 28 8月, 2006 2 次提交
    • N
      [PATCH] md: avoid backward event updates in md superblock when degraded. · 84692195
      NeilBrown 提交于
      If we
        - shut down a clean array,
        - restart with one (or more) drive(s) missing
        - make some changes
        - pause, so that they array gets marked 'clean',
      the event count on the superblock of included drives
      will be the same as that of the removed drives.
      So adding the removed drive back in will cause it
      to be included with no resync.
      
      To avoid this, we only update the eventcount backwards when the array
      is not degraded.  In this case there can (should) be no non-connected
      drives that we can get confused with, and this is the particular case
      where updating-backwards is valuable.
      Signed-off-by: NNeil Brown <neilb@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      84692195
    • D
      [PATCH] dm: Fix deadlock under high i/o load in raid1 setup. · c06aad85
      Daniel Kobras 提交于
      On an nForce4-equipped machine with two SATA disk in raid1 setup using dmraid,
      we experienced frequent deadlock of the system under high i/o load.  'cat
      /dev/zero > ~/zero' was the most reliable way to reproduce them: Randomly
      after a few GB, 'cp' would be left in 'D' state along with kjournald and
      kmirrord.  The functions cp and kjournald were blocked in did vary, but
      kmirrord's wchan always pointed to 'mempool_alloc()'.  We've seen this pattern
      on 2.6.15 and 2.6.17 kernels.  http://lkml.org/lkml/2005/4/20/142 indicates
      that this problem has been around even before.
      
      So much for the facts, here's my interpretation: mempool_alloc() first tries
      to atomically allocate the requested memory, or falls back to hand out
      preallocated chunks from the mempool.  If both fail, it puts the calling
      process (kmirrord in this case) on a private waitqueue until somebody refills
      the pool.  Where the only 'somebody' is kmirrord itself, so we have a
      deadlock.
      
      I worked around this problem by falling back to a (blocking) kmalloc when
      before kmirrord would have ended up on the waitqueue.  This defeats part of
      the benefits of using the mempool, but at least keeps the system running.  And
      it could be done with a two-line change.  Note that mempool_alloc() clears the
      GFP_NOIO flag internally, and only uses it to decide whether to wait or return
      an error if immediate allocation fails, so the attached patch doesn't change
      behaviour in the non-deadlocking case.  Path is against current git
      (2.6.18-rc4), but should apply to earlier versions as well.  I've tested on
      2.6.15, where this patch makes the difference between random lockup and a
      stable system.
      Signed-off-by: NDaniel Kobras <kobras@linux.de>
      Acked-by: NAlasdair G Kergon <agk@redhat.com>
      Cc: <stable@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      c06aad85
  2. 15 8月, 2006 1 次提交
    • M
      [PATCH] dm: BUG/OOPS fix · 485311a2
      Michal Miroslaw 提交于
      Fix BUG I tripped on while testing failover and multipathing.
      
      BUG shows up on error path in multipath_ctr() when parse_priority_group()
      fails after returning at least once without error.  The fix is to
      initialize m->ti early - just after alloc()ing it.
      
      BUG: unable to handle kernel NULL pointer dereference at virtual address 00000000
       printing eip:
      c027c3d2
      *pde = 00000000
      Oops: 0000 [#3]
      Modules linked in: qla2xxx ext3 jbd mbcache sg ide_cd cdrom floppy
      CPU:    0
      EIP:    0060:[<c027c3d2>]    Not tainted VLI
      EFLAGS: 00010202   (2.6.17.3 #1)
      EIP is at dm_put_device+0xf/0x3b
      eax: 00000001   ebx: ee4fcac0   ecx: 00000000   edx: ee4fcac0
      esi: ee4fc4e0   edi: ee4fc4e0   ebp: 00000000   esp: c5db3e78
      ds: 007b   es: 007b   ss: 0068
      Process multipathd (pid: 15912, threadinfo=c5db2000 task=ef485a90)
      Stack: ec4eda40 c02816bd ee4fc4c0 00000000 f7e89498 f883e0bc c02816f6 f7e89480
             f7e8948c c0281801 ffffffea f7e89480 f883e080 c0281ffe 00000001 00000000
             00000004 dfe9cab8 f7a693c0 f883e080 f883e0c0 ca4b99c0 c027c6ee 01400000
      Call Trace:
       <c02816bd> free_pgpaths+0x31/0x45  <c02816f6> free_priority_group+0x25/0x2e
       <c0281801> free_multipath+0x35/0x67  <c0281ffe> multipath_ctr+0x123/0x12d
       <c027c6ee> dm_table_add_target+0x11e/0x18b  <c027e5b4> populate_table+0x8a/0xaf
       <c027e62b> table_load+0x52/0xf9  <c027ec23> ctl_ioctl+0xca/0xfc
       <c027e5d9> table_load+0x0/0xf9  <c0152146> do_ioctl+0x3e/0x43
       <c0152360> vfs_ioctl+0x16c/0x178  <c01523b4> sys_ioctl+0x48/0x60
       <c01029b3> syscall_call+0x7/0xb
      Code: 97 f0 00 00 00 89 c1 83 c9 01 80 e2 01 0f 44 c1 88 43 14 8b 04 24 59 5b 5e 5f 5d c3 53 89 c1 89 d3 ff 4a 08 0f 94 c0 84 c0 74 2a <8b> 01 8b 10 89 d8 e8 f6 fb ff ff 8b 03 8b 53 04 89 50 04 89 02
      EIP: [<c027c3d2>] dm_put_device+0xf/0x3b SS:ESP 0068:c5db3e78
      Signed-off-by: NMichal Miroslaw <mirq-linux@rere.qmqm.pl>
      Acked-by: NAlasdair G Kergon <agk@redhat.com>
      Cc: <stable@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      485311a2
  3. 06 8月, 2006 1 次提交
  4. 11 7月, 2006 11 次提交
  5. 04 7月, 2006 1 次提交
    • I
      [PATCH] lockdep: annotate blkdev nesting · 663d440e
      Ingo Molnar 提交于
      Teach special (recursive) locking code to the lock validator.
      
      Effects on non-lockdep kernels:
      
      - the introduction of the following function variants:
      
        extern struct block_device *open_partition_by_devnum(dev_t, unsigned);
      
        extern int blkdev_put_partition(struct block_device *);
      
        static int
        blkdev_get_whole(struct block_device *bdev, mode_t mode, unsigned flags);
      
       which on non-lockdep are the same as open_by_devnum(), blkdev_put()
       and blkdev_get().
      
      - a subclass parameter to do_open(). [unused on non-lockdep]
      
      - a subclass parameter to __blkdev_put(), which is a new internal
        function for the main blkdev_put*() functions. [parameter unused
        on non-lockdep kernels, except for two sanity check WARN_ON()s]
      
      these functions carry no semantical difference - they only express
      object dependencies towards the lockdep subsystem.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
      Cc: Neil Brown <neilb@cse.unsw.edu.au>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      663d440e
  6. 01 7月, 2006 1 次提交
  7. 30 6月, 2006 1 次提交
  8. 27 6月, 2006 22 次提交