1. 25 4月, 2007 2 次提交
    • J
      [JFFS2] Better fix for all-zero node headers · 0dec4c8b
      Joakim Tjernlund 提交于
      No need to check for all-zero header since the header cannot
      be zero due to other checks.
      
      Replace the all-zero header check in readinode.c with a
      check for the magic word.
      Signed-off-by: NJoakim Tjernlund <Joakim.Tjernlund@transmode.se>
      Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
      0dec4c8b
    • D
      [JFFS2] Improve read_inode memory usage, v2. · df8e96f3
      David Woodhouse 提交于
      We originally used to read every node and allocate a jffs2_tmp_dnode_info
      structure for each, before processing them in (reverse) version order
      and discarding the ones which are obsoleted by later nodes.
      
      With huge logfiles, this behaviour caused memory problems. For example, a
      file involved in OLPC trac #1292 has 1822391 nodes, and would cause the XO
      machine to run out of memory during the first stage of read_inode().
      
      Instead of just inserting nodes into a tree in version order as we find
      them, we now put them into a tree in order of their offset within the
      file, which allows us to immediately discard nodes which are completely
      obsoleted.
      
      We don't use a full tree with 'fragments' pointing to the real data
      structure, as we do in the normal fragtree. We sort only on the start
      address, and add an 'overlapped' flag to the tmp_dnode_info to indicate
      that the node in question is (partially) overlapped by another.
      
      When the scan is complete, we start at the end of the file, adding each
      node to a real fragtree as before. Where the node is non-overlapped, we
      just add it (it doesn't matter that it's not the latest version; there is
      no overlap). When the node at the end of the tree _is_ overlapped, we sort
      it and all its overlapping nodes into version order and then add them to
      the fragtree in that order.
      
      This 'early discard' reduces the peak allocation of tmp_dnode_info
      structures from 1.8M to a mere 62872 (3.5%) in the degenerate case
      referenced above.
      
      This version of the patch also correctly rememembers the highest node
      version# seen for an inode when it's scanned.
      Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
      df8e96f3
  2. 23 4月, 2007 2 次提交
    • D
      [JFFS2] Improve failure mode if inode checking leaves unchecked space. · 44b998e1
      David Woodhouse 提交于
      We should never find the unchecked size is non-zero after we've finished
      checking all inodes. If it happens, used to BUG(), leaving the alloc_sem
      held and deadlocking. Instead, just return -ENOSPC after complaining. The
      GC thread will die, but read-only operation should be able to continue and
      the file system should be unmountable.
      Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
      44b998e1
    • D
      [JFFS2] Fix cross-endian build. · 566865a2
      David Woodhouse 提交于
      When compiling a LE-capable JFFS2 on PowerPC, wbuf.c fails to compile:
      
      fs/jffs2/wbuf.c:973: error: braced-group within expression allowed only inside a function
      fs/jffs2/wbuf.c:973: error: initializer element is not constant
      fs/jffs2/wbuf.c:973: error: (near initialization for ‘oob_cleanmarker.magic’)
      fs/jffs2/wbuf.c:974: error: braced-group within expression allowed only inside a function
      fs/jffs2/wbuf.c:974: error: initializer element is not constant
      fs/jffs2/wbuf.c:974: error: (near initialization for ‘oob_cleanmarker.nodetype’)
      fs/jffs2/wbuf.c:975: error: braced-group within expression allowed only inside a function
      fs/jffs2/wbuf.c:976: error: initializer element is not constant
      fs/jffs2/wbuf.c:976: error: (near initialization for ‘oob_cleanmarker.totlen’)
      
      Provide constant_cpu_to_je{16,32} functions, and use them for initialising the
      offending structure.
      Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
      566865a2
  3. 21 4月, 2007 1 次提交
  4. 18 4月, 2007 6 次提交
  5. 03 4月, 2007 1 次提交
  6. 10 3月, 2007 1 次提交
  7. 09 3月, 2007 2 次提交
  8. 08 3月, 2007 19 次提交
  9. 07 3月, 2007 3 次提交
    • H
      [PATCH] suspend regression: sysfs deadlock · 266d4f40
      Hugh Dickins 提交于
      Suspend deadlocks when trying to unregister /sys/block/sr0.
      
      This comes from Oliver's commit 94bebf4d
      "Driver core: fix race in sysfs between sysfs_remove_file() and
      read()/write()".
      
      sysfs_write_file downs buffer->sem while calling flush_write_buffer, and
      flushing that particular write buffer entails downing buffer->sem in
      orphan_all_buffers, resulting in the obvious self-deadlock.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      266d4f40
    • D
      [PATCH] fs: nobh_truncate_page() fix · 57bf63d6
      Dave Kleikamp 提交于
      This fixes a regression caused by 22c8ca78.
      
      nobh_prepare_write() no longer marks the page uptodate, so
      nobh_truncate_page() needs to do it.
      Signed-off-by: NDave Kleikamp <shaggy@linux.vnet.ibm.com>
      Cc: Nick Piggin <nickpiggin@yahoo.com.au>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      57bf63d6
    • M
      [PATCH] Fix 2.6.21 rfcomm lockups · 0de1517e
      Mark Lord 提交于
      Any attempt to open/use a bluetooth rfcomm device locks up
      scheduling completely on my machine.
      
      Interrupts (ping, alt-sysrq) seem to be alive, but nothing else.
      
      This was working fine in 2.6.20, broken now in 2.6.21-rc2-git*
      
      Reverting this change (below) fixes it:
      
      | author    Marcel Holtmann <marcel@holtmann.org>
      |      Sat, 17 Feb 2007 22:58:57 +0000 (23:58 +0100)
      | committer    David S. Miller <davem@sunset.davemloft.net>
      |      Mon, 26 Feb 2007 19:42:41 +0000 (11:42 -0800)
      | commit    c1a33136
      | tree    337a876f727061362b6a169f8759849c105b8f7a    tree | snapshot
      | parent    f5ffd462    commit | diff
      | | [Bluetooth] Make use of device_move() for RFCOMM TTY devices
      | | In the case of bound RFCOMM TTY devices the parent is not available
      | before its usage. So when opening a RFCOMM TTY device, move it to
      | the corresponding ACL device as a child. When closing the device,
      | move it back to the virtual device tree.
      | Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
      
      The simplest fix for this bug is to prevent sysfs_move_dir()
      from self-deadlocking when (old_parent == new_parent).
      
      This patch prevents total system lockup when using rfcomm devices.
      Signed-off-by: NMark Lord <mlord@pobox.com>
      Acked-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      Cc: Greg KH <greg@kroah.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      0de1517e
  10. 06 3月, 2007 2 次提交
  11. 05 3月, 2007 1 次提交