1. 05 7月, 2007 1 次提交
  2. 04 7月, 2007 2 次提交
  3. 29 6月, 2007 7 次提交
  4. 02 6月, 2007 1 次提交
  5. 01 6月, 2007 1 次提交
  6. 20 5月, 2007 2 次提交
    • D
      [JFFS2] Fix potential memory leak of dead xattrs on unmount. · 2ad8ee71
      David Woodhouse 提交于
      An xattr_datum which ends up orphaned should be freed by the GC 
      thread. But if we umount before the GC thread is finished, or if we 
      mount read-only and the GC thread never runs, they might never be 
      freed. Clean them up during unmount, if there are any left.
      Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
      2ad8ee71
    • D
      [JFFS2] Fix BUG() caused by failing to discard xattrs on deleted files. · 8ae5d312
      David Woodhouse 提交于
      When we cannot mark nodes as obsolete, such as on NAND flash, we end up 
      having to delete inodes with !nlink in jffs2_build_remove_unlinked_inode().
      However, jffs2_build_xattr_subsystem() runs later than this, and will
      attach an xref to the dead inode. Then later when the last nodes of that
      dead inode are erased we hit a BUG() in jffs2_del_ino_cache() 
      because we're not supposed to get there with an xattr still attached to 
      the inode which is being killed.
      
      The simple fix is to refrain from attaching xattrs to inodes with zero 
      nlink, in jffs2_build_xattr_subsystem(). It's it's OK to trust nlink 
      here because the file system isn't actually mounted yet, so there's no 
      chance that a zero-nlink file could actually be alive still because 
      it's open.
      Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
      8ae5d312
  7. 17 5月, 2007 1 次提交
    • C
      Remove SLAB_CTOR_CONSTRUCTOR · a35afb83
      Christoph Lameter 提交于
      SLAB_CTOR_CONSTRUCTOR is always specified. No point in checking it.
      Signed-off-by: NChristoph Lameter <clameter@sgi.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Jens Axboe <jens.axboe@oracle.com>
      Cc: Steven French <sfrench@us.ibm.com>
      Cc: Michael Halcrow <mhalcrow@us.ibm.com>
      Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Cc: Miklos Szeredi <miklos@szeredi.hu>
      Cc: Steven Whitehouse <swhiteho@redhat.com>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Dave Kleikamp <shaggy@austin.ibm.com>
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      Cc: "J. Bruce Fields" <bfields@fieldses.org>
      Cc: Anton Altaparmakov <aia21@cantab.net>
      Cc: Mark Fasheh <mark.fasheh@oracle.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Jan Kara <jack@ucw.cz>
      Cc: David Chinner <dgc@sgi.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a35afb83
  8. 11 5月, 2007 1 次提交
  9. 08 5月, 2007 2 次提交
    • D
      [JFFS2] Simplify and clean up jffs2_add_tn_to_tree() some more. · 1c979645
      David Woodhouse 提交于
      Fixing at least a couple more bugs in the process.
      Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
      1c979645
    • C
      slab allocators: Remove SLAB_DEBUG_INITIAL flag · 50953fe9
      Christoph Lameter 提交于
      I have never seen a use of SLAB_DEBUG_INITIAL.  It is only supported by
      SLAB.
      
      I think its purpose was to have a callback after an object has been freed
      to verify that the state is the constructor state again?  The callback is
      performed before each freeing of an object.
      
      I would think that it is much easier to check the object state manually
      before the free.  That also places the check near the code object
      manipulation of the object.
      
      Also the SLAB_DEBUG_INITIAL callback is only performed if the kernel was
      compiled with SLAB debugging on.  If there would be code in a constructor
      handling SLAB_DEBUG_INITIAL then it would have to be conditional on
      SLAB_DEBUG otherwise it would just be dead code.  But there is no such code
      in the kernel.  I think SLUB_DEBUG_INITIAL is too problematic to make real
      use of, difficult to understand and there are easier ways to accomplish the
      same effect (i.e.  add debug code before kfree).
      
      There is a related flag SLAB_CTOR_VERIFY that is frequently checked to be
      clear in fs inode caches.  Remove the pointless checks (they would even be
      pointless without removeal of SLAB_DEBUG_INITIAL) from the fs constructors.
      
      This is the last slab flag that SLUB did not support.  Remove the check for
      unimplemented flags from SLUB.
      Signed-off-by: NChristoph Lameter <clameter@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      50953fe9
  10. 07 5月, 2007 1 次提交
    • D
      [JFFS2] Remove another bogus optimisation in jffs2_add_tn_to_tree() · fcf3cafb
      David Woodhouse 提交于
      We attempted to insert new nodes into the tree by just using
      rb_replace_node to let them replace an earlier node which they
      completely overlapped. However, that could place the new node into the
      wrong place in the tree, since its start could be node only before the
      start of the victim, but before the node _before_ the victim in the tree
      (if that previous node actually ends _after_ the new node, thus isn't
      entirely overlapped and wasn't itself chosen to be the victim).
      Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
      fcf3cafb
  11. 06 5月, 2007 1 次提交
    • D
      [JFFS2] Remove broken insert_point optimisation in jffs2_add_tn_to_tree() · 96dd8d25
      David Woodhouse 提交于
      The original code would remember, during the first pass over the tree,
      a suitable place to start the insertion from when we eventually come
      to add a new node.
      
      The optimisation was broken, and we sometimes ended up inserting a new
      node in the wrong place because we started the insertion from the wrong
      point.
      
      Just ditch the optimisation and start the insertion from the root of the
      tree, for now. I'll try it again when I'm feeling cleverer.
      Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
      96dd8d25
  12. 05 5月, 2007 2 次提交
  13. 02 5月, 2007 1 次提交
  14. 27 4月, 2007 1 次提交
  15. 26 4月, 2007 2 次提交
  16. 25 4月, 2007 3 次提交
    • D
      [JFFS2] Tidy up licensing/copyright boilerplate. · c00c310e
      David Woodhouse 提交于
      In particular, remove the bit in the LICENCE file about contacting
      Red Hat for alternative arrangements. Their errant IS department broke
      that arrangement a long time ago -- the policy of collecting copyright
      assignments from contributors came to an end when the plug was pulled on
      the servers hosting the project, without notice or reason.
      
      We do still dual-license it for use with eCos, with the GPL+exception
      licence approved by the FSF as being GPL-compatible. It's just that nobody
      has the right to license it differently.
      Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
      c00c310e
    • 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
  17. 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
  18. 21 4月, 2007 1 次提交
  19. 18 4月, 2007 6 次提交
  20. 03 4月, 2007 1 次提交
  21. 10 3月, 2007 1 次提交