1. 16 3月, 2009 1 次提交
    • A
      UBIFS: fix lprops committing bug · 0a6fb8d9
      Artem Bityutskiy 提交于
      When writing lprop nodes, do not forget to set @from to 0 when
      switching the LEB. This fixes the following bug:
      
      UBIFS error (pid 27768): ubifs_leb_write: writing -15456 bytes at 16:15880, error -22
      UBIFS error (pid 27768): do_commit: commit failed, error -22
      UBIFS warning (pid 27768): ubifs_ro_mode: switched to read-only mode, error -22
      Pid: 27768, comm: freespace Not tainted 2.6.29-rc4-ubifs-2.6 #43
      Call Trace:
       [<ffffffffa00c46d6>] ubifs_ro_mode+0x54/0x56 [ubifs]
       [<ffffffffa00cfa16>] do_commit+0x4f5/0x50a [ubifs]
       [<ffffffffa00cfae7>] ubifs_run_commit+0xbc/0xdb [ubifs]
       [<ffffffffa00d42b9>] ubifs_budget_space+0x742/0x9ed [ubifs]
       [<ffffffff812daf45>] ? __mutex_lock_common+0x361/0x3ae
       [<ffffffffa00bc437>] ? ubifs_write_begin+0x18d/0x44c [ubifs]
       [<ffffffffa00bc5cb>] ubifs_write_begin+0x321/0x44c [ubifs]
       [<ffffffff8106222b>] ? trace_hardirqs_on_caller+0x1f/0x14d
       [<ffffffff81097ce2>] generic_file_buffered_write+0x12f/0x2d9
       [<ffffffff8109828d>] __generic_file_aio_write_nolock+0x261/0x295
       [<ffffffff81098aff>] generic_file_aio_write+0x69/0xc5
       [<ffffffffa00bb914>] ubifs_aio_write+0x14c/0x19e [ubifs]
       [<ffffffff810c8f42>] do_sync_write+0xe7/0x12d
       [<ffffffff81055378>] ? autoremove_wake_function+0x0/0x38
       [<ffffffff81149edc>] ? security_file_permission+0x11/0x13
       [<ffffffff810c9827>] vfs_write+0xab/0x105
       [<ffffffff810c9945>] sys_write+0x47/0x6f
       [<ffffffff8100c35b>] system_call_fastpath+0x16/0x1b
      Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      0a6fb8d9
  2. 09 2月, 2009 1 次提交
  3. 28 1月, 2009 1 次提交
  4. 31 12月, 2008 2 次提交
  5. 03 12月, 2008 4 次提交
  6. 07 11月, 2008 1 次提交
    • A
      UBIFS: allow for gaps when dirtying the LPT · 7e2d9bfa
      Adrian Hunter 提交于
      The LPT may have gaps in it because initially empty LEBs
      are not added by mkfs.ubifs - because it does not know how
      many there are.  Then UBIFS allocates empty LEBs in the
      reverse order that they are discovered i.e. they are
      added to, and removed from, the front of a list.  That
      creates a gap in the middle of the LPT.
      
      The function dirtying the LPT tree (for the purpose of
      small model garbage collection) assumed that a gap could
      only occur at the very end of the LPT and stopped dirtying
      prematurely, which in turn resulted in the LPT running
      out of space - something that is designed to be impossible.
      Signed-off-by: NAdrian Hunter <ext-adrian.hunter@nokia.com>
      7e2d9bfa
  7. 30 9月, 2008 2 次提交
    • A
      UBIFS: check buffer length when scanning for LPT nodes · be2f6bd6
      Adrian Hunter 提交于
      'is_a_node()' function was reading from a buffer before
      checking the buffer length, resulting in an OOPS as
      follows:
      
      BUG: unable to handle kernel paging request at f8f74002
      IP: [<f8f9783f>] :ubifs:ubifs_unpack_bits+0xca/0x233
      *pde = 19e95067 *pte = 00000000
      Oops: 0000 [#1] PREEMPT SMP
      Modules linked in: ubifs ubi mtdchar bio2mtd mtd brd video output
      [last unloaded: mtd]
      
      Pid: 6414, comm: integck Not tainted (2.6.27-rc6ubifs34 #23)
      EIP: 0060:[<f8f9783f>] EFLAGS: 00010246 CPU: 0
      EIP is at ubifs_unpack_bits+0xca/0x233 [ubifs]
      EAX: 00000000 EBX: f6090630 ECX: d9badcfc EDX: 00000000
      ESI: 00000004 EDI: f8f74002 EBP: d9badcec ESP: d9badcc0
       DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
      Process integck (pid: 6414, ti=d9bac000 task=f727dae0 task.ti=d9bac000)
      Stack: 00000006 f7306240 00000002 00000000 d9badcfc d9badd00 0000001c 00000000
             f6090630 f6090630 f8f74000 d9badd10 f8fa1cc9 00000000 f8f74002 00000000
             f8f74002 f60fe128 f6090630 f8f74000 d9badd68 f8fa1e46 00000000 0001e000
      Call Trace:
       [<f8fa1cc9>] ? is_a_node+0x30/0x90 [ubifs]
       [<f8fa1e46>] ? dbg_check_ltab+0x11d/0x5bd [ubifs]
       [<f8fa388f>] ? ubifs_lpt_start_commit+0x42/0xed3 [ubifs]
       [<c038e76a>] ? mutex_unlock+0x8/0xa
       [<f8f9625d>] ? ubifs_tnc_start_commit+0x1c8/0xedb [ubifs]
       [<f8f8d90b>] ? do_commit+0x187/0x523 [ubifs]
       [<c038e76a>] ? mutex_unlock+0x8/0xa
       [<f8f7ca17>] ? bud_wbuf_callback+0x22/0x28 [ubifs]
       [<f8f8dd1d>] ? ubifs_run_commit+0x76/0xc0 [ubifs]
       [<f8f8032c>] ? ubifs_sync_fs+0xd2/0xe6 [ubifs]
       [<c01a2e97>] ? vfs_quota_sync+0x0/0x17e
       [<c01a5ba6>] ? quota_sync_sb+0x26/0xbb
       [<c01a2e97>] ? vfs_quota_sync+0x0/0x17e
       [<c01a5c5d>] ? sync_dquots+0x22/0x12c
       [<c0173d1b>] ? __fsync_super+0x19/0x68
       [<c0173d75>] ? fsync_super+0xb/0x19
       [<c0174065>] ? generic_shutdown_super+0x22/0xe7
       [<c01a31fc>] ? vfs_quota_off+0x0/0x5fd
       [<f8f7cf4d>] ? ubifs_kill_sb+0x31/0x35 [ubifs]
       [<c01741f9>] ? deactivate_super+0x5e/0x71
       [<c0187610>] ? mntput_no_expire+0x82/0xe4
       [<c0187905>] ? sys_umount+0x4c/0x2f6
       [<c0187bc8>] ? sys_oldumount+0x19/0x1b
       [<c0103b71>] ? sysenter_do_call+0x12/0x25
       =======================
      Code: c1 f8 03 8d 04 07 8b 4d e8 89 01 8b 45 e4 89 10 89 d8 89 f1 d3 e8 85 c0
            74 07 29 d6 83 fe 20 75 2a 89 d8 83 c4 20 5b 5e 5f 5d
      EIP: [<f8f9783f>] ubifs_unpack_bits+0xca/0x233 [ubifs] SS:ESP 0068:d9badcc0
      ---[ end trace 1f02572436518c13 ]---
      Signed-off-by: NAdrian Hunter <ext-adrian.hunter@nokia.com>
      be2f6bd6
    • A
      UBIFS: add more debugging messages for LPT · 73944a6d
      Adrian Hunter 提交于
      Also add debugging checks for LPT size and separate
      out c->check_lpt_free from unrelated bitfields.
      Signed-off-by: NAdrian Hunter <ext-adrian.hunter@nokia.com>
      73944a6d
  8. 15 7月, 2008 1 次提交