1. 22 7月, 2008 24 次提交
  2. 21 7月, 2008 16 次提交
    • D
      sunhme: Remove stop/wake TX queue calls in set-multicast-list handler. · fd24c4af
      David S. Miller 提交于
      Based upon a bug report by Alexander Beregalov and commentary
      from Ben Hutchings.
      
      These are totally unnecessary, in particular because this
      driver's ->hard_start_xmit() handler takes the same driver
      spinlock that the set-multicast-list handler uses.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fd24c4af
    • A
      ucc_geth: do not touch net queue in adjust_link phylib callback · ebbdbd7c
      Anton Vorontsov 提交于
      If the net queue has not been started, we'll get this nice oops
      and non-working ethernet:
      
      ------------[ cut here ]------------
      Kernel BUG at c01f4648 [verbose debug info unavailable]
      Oops: Exception in kernel mode, sig: 5 [#1]
      MPC836x RDK
      Modules linked in:
      NIP: c01f4648 LR: c01c0a10 CTR: c01c08e4
      REGS: cf839e40 TRAP: 0700   Not tainted  (2.6.26-05254-gc7b9969)
      MSR: 00021032 <ME,IR,DR>  CR: 22042044  XER: 00000000
      TASK = cf828c30[4] 'events/0' THREAD: cf838000
      GPR00: c01c0a10 cf839ef0 cf828c30 c035ceb0 cf8469a0 00000064 00000000 00000000
      GPR08: c035ceb0 00000001 00000001 cf99c280 22044044 7ca81020 0fffc000 00000000
      GPR16: 0fff2544 0fff63c0 00000000 0fff78e0 0ffa5580 00000004 00000000 00000000
      GPR24: 02082000 cf9d0000 d1068000 00009032 cf846800 cf846b80 00000001 00000014
      NIP [c01f4648] __netif_schedule+0x28/0x8c
      LR [c01c0a10] adjust_link+0x12c/0x1e4
      Call Trace:
      [cf839ef0] [c0380f50] 0xc0380f50 (unreliable)
      [cf839f10] [c01c0a10] adjust_link+0x12c/0x1e4
      [cf839f40] [c01c2628] phy_state_machine+0x2e0/0x448
      [cf839f60] [c00425e8] run_workqueue+0xc8/0x168
      [cf839f90] [c0042c6c] worker_thread+0x70/0xd0
      [cf839fd0] [c0046954] kthread+0x48/0x84
      [cf839ff0] [c0012488] kernel_thread+0x44/0x60
      Instruction dump:
      7c0803a6 4e800020 3d20c036 9421ffe0 7c0802a6 7c681b78 3929ceb0 7c694a78
      7d290034 90010024 bfa10014 5529d97e <0f090000> 39600002 38030024 7d200028
      ---[ end trace a57d367843bd2904 ]---
      
      Since the driver is using phylib (which is doing netif_carrier_on/off()),
      we should simply remove netif_tx_schedule_all() from adjust_link().
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ebbdbd7c
    • A
      gianfar: do not touch net queue in adjust_link phylib callback · afc07946
      Anton Vorontsov 提交于
      If the net queue has not been started, we'll get this nice oops
      and non-working ethernet:
      
      PHY: 0:01 - Link is Up - 1000/Full
      ------------[ cut here ]------------
      kernel BUG at net/core/dev.c:1328!
      Oops: Exception in kernel mode, sig: 5 [#1]
      MPC837x RDB
      Modules linked in:
      NIP: c02544a0 LR: c01a17d0 CTR: c01a16ac
      REGS: cf837e40 TRAP: 0700   Not tainted  (2.6.26-05253-g14b395e3)
      MSR: 00021032 <ME,IR,DR>  CR: 22042044  XER: 00000000
      TASK = cf819400[5] 'events/0' THREAD: cf836000
      GPR00: c01a17d0 cf837ef0 cf819400 c03d8d08 cf8469a0 00000064 00000000 00000000
      GPR08: c03d8d08 00000001 00000001 cf899ba0 22044044 00000000 0fffd000 00000000
      GPR16: 0fff3028 0fff6cf0 00000000 0fff8390 0ff494a0 00000004 00000000 00000000
      GPR24: c0361a00 00001058 cf9f6600 00009032 cf846800 cf846b80 00000001 00000014
      NIP [c02544a0] __netif_schedule+0x28/0x8c
      LR [c01a17d0] adjust_link+0x124/0x1cc
      Call Trace:
      [cf837ef0] [c03fb3a0] 0xc03fb3a0 (unreliable)
      [cf837f10] [c01a17d0] adjust_link+0x124/0x1cc
      [cf837f40] [c01a8e28] phy_state_machine+0x2e0/0x448
      [cf837f60] [c0040254] run_workqueue+0xc8/0x168
      [cf837f90] [c00408d8] worker_thread+0x70/0xd0
      [cf837fd0] [c0044630] kthread+0x48/0x84
      [cf837ff0] [c0012610] kernel_thread+0x44/0x60
      Instruction dump:
      7c0803a6 4e800020 3d20c03e 9421ffe0 7c0802a6 7c681b78 39298d08 7c694a78
      7d290034 90010024 bfa10014 5529d97e <0f090000> 39600002 38030024 7d200028
      ---[ end trace 13dfd73ee42d0c30 ]---
      
      Since the driver is using phylib (which is doing netif_carrier_on/off()),
      we should simply remove netif_tx_schedule_all() from adjust_link().
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      afc07946
    • D
      atl1: Do not wake queue before queue has been started. · 39d48157
      David S. Miller 提交于
      Based upon a bug report by Alexey Dobriyan, the patch is
      also tested by him and confirmed to fix the problem.
      
      Packet flow during link state events should not be done by
      waking and stopping the TX queue anyways, that is handled
      transparently by netif_carrier_{on,off}().
      
      So, remove the netif_{wake,stop}_queue() calls in the link
      check code, and add the necessary netif_start_queue() call
      to atl1_up().
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      39d48157
    • M
      dm crypt: add merge · d41e26b9
      Milan Broz 提交于
      This patch implements biovec merge function for crypt target.
      
      If the underlying device has merge function defined, call it.
      If not, keep precomputed value.
      Signed-off-by: NMilan Broz <mbroz@redhat.com>
      Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
      d41e26b9
    • M
      dm table: remove merge_bvec sector restriction · 9980c638
      Milan Broz 提交于
      Remove max_sector restriction - merge function replaced it.
      Signed-off-by: NMilan Broz <mbroz@redhat.com>
      Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
      9980c638
    • M
      dm: linear add merge · 7bc3447b
      Milan Broz 提交于
      This patch implements biovec merge function for linear target.
      
      If the underlying device has merge function defined, call it.
      If not, keep precomputed value.
      Signed-off-by: NMilan Broz <mbroz@redhat.com>
      Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
      7bc3447b
    • M
      dm: introduce merge_bvec_fn · f6fccb12
      Milan Broz 提交于
      Introduce a bvec merge function for device mapper devices
      for dynamic size restrictions.
      
      This code ensures the requested biovec lies within a single
      target and then calls a target-specific function to check
      against any constraints imposed by underlying devices.
      Signed-off-by: NMilan Broz <mbroz@redhat.com>
      Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
      f6fccb12
    • M
      dm snapshot: use per device mempools · 92e86812
      Mikulas Patocka 提交于
      Change snapshot per-module mempool to per-device mempool.
      
      Per-module mempools could cause a deadlock if multiple
      snapshot devices are stacked above each other.
      Signed-off-by: NMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
      92e86812
    • M
      dm snapshot: fix race during exception creation · a8d41b59
      Mikulas Patocka 提交于
      Fix a race condition that returns incorrect data when a write causes an
      exception to be allocated whilst a read is still in flight.
      
      The race condition happens as follows:
      * A read to non-reallocated sector in the snapshot is submitted so that the
        read is routed to the original device.
      * A write to the original device is submitted. The write causes an exception
        that reallocates the block.  The write proceeds.
      * The original read is dequeued and reads the wrong data.
      
      This race can be triggered with CFQ scheduler and one thread writing and
      multiple threads reading simultaneously.
      
      (This patch relies upon the earlier dm-kcopyd-per-device.patch to avoid a
      deadlock.)
      Signed-off-by: NMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
      a8d41b59
    • M
      dm snapshot: track snapshot reads · cd45daff
      Mikulas Patocka 提交于
      Whenever a snapshot read gets mapped through to the origin, track it in
      a per-snapshot hash table indexed by chunk number, using memory allocated
      from a new per-snapshot mempool.
      
      We need to track these reads to avoid race conditions which will be fixed
      by patches that follow.
      Signed-off-by: NMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
      cd45daff
    • A
      dm mpath: fix test for reinstate_path · def052d2
      Alasdair G Kergon 提交于
      Fix test for reinstate_path method before attempting to use it.
      Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
      Cc: Julia Lawall <julia@diku.dk>
      def052d2
    • M
      dm mpath: return parameter error · 148acff6
      Mikulas Patocka 提交于
      Return a specific error message if there are an invalid number of multipath
      arguments.
      
      This invalid command returns an "Unknown error" because the ti->error field is
      not set
      
      dmsetup create --table '0 2 multipath 0 0 1 1 round-robin 0 1 1 /dev/sdh' mpath0
      Signed-off-by: NMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
      148acff6
    • R
      dm io: remove struct padding · 6ae2fa67
      Richard Kennedy 提交于
      Rearrange struct dm_io.
      Shrinks size from 40 -> 32 allowing more objects/slab.
      Signed-off-by: NRichard Kennedy <richard@rsk.demon.co.uk>
      Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
      6ae2fa67
    • A
      dm log: make dm_dirty_log init and exit static · c8da2f8d
      Adrian Bunk 提交于
      dm_dirty_log_{init,exit}() can now become static.
      Signed-off-by: NAdrian Bunk <bunk@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
      c8da2f8d
    • M
      dm mpath: free path selector on invalid args · 371b2e34
      Mikulas Patocka 提交于
      Free path selector if the arguments are invalid.
      
      This command (note that it is invalid) causes reference leak on module
      "dm_round_robin" and prevents the module from being removed.
      
      dmsetup create --table '0 2 multipath 0 0 1 1 round-robin /dev/sdh' mpath0
      Signed-off-by: NMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
      371b2e34