1. 28 2月, 2015 2 次提交
  2. 24 2月, 2015 1 次提交
  3. 15 2月, 2015 1 次提交
  4. 13 2月, 2015 2 次提交
  5. 08 2月, 2015 2 次提交
  6. 06 2月, 2015 9 次提交
  7. 02 2月, 2015 2 次提交
  8. 29 1月, 2015 1 次提交
  9. 28 1月, 2015 10 次提交
    • R
      832b52a1
    • H
      UBI: fix soft lockup in ubi_check_volume() · 9aa272b4
      hujianyang 提交于
      Running mtd-utils/tests/ubi-tests/io_basic.c could cause
      soft lockup or watchdog reset. It is because *updatevol*
      will perform ubi_check_volume() after updating finish
      and this function will full scan the updated lebs if the
      volume is initialized as STATIC_VOLUME.
      
      This patch adds *cond_resched()* in the loop of lebs scan
      to avoid soft lockup.
      
      Helped by Richard Weinberger <richard@nod.at>
      
      [ 2158.067096] INFO: rcu_sched self-detected stall on CPU { 1}  (t=2101 jiffies g=1606 c=1605 q=56)
      [ 2158.172867] CPU: 1 PID: 2073 Comm: io_basic Tainted: G           O 3.10.53 #21
      [ 2158.172898] [<c000f624>] (unwind_backtrace+0x0/0x120) from [<c000c294>] (show_stack+0x10/0x14)
      [ 2158.172918] [<c000c294>] (show_stack+0x10/0x14) from [<c008ac3c>] (rcu_check_callbacks+0x1c0/0x660)
      [ 2158.172936] [<c008ac3c>] (rcu_check_callbacks+0x1c0/0x660) from [<c002b480>] (update_process_times+0x38/0x64)
      [ 2158.172953] [<c002b480>] (update_process_times+0x38/0x64) from [<c005ff38>] (tick_sched_handle+0x54/0x60)
      [ 2158.172966] [<c005ff38>] (tick_sched_handle+0x54/0x60) from [<c00601ac>] (tick_sched_timer+0x44/0x74)
      [ 2158.172978] [<c00601ac>] (tick_sched_timer+0x44/0x74) from [<c003f348>] (__run_hrtimer+0xc8/0x1b8)
      [ 2158.172992] [<c003f348>] (__run_hrtimer+0xc8/0x1b8) from [<c003fd9c>] (hrtimer_interrupt+0x128/0x2a4)
      [ 2158.173007] [<c003fd9c>] (hrtimer_interrupt+0x128/0x2a4) from [<c0246f1c>] (arch_timer_handler_virt+0x28/0x30)
      [ 2158.173022] [<c0246f1c>] (arch_timer_handler_virt+0x28/0x30) from [<c0086214>] (handle_percpu_devid_irq+0x9c/0x124)
      [ 2158.173036] [<c0086214>] (handle_percpu_devid_irq+0x9c/0x124) from [<c0082bd8>] (generic_handle_irq+0x20/0x30)
      [ 2158.173049] [<c0082bd8>] (generic_handle_irq+0x20/0x30) from [<c000969c>] (handle_IRQ+0x64/0x8c)
      [ 2158.173060] [<c000969c>] (handle_IRQ+0x64/0x8c) from [<c0008544>] (gic_handle_irq+0x3c/0x60)
      [ 2158.173074] [<c0008544>] (gic_handle_irq+0x3c/0x60) from [<c02f0f80>] (__irq_svc+0x40/0x50)
      [ 2158.173083] Exception stack(0xc4043c98 to 0xc4043ce0)
      [ 2158.173092] 3c80:                                                       c4043ce4 00000019
      [ 2158.173102] 3ca0: 1f8a865f c050ad10 1f8a864c 00000031 c04b5970 0003ebce 00000000 f3550000
      [ 2158.173113] 3cc0: bf00bc68 00000800 0003ebce c4043ce0 c0186d14 c0186cb8 80000013 ffffffff
      [ 2158.173130] [<c02f0f80>] (__irq_svc+0x40/0x50) from [<c0186cb8>] (read_current_timer+0x4/0x38)
      [ 2158.173145] [<c0186cb8>] (read_current_timer+0x4/0x38) from [<1f8a865f>] (0x1f8a865f)
      [ 2183.927097] BUG: soft lockup - CPU#1 stuck for 22s! [io_basic:2073]
      [ 2184.002229] Modules linked in: nandflash(O) [last unloaded: nandflash]
      Signed-off-by: NWang Kai <morgan.wang@huawei.com>
      Signed-off-by: Nhujianyang <hujianyang@huawei.com>
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      9aa272b4
    • R
      UBI: Fastmap: Care about the protection queue · 4f5e3b6f
      Richard Weinberger 提交于
      Fastmap can miss a PEB if it is in the protection queue
      and not jet in the used tree.
      Treat every protected PEB as used.
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      4f5e3b6f
    • A
      UBI: do propagate positive error codes up · 0e707ae7
      Artem Bityutskiy 提交于
      UBI uses positive function return codes internally, and should not propagate
      them up, except in the place this path fixes. Here is the original bug report
      from Dan Carpenter:
      
      The problem is really in ubi_eba_read_leb().
      
      drivers/mtd/ubi/eba.c
         412                  err = ubi_io_read_vid_hdr(ubi, pnum, vid_hdr, 1);
         413                  if (err && err != UBI_IO_BITFLIPS) {
         414                          if (err > 0) {
         415                                  /*
         416                                   * The header is either absent or corrupted.
         417                                   * The former case means there is a bug -
         418                                   * switch to read-only mode just in case.
         419                                   * The latter case means a real corruption - we
         420                                   * may try to recover data. FIXME: but this is
         421                                   * not implemented.
         422                                   */
         423                                  if (err == UBI_IO_BAD_HDR_EBADMSG ||
         424                                      err == UBI_IO_BAD_HDR) {
         425                                          ubi_warn("corrupted VID header at PEB %d, LEB %d:%d",
         426                                                   pnum, vol_id, lnum);
         427                                          err = -EBADMSG;
         428                                  } else
         429                                          ubi_ro_mode(ubi);
      
      On this path we return UBI_IO_FF and UBI_IO_FF_BITFLIPS and it
      eventually gets passed to ERR_PTR().  We probably dereference the bad
      pointer and oops.  At that point we've gone read only so it was already
      a bad situation...
      
         430                          }
         431                          goto out_free;
         432                  } else if (err == UBI_IO_BITFLIPS)
         433                          scrub = 1;
         434
      Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      0e707ae7
    • A
      UBI: clean-up printing helpers · 39990c6e
      Artem Bityutskiy 提交于
      Let's prefix UBI messages with 'ubiX' instead of 'UBI-X' - this is more
      consistent with the way we name UBI devices.
      
      Also, commit "32608703 UBI: Extend UBI layer debug/messaging capabilities"
      added the function name print to 'ubi_msg()' - lets revert this change, since
      these messages are supposed to be just informative messages, and not debugging
      messages.
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      39990c6e
    • T
      UBI: extend UBI layer debug/messaging capabilities - cosmetics · 45fc5c81
      Tanya Brokhman 提交于
      Some cosmetic fixes to the patch "UBI: Extend UBI layer debug/messaging
      capabilities".
      Signed-off-by: NTanya Brokhman <tlinder@codeaurora.org>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      45fc5c81
    • R
      UBI: Block: Add blk-mq support · ff1f48ee
      Richard Weinberger 提交于
      Convert the driver to blk-mq.
      Beside of moving to the modern block interface this change boosts
      also the performance of the driver.
      
      nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xda
      nand: Micron NAND 256MiB 3,3V 8-bit
      nand: 256MiB, SLC, page size: 2048, OOB size: 64
      
      root@debian-armhf:~# dd if=/dev/ubiblock0_0 of=/dev/zero bs=1M
      243+1 records in
      243+1 records out
      255080448 bytes (255 MB) copied, 4.39295 s, 58.1 MB/s
      
      vs.
      
      root@debian-armhf:~# dd if=/dev/ubiblock0_0 of=/dev/zero bs=1M
      243+1 records in
      243+1 records out
      255080448 bytes (255 MB) copied, 2.87676 s, 88.7 MB/s
      
      Cc: hch@infradead.org
      Cc: axboe@fb.com
      Cc: tom.leiming@gmail.com
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      Tested-by: NEzequiel Garcia <ezequiel@vanguardiasur.com.ar>
      Reviewed-by: NJens Axboe <axboe@fb.com>
      Acked-by: NEzequiel Garcia <ezequiel@vanguardiasur.com.ar>
      ff1f48ee
    • R
      UBI: Add initial support for scatter gather · 9ff08979
      Richard Weinberger 提交于
      Adds a new set of functions to deal with scatter gather.
      ubi_eba_read_leb_sg() will read from a LEB into a scatter gather list.
      The new data structure struct ubi_sgl will be used within UBI to
      hold the scatter gather list itself and metadata to have a cursor
      within the list.
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      Tested-by: NEzequiel Garcia <ezequiel@vanguardiasur.com.ar>
      Reviewed-by: NEzequiel Garcia <ezequiel@vanguardiasur.com.ar>
      9ff08979
    • R
      UBI: rename_volumes: Use UBI_METAONLY · 892abde5
      Richard Weinberger 提交于
      By using UBI_METAONLY in rename_volumes() it is now possible to rename
      an UBI volume atomically while it is open for writing.
      This is useful for firmware upgrades.
      
      Cc: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
      Cc: Andrew Murray <amurray@embedded-bits.co.uk>
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      Tested-by: NGuido Martínez <guido@vanguardiasur.com.ar>
      Reviewed-by: NGuido Martínez <guido@vanguardiasur.com.ar>
      Tested-by: NChristoph Fritz <chf.fritz@googlemail.com>
      Tested-by: NAndrew Murray <amurray@embedded-bits.co.uk>
      892abde5
    • R
      UBI: Implement UBI_METAONLY · fafdd2bf
      Richard Weinberger 提交于
      UBI_METAONLY is a new open mode for UBI volumes, it indicates
      that only meta data is being changed.
      Meta data in terms of UBI volumes means data which is stored in the
      UBI volume table but not on the volume itself.
      While it does not interfere with UBI_READONLY and UBI_READWRITE
      it is not allowed to use UBI_METAONLY together with UBI_EXCLUSIVE.
      
      Cc: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
      Cc: Andrew Murray <amurray@embedded-bits.co.uk>
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      Tested-by: NGuido Martínez <guido@vanguardiasur.com.ar>
      Reviewed-by: NGuido Martínez <guido@vanguardiasur.com.ar>
      Tested-by: NChristoph Fritz <chf.fritz@googlemail.com>
      Tested-by: NAndrew Murray <amurray@embedded-bits.co.uk>
      fafdd2bf
  10. 21 1月, 2015 6 次提交
  11. 16 1月, 2015 3 次提交
  12. 13 1月, 2015 1 次提交