09 Mar, 2007

2 commits


08 Mar, 2007

2 commits

  • The garbage collection thread is strictly an optimisation. Everything it
    does would also be done just-in-time in the context of something in
    userspace trying to access the file system.

    Sometimes, however, it's a pessimisation. Especially during early boot
    when it's checksumming nodes and scanning inodes which are shortly going
    to be pulled in by read_inode anyway. We end up building the rbtree of
    node coverage twice for the same inode.

    By switching to yield() instead of cond_resched() in the main loop, we
    observe boot times on the OLPC system going down from about 100 seconds to
    60.

    Signed-off-by: David Woodhouse

    David Woodhouse
     
  • For the case when nand_write_page fail with -EIO for the first page in an
    eraseblock, jffs2_wbuf_recover ends up producing a BUG in jffs2_block_refile
    as jeb->first_node is not yet set up (it's set up later in jffs2_wbuf_recover).
    This BUG is not really a bug; it's just jffs2_wbuf_recover calling
    jffs2_block_refile with the wrong second parameter.
    This patch takes care of this situation.

    Signed-off-by: Vitaly Wool
    Signed-off-by: Thomas Gleixner
    Signed-off-by: David Woodhouse

    Vitaly Wool
     

20 Feb, 2007

1 commit

  • * git://git.infradead.org/mtd-2.6: (49 commits)
    [MTD] [NAND] S3C2412 fix hw ecc
    [MTD] [NAND] Work around false compiler warning in CAFÉ driver
    [JFFS2] printk warning fixes
    [MTD] [MAPS] ichxrom warning fix
    [MTD] [MAPS] amd76xrom warning fix
    [MTD] [MAPS] esb2rom warning fixes
    [MTD] [MAPS] ck804xrom warning fix
    [MTD] [MAPS] netsc520 warning fix
    [MTD] [MAPS] sc520cdp warning fix
    [MTD] [ONENAND] onenand_base warning fix
    [MTD] [NAND] eXcite nand flash driver
    [MTD] Improve heuristic for detecting wrong-endian RedBoot partition table
    [MTD] Fix RedBoot partition parsing regression harder.
    [MTD] [NAND] S3C2410: Hardware ECC correction code
    [JFFS2] Use MTD_OOB_AUTO to automatically place cleanmarker on NAND
    [MTD] Clarify OOB-operation interface comments
    [MTD] remove unused ecctype,eccsize fields from struct mtd_info
    [MTD] [NOR] Intel: remove ugly PROGREGION macros
    [MTD] [NOR] STAA: use writesize instead off eccsize to represent ECC block
    [MTD] OneNAND: Invalidate bufferRAM after erase
    ...

    Linus Torvalds
     

19 Feb, 2007

1 commit

  • fs/jffs2/wbuf.c: In function 'jffs2_check_oob_empty':
    fs/jffs2/wbuf.c:993: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
    fs/jffs2/wbuf.c:993: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'
    fs/jffs2/wbuf.c: In function 'jffs2_check_nand_cleanmarker':
    fs/jffs2/wbuf.c:1036: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
    fs/jffs2/wbuf.c:1036: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'
    fs/jffs2/wbuf.c: In function 'jffs2_write_nand_cleanmarker':
    fs/jffs2/wbuf.c:1062: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
    fs/jffs2/wbuf.c:1062: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'

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

    Andrew Morton
     

15 Feb, 2007

1 commit

  • After Al Viro (finally) succeeded in removing the sched.h #include in module.h
    recently, it makes sense again to remove other superfluous sched.h includes.
    There are quite a lot of files which include it but don't actually need
    anything defined in there. Presumably these includes were once needed for
    macros that used to live in sched.h, but moved to other header files in the
    course of cleaning it up.

    To ease the pain, this time I did not fiddle with any header files and only
    removed #includes from .c-files, which tend to cause less trouble.

    Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha,
    arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig,
    allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all
    configs in arch/arm/configs on arm. I also checked that no new warnings were
    introduced by the patch (actually, some warnings are removed that were emitted
    by unnecessarily included header files).

    Signed-off-by: Tim Schmielau
    Acked-by: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tim Schmielau
     

13 Feb, 2007

2 commits

  • This patch is inspired by Arjan's "Patch series to mark struct
    file_operations and struct inode_operations const".

    Compile tested with gcc & sparse.

    Signed-off-by: Josef 'Jeff' Sipek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Josef 'Jeff' Sipek
     
  • Many struct inode_operations in the kernel can be "const". Marking them const
    moves these to the .rodata section, which avoids false sharing with potential
    dirty data. In addition it'll catch accidental writes at compile time to
    these shared resources.

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     

09 Feb, 2007

2 commits

  • Nowadays MTD supports an MTD_OOB_AUTO option which allows users
    to access free bytes in NAND's OOB as a contiguous buffer, although
    it may be highly discontinuous.

    This patch teaches JFFS2 to use this nice feature instead of the
    old MTD_OOB_PLACE option. This for example caused problems with
    OneNAND. Now JFFS2 does not care how are the free bytes situated.

    This may change position of the clean marker on some flashes,
    but this is not a problem. JFFS2 will just re-erase the empty
    eraseblocks and write the new (correct) clean marker.

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

    Artem Bityutskiy
     
  • If jffs2_sum_init() fails, c->blocks is not freed neither in
    jffs2_do_mount_fs() nor in jffs2_do_fill_super().

    Signed-off-by: Dmitry Adamushko
    Signed-off-by: David Woodhouse

    Dmitry Adamushko
     

18 Jan, 2007

1 commit


13 Jan, 2007

1 commit


10 Jan, 2007

2 commits


03 Jan, 2007

1 commit


19 Dec, 2006

1 commit


10 Dec, 2006

1 commit


09 Dec, 2006

1 commit


08 Dec, 2006

3 commits

  • Move process freezing functions from include/linux/sched.h to freezer.h, so
    that modifications to the freezer or the kernel configuration don't require
    recompiling just about everything.

    [akpm@osdl.org: fix ueagle driver]
    Signed-off-by: Nigel Cunningham
    Cc: "Rafael J. Wysocki"
    Cc: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nigel Cunningham
     
  • Replace all uses of kmem_cache_t with struct kmem_cache.

    The patch was generated using the following script:

    #!/bin/sh
    #
    # Replace one string by another in all the kernel sources.
    #

    set -e

    for file in `find * -name "*.c" -o -name "*.h"|xargs grep -l $1`; do
    quilt add $file
    sed -e "1,\$s/$1/$2/g" $file >/tmp/$$
    mv /tmp/$$ $file
    quilt refresh
    done

    The script was run like this

    sh replace kmem_cache_t "struct kmem_cache"

    Signed-off-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • SLAB_KERNEL is an alias of GFP_KERNEL.

    Signed-off-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     

04 Dec, 2006

1 commit


29 Nov, 2006

2 commits

  • get_mtd_device() returns NULL in case of any failure. Teach it to return an
    error code instead. Fix all users as well.

    Signed-off-by: Artem Bityutskiy

    Artem Bityutskiy
     
  • As was discussed between Ricard Wanderlöf, David Woodhouse, Artem
    Bityutskiy and me, the current API for reading/writing OOB is confusing.

    The thing that introduces confusion is the need to specify ops.len
    together with ops.ooblen for reads/writes that concern only OOB not data
    area. So, ops.len is overloaded: when ops.datbuf != NULL it serves to
    specify the length of the data read, and when ops.datbuf == NULL, it
    serves to specify the full OOB read length.

    The patch inlined below is the slightly updated version of the previous
    patch serving the same purpose, but with the new Artem's comments taken
    into account.

    Artem, BTW, thanks a lot for your valuable input!

    Signed-off-by: Vitaly Wool
    Signed-off-by: David Woodhouse

    Vitaly Wool
     

21 Oct, 2006

3 commits


12 Oct, 2006

1 commit


04 Oct, 2006

1 commit

  • gcc emits the following warning on a 'allmodconfig' build:

    fs/jffs2/xattr.c: In function ‘unrefer_xattr_datum’:
    fs/jffs2/xattr.c:402: warning: unused variable ‘version’
    fs/jffs2/xattr.c:402: warning: unused variable ‘xid’

    Given that these variables are only used in the debug printk, and they
    merely remove a deref, we can easily kill the warning by adding the
    derefs to the debug printk.

    Signed-off-by: Jeff Garzik
    Signed-off-by: David Woodhouse

    Jeff Garzik
     

01 Oct, 2006

3 commits

  • This is mostly included for parity with dec_nlink(), where we will have some
    more hooks. This one should stay pretty darn straightforward for now.

    Signed-off-by: Dave Hansen
    Acked-by: Christoph Hellwig
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Hansen
     
  • When a filesystem decrements i_nlink to zero, it means that a write must be
    performed in order to drop the inode from the filesystem.

    We're shortly going to have keep filesystems from being remounted r/o between
    the time that this i_nlink decrement and that write occurs.

    So, add a little helper function to do the decrements. We'll tie into it in a
    bit to note when i_nlink hits zero.

    Signed-off-by: Dave Hansen
    Acked-by: Christoph Hellwig
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Hansen
     
  • This patch cleans up generic_file_*_read/write() interfaces. Christoph
    Hellwig gave me the idea for this clean ups.

    In a nutshell, all filesystems should set .aio_read/.aio_write methods and use
    do_sync_read/ do_sync_write() as their .read/.write methods. This allows us
    to cleanup all variants of generic_file_* routines.

    Final available interfaces:

    generic_file_aio_read() - read handler
    generic_file_aio_write() - write handler
    generic_file_aio_write_nolock() - no lock write handler

    __generic_file_aio_write_nolock() - internal worker routine

    Signed-off-by: Badari Pulavarty
    Signed-off-by: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Badari Pulavarty
     

27 Sep, 2006

2 commits


22 Sep, 2006

1 commit

  • We certainly don't need the check for Linux version > 2.5.2, and in fact
    we can also live without the __ECOS check, since we can just add it back
    in the eCos git tree which is automatically derived from the Linux fs/jffs2
    subdirectory in the upstream git tree.

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

    Michal Piotrowski
     

16 Sep, 2006

1 commit

  • In some special case (padding because of sync
    or umount) it can be possible that summary
    information is not fit to the end of the erase
    block. In these cases the collecting of summary
    is disabled for this erase block.

    The problem was that this was not respected
    by jffs2_sum_add_kvec(). This patch fix this
    bug.

    From: Zoltan Sogor
    Signed-off-by: Ferenc Havasi
    Signed-off-by: David Woodhouse

    Havasi Ferenc
     

16 Aug, 2006

1 commit


07 Jul, 2006

1 commit


04 Jul, 2006

1 commit

  • * git://git.infradead.org/mtd-2.6:
    [JFFS2][XATTR] Fix memory leak in POSIX-ACL support
    fs/jffs2/: make 2 functions static
    [MTD] NAND: Fix broken sharpsl driver
    [JFFS2][XATTR] Fix xd->refcnt race condition
    MTD: kernel-doc fixes + additions
    MTD: fix all kernel-doc warnings
    [MTD] DOC: Fixup read functions and do a little cleanup

    Linus Torvalds