10 Jan, 2012

5 commits


25 Oct, 2010

1 commit


08 Aug, 2010

1 commit


20 May, 2010

1 commit


19 May, 2010

2 commits

  • jffs2_garbage_collect_pass() would previously return -EAGAIN if it
    couldn't find anything to garbage collect from, and there were blocks on
    the erase_pending_list. If the blocks were actually in the process of
    being erased, though, then they wouldn't be on that list. Check for
    nr_erasing_blocks being non-zero instead.

    Fix jffs2_reserve_space() to wait for the in-progress erases to
    complete, when jffs2_garbage_collect_pass() returns -EAGAIN.

    And fix jffs2_erase_succeeded() to actually wake up the erase_wait wq
    that jffs2_reserve_space() is now using.

    Signed-off-by: David Woodhouse

    David Woodhouse
     
  • We're about to start calling this from the jffs2_garbage_collect_pass(), and
    we'll want to know whether it actually did anything or not.

    Signed-off-by: Joakim Tjernlund
    Signed-off-by: David Woodhouse

    Joakim Tjernlund
     

09 Jul, 2009

1 commit

  • Commit 5fd29d6ccbc98884569d6f3105aeca70858b3e0f ("printk: clean up
    handling of log-levels and newlines") changed printk semantics. printk
    lines with multiple KERN_ prefixes are no longer emitted as
    before the patch.

    is now included in the output on each additional use.

    Remove all uses of multiple KERN_s in formats.

    Signed-off-by: Joe Perches
    Signed-off-by: Linus Torvalds

    Joe Perches
     

29 May, 2009

1 commit

  • Erase errors such as:
    "Newly-erased block contained word 0xa4ef223e at offset 0x0296a014"
    and failure to write the clean marker,
    moves the offending erase block to erasing list before calling
    jffs2_erase_failed(). This is bad as jffs2_erase_failed() will
    also move the block to the bad_list, but is now moving the
    wrong block, causing FS corruption.

    Signed-off-by: Joakim Tjernlund
    Signed-off-by: David Woodhouse

    Joakim Tjernlund
     

10 Dec, 2008

1 commit

  • MTD internal API presently uses 32-bit values to represent
    device size. This patch updates them to 64-bits but leaves
    the external API unchanged. Extending the external API
    is a separate issue for several reasons. First, no one
    needs it at the moment. Secondly, whether the implementation
    is done with IOCTLs, sysfs or both is still debated. Thirdly
    external API changes require the internal API to be accepted
    first.

    Note that although the MTD API will be able to support 64-bit
    device sizes, existing drivers do not and are not required
    to do so, although NAND base has been updated.

    In general, changing from 32-bit to 64-bit values cause little
    or no changes to the majority of the code with the following
    exceptions:
    - printk message formats
    - division and modulus of 64-bit values
    - NAND base support
    - 32-bit local variables used by mtdpart and mtdconcat
    - naughtily assuming one structure maps to another
    in MEMERASE ioctl

    Signed-off-by: Adrian Hunter
    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Adrian Hunter
     

12 Aug, 2008

1 commit


02 May, 2008

2 commits


23 Apr, 2008

4 commits

  • Just to keep the debug code happy when it's adding all the blocks up.
    Otherwise, they disappear for a while while the locks are dropped to
    check them and write the cleanmarker.

    Signed-off-by: David Woodhouse

    David Woodhouse
     
  • It looks the error paths in jffs2_block_check_erase() have wrong return
    values. A block that failed to be erased never gets marked as bad.

    Signed-off-by: David Woodhouse

    Anders Grafström
     
  • The problem fixed in commit 014b164e1392a166fe96e003d2f0e7ad2e2a0bb7
    (space leak with in-band cleanmarkers) would have been caught a lot
    quicker if our paranoid debugging mode had included adding up the size
    counts from all the eraseblocks and comparing the totals with the counts
    in the superblock. Add that.

    Make jffs2_mark_erased_block() file the newly-erased block on the
    free_list before calling the debug function, to make it happy.

    Signed-off-by: David Woodhouse

    David Woodhouse
     
  • We were accounting for the cleanmarker by calling jffs2_link_node_ref()
    (without locking!), which adjusted both superblock and per-eraseblock
    accounting, subtracting the size of the cleanmarker from {jeb,c}->free_size
    and adding it to {jeb,c}->used_size.

    But only _then_ were we adding the size of the newly-erased block back
    to the superblock counts, and we were adding each of jeb->{free,used}_size
    to the corresponding superblock counts. Thus, the size of the cleanmarker
    was effectively subtracted from the superblock's free_size _twice_.

    Fix this, by always adding a full eraseblock size to c->free_size when
    we've erased a block. And call jffs2_link_node_ref() under the proper
    lock, while we're at it.

    Thanks to Alexander Yurchenko and/or Damir Shayhutdinov for (almost)
    pinpointing the problem.

    Signed-off-by: David Woodhouse

    David Woodhouse
     

22 Apr, 2008

1 commit


24 Sep, 2007

1 commit

  • Fix a couple of instances in JFFS2 where the unpoint() routine is
    being called with the wrong length in cases where the point() routine
    truncated a request.

    Signed-off-by: Andy Lowe
    Signed-off-by: Nicolas Pitre
    Signed-off-by: David Woodhouse

    Andy Lowe
     

22 Aug, 2007

1 commit

  • fs/jffs2/erase.c: In function 'jffs2_block_check_erase':
    fs/jffs2/erase.c:355: warning: format '%08x' expects type 'unsigned int', but argument 3 has type 'long unsigned int'

    and

    fs/jffs2/erase.c: In function 'jffs2_erase_pending_blocks':
    fs/jffs2/erase.c:404: warning: 'bad_offset' may be used uninitialized in this function

    Signed-off-by: Andrew Morton
    Signed-off-by: David Woodhouse

    Andrew Morton
     

10 Jul, 2007

1 commit


29 Jun, 2007

3 commits


25 Apr, 2007

1 commit

  • 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: David Woodhouse

    David Woodhouse
     

18 Apr, 2007

1 commit

  • When the MTD driver returns write failure, the following deadlock
    occurs:

    We are in __jffs2_flush_wbuf(), we hold &c->wbuf_sem. Write failure.
    jffs2_wbuf_recover()->jffs2_reserve_space_gc()->jffs2_do_reserve_space()
    ->jffs2_erase_pending_blocks()->jffs2_flash_read()

    and it tries to lock &c->wbuf_sem again. Deadlock.

    Reported-by: Adrian Hunter
    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Artem Bityutskiy
     

28 Jun, 2006

1 commit

  • * git://git.infradead.org/mtd-2.6:
    [MTD] NAND: Select chip before checking write protect status
    [MTD] CORE mtdchar.c: fix off-by-one error in lseek()
    [MTD] NAND: Fix typo in mtd/nand/ts7250.c
    [JFFS2][XATTR] coexistence between xattr and write buffering support.
    [JFFS2][XATTR] Fix wrong copyright
    [JFFS2][XATTR] Re-define xd->refcnt as atomic_t
    [JFFS2][XATTR] Fix memory leak with jffs2_xattr_ref
    [JFFS2][XATTR] rid unnecessary writing of delete marker.
    [JFFS2][XATTR] Fix ACL bug when updating null xattr by null ACL.
    [JFFS2][XATTR] using 'delete marker' for xdatum/xref deletion
    [MTD] Fix off-by-one error in physmap.c
    [MTD] Remove unused 'nr_banks' variable from ixp2000 map driver
    [MTD NAND] s3c2412 support in s3c2410.c
    [MTD] Initialize 'writesize'
    [MTD] NAND: ndfc fix address offset thinko
    [MTD] NAND: S3C2410 convert prinks to dev_*()s
    [MTD] NAND: Missing fixups

    Linus Torvalds
     

27 Jun, 2006

2 commits

  • - When xdatum is removed, a new xdatum with 'delete marker' is
    written. (version==0xffffffff means 'delete marker')
    - When xref is removed, a new xref with 'delete marker' is written.
    (odd-numbered xseqno means 'delete marker')

    - delete_xattr_(datum/xref)_delay() are new deletion functions
    are added. We can only use them if we can detect the target
    obsolete xdatum/xref as a orphan or errir one.
    (e.g when inode deletion, or detecting crc error)

    [1/3] jffs2-xattr-v6-01-delete_marker.patch

    Signed-off-by: KaiGai Kohei
    Signed-off-by: David Woodhouse

    KaiGai Kohei
     
  • This patch converts the combination of list_del(A) and list_add(A, B) to
    list_move(A, B) under fs/.

    Cc: Ian Kent
    Acked-by: Joel Becker
    Cc: Neil Brown
    Cc: Hans Reiser
    Cc: Urban Widmark
    Acked-by: David Howells
    Acked-by: Mark Fasheh
    Signed-off-by: Akinobu Mita
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     

27 May, 2006

1 commit


25 May, 2006

2 commits


24 May, 2006

1 commit

  • As the first step towards eliminating the ref->next_phys member and saving
    memory by using an _array_ of struct jffs2_raw_node_ref per eraseblock,
    stop the write functions from allocating their own refs; have them just
    _reserve_ the appropriate number instead. Then jffs2_link_node_ref() can
    just fill them in.

    Use a linked list of pre-allocated refs in the superblock, for now. Once
    we switch to an array, it'll just be a case of extending that array.

    Signed-off-by: David Woodhouse

    David Woodhouse
     

22 May, 2006

2 commits


21 May, 2006

2 commits