1. 18 3月, 2010 1 次提交
  2. 04 12月, 2009 1 次提交
  3. 30 11月, 2009 1 次提交
  4. 24 6月, 2009 1 次提交
  5. 21 2月, 2009 1 次提交
    • T
      [JFFS2] fix mount crash caused by removed nodes · 4c41bd0e
      Thomas Gleixner 提交于
      At scan time we observed following scenario:
      
         node A inserted
         node B inserted
         node C inserted -> sets overlapped flag on node B
      
         node A is removed due to CRC failure -> overlapped flag on node B remains
      
         while (tn->overlapped)
         	 tn = tn_prev(tn);
      
         ==> crash, when tn_prev(B) is referenced.
      
      When the ultimate node is removed at scan time and the overlapped flag
      is set on the penultimate node, then nothing updates the overlapped
      flag of that node. The overlapped iterators blindly expect that the
      ultimate node does not have the overlapped flag set, which causes the
      scan code to crash.
      
      It would be a huge overhead to go through the node chain on node
      removal and fix up the overlapped flags, so detecting such a case on
      the fly in the overlapped iterators is a simpler and reliable
      solution.
      
      Cc: stable@kernel.org
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      4c41bd0e
  6. 02 5月, 2008 2 次提交
  7. 23 4月, 2008 1 次提交
  8. 22 4月, 2008 1 次提交
  9. 03 2月, 2008 1 次提交
  10. 28 11月, 2007 1 次提交
  11. 22 11月, 2007 1 次提交
  12. 24 9月, 2007 1 次提交
  13. 03 8月, 2007 2 次提交
  14. 10 7月, 2007 1 次提交
  15. 05 7月, 2007 1 次提交
  16. 04 7月, 2007 2 次提交
  17. 29 6月, 2007 1 次提交
  18. 02 6月, 2007 1 次提交
  19. 01 6月, 2007 1 次提交
  20. 08 5月, 2007 1 次提交
  21. 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
  22. 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
  23. 05 5月, 2007 1 次提交
  24. 26 4月, 2007 1 次提交
  25. 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
  26. 18 4月, 2007 1 次提交
    • A
      [JFFS2] fix buffer sise calculations in jffs2_get_inode_nodes() · 10731f83
      Artem Bityutskiy 提交于
      In read inode we have an optimization which prevents one
      min. I/O unit (e.g. NAND page) to be read more then once.
      
      Namely, at the beginning we do not know which node type we read,
      so we read so we assume we read the directory entry, because it
      has the smallest node header. When we read it, we read up to the
      next min. I/O unit, just because if later we'll need to read more,
      we already have this data.
      
      If it turns out to be that the node is not directory entry, and
      we need more data, and we did not read it because it sits in the
      next min. I/O unit, we read the whole next (or several next)
      min. I/O unit(s). And if it happens to be that we read a data node,
      and we've read part of its data, we calculate partial CRC.
      So if later we need to check data CRC, we'll only read the rest
      of the data from further min. I/O units and continue CRC checking.
      
      This code was a bit messy and buggy. The bug was that it assumed
      relatively large min. I/O unit, so that the largest node header
      could overlap only one min. I/O unit boundary.
      
      This parch clean-ups the code a bit and fixes this bug.
      The patch was not tested on flash with small min. I/O unit, like
      NOR-ECC, nut it was tested on NAND with 512 bytes NAND page, so
      it at least does not break NAND. It was also tested with mtdram
      so it should not break NOR.
      Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
      10731f83
  27. 09 3月, 2007 1 次提交
  28. 10 12月, 2006 1 次提交
  29. 02 7月, 2006 1 次提交
  30. 27 6月, 2006 1 次提交
  31. 19 6月, 2006 1 次提交
  32. 18 6月, 2006 1 次提交
  33. 13 5月, 2006 2 次提交
    • K
      [JFFS2][XATTR] Remove 'struct list_head ilist' from jffs2_inode_cache. · 8f2b6f49
      KaiGai Kohei 提交于
      This patch can reduce 4-byte of memory usage per inode_cache.
      
      [4/10] jffs2-xattr-v5.1-04-remove_ilist_from_ic.patch
      Signed-off-by: NKaiGai Kohei <kaigai@ak.jp.nec.com>
      8f2b6f49
    • K
      [JFFS2][XATTR] XATTR support on JFFS2 (version. 5) · aa98d7cf
      KaiGai Kohei 提交于
      This attached patches provide xattr support including POSIX-ACL and
      SELinux support on JFFS2 (version.5).
      
      There are some significant differences from previous version posted
      at last December.
      The biggest change is addition of EBS(Erase Block Summary) support.
      Currently, both kernel and usermode utility (sumtool) can recognize
      xattr nodes which have JFFS2_NODETYPE_XATTR/_XREF nodetype.
      
      In addition, some bugs are fixed.
      - A potential race condition was fixed.
      - Unexpected fail when updating a xattr by same name/value pair was fixed.
      - A bug when removing xattr name/value pair was fixed.
      
      The fundamental structures (such as using two new nodetypes and exclusion
      mechanism by rwsem) are unchanged. But most of implementation were reviewed
      and updated if necessary.
      Espacially, we had to change several internal implementations related to
      load_xattr_datum() to avoid a potential race condition.
      
      [1/2] xattr_on_jffs2.kernel.version-5.patch
      [2/2] xattr_on_jffs2.utils.version-5.patch
      Signed-off-by: NKaiGai Kohei <kaigai@ak.jp.nec.com>
      Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
      aa98d7cf
  34. 21 4月, 2006 1 次提交