11 Aug, 2010

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (96 commits)
    no need for list_for_each_entry_safe()/resetting with superblock list
    Fix sget() race with failing mount
    vfs: don't hold s_umount over close_bdev_exclusive() call
    sysv: do not mark superblock dirty on remount
    sysv: do not mark superblock dirty on mount
    btrfs: remove junk sb_dirt change
    BFS: clean up the superblock usage
    AFFS: wait for sb synchronization when needed
    AFFS: clean up dirty flag usage
    cifs: truncate fallout
    mbcache: fix shrinker function return value
    mbcache: Remove unused features
    add f_flags to struct statfs(64)
    pass a struct path to vfs_statfs
    update VFS documentation for method changes.
    All filesystems that need invalidate_inode_buffers() are doing that explicitly
    convert remaining ->clear_inode() to ->evict_inode()
    Make ->drop_inode() just return whether inode needs to be dropped
    fs/inode.c:clear_inode() is gone
    fs/inode.c:evict() doesn't care about delete vs. non-delete paths now
    ...

    Fix up trivial conflicts in fs/nilfs2/super.c

    Linus Torvalds
     

10 Aug, 2010

2 commits

  • Signed-off-by: Al Viro

    Al Viro
     
  • Make sure we check the truncate constraints early on in ->setattr by adding
    those checks to inode_change_ok. Also clean up and document inode_change_ok
    to make this obvious.

    As a fallout we don't have to call inode_newsize_ok from simple_setsize and
    simplify it down to a truncate_setsize which doesn't return an error. This
    simplifies a lot of setattr implementations and means we use truncate_setsize
    almost everywhere. Get rid of fat_setsize now that it's trivial and mark
    ext2_setsize static to make the calling convention obvious.

    Keep the inode_newsize_ok in vmtruncate for now as all callers need an
    audit for its removal anyway.

    Note: setattr code in ecryptfs doesn't call inode_change_ok at all and
    needs a deeper audit, but that is left for later.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Al Viro

    Christoph Hellwig
     

04 Aug, 2010

1 commit


03 Aug, 2010

1 commit


19 Jul, 2010

1 commit

  • The current shrinker implementation requires the registered callback
    to have global state to work from. This makes it difficult to shrink
    caches that are not global (e.g. per-filesystem caches). Pass the shrinker
    structure to the callback so that users can embed the shrinker structure
    in the context the shrinker needs to operate on and get back to it in the
    callback via container_of().

    Signed-off-by: Dave Chinner
    Reviewed-by: Christoph Hellwig

    Dave Chinner
     

13 Jul, 2010

1 commit

  • UBIFS tries to alway have an LEB reserved for GC, and stores it
    in c->gc_lnum. Besides, there is GC head which points to the current
    GC head LEB.

    In case of an unclean power cut, what may happen is that the GC head
    was switched to the reserved GC LEB (c->gc_lnum), but a new reserved
    GC LEB was not created yet. So, after an unclean reboot we may have
    no reserved GC LEB, and we need to find a new LEB for this.

    To do this, we find a dirty LEB which can fit the current GC head,
    move the data, unmap this dirty LEB, and it becomes our reserved GC
    LEB.

    However, if we cannot find a dirty enough LEB, we return failure,
    which is wrong, because we still can have free LEBs to use for
    the reserved GC LEB. This patch fixes the issue.

    This patch also fixes few typos in comments, which were spotted by
    aspell.

    Note, this patch fixes a real issue

    [ 14.328117] UBIFS: recovery needed
    [ 53.941378] UBIFS error (pid 462): ubifs_rcvry_gc_commit: could not find a dirty LEB
    [ 89.606399] UBIFS: recovery completed
    [ 89.609329] UBIFS assert failed in mount_ubifs at 1358 (pid 462)
    [ 89.616165] [] (unwind_backtrace+0x0/0xe4) from [] (ubifs_fill_super+0x11d0/0x1c4c)
    [ 89.625930] [] (ubifs_fill_super+0x11d0/0x1c4c) from [] (ubifs_get_sb+0x1b0/0x354)
    [ 89.635696] [] (ubifs_get_sb+0x1b0/0x354) from [] (vfs_kern_mount+0x50/0xe0)
    [ 89.644485] [] (vfs_kern_mount+0x50/0xe0) from [] (do_kern_mount+0x34/0xdc)
    [ 89.653274] [] (do_kern_mount+0x34/0xdc) from [] (do_mount+0x148/0x7cc)
    [ 89.662063] [] (do_mount+0x148/0x7cc) from [] (sys_mount+0x98/0xc8)
    [ 89.670852] [] (sys_mount+0x98/0xc8) from [] (ret_fast_syscall+0x0/0x28)

    which was reported here:
    http://article.gmane.org/gmane.linux.drivers.mtd/29923
    by Alexander Pazdnikov

    Reported-by: Alexander Pazdnikov
    Signed-off-by: Artem Bityutskiy
    Reviewed-by: Adrian Hunter

    Artem Bityutskiy
     

12 Jun, 2010

2 commits

  • Use ERR_CAST(x) rather than ERR_PTR(PTR_ERR(x)). The former makes more
    clear what is the purpose of the operation, which otherwise looks like a
    no-op.

    Signed-off-by: Julia Lawall
    Signed-off-by: Artem Bityutskiy

    Julia Lawall
     
  • The error code from 'ubifs_rcvry_gc_commit()' was ignored, so UBIFS
    failed to recover and continued. Instead, we should refuse mounting
    the file-system.

    Signed-off-by: Artem Bityutskiy

    Artem Bityutskiy
     

11 Jun, 2010

1 commit


28 May, 2010

2 commits


22 May, 2010

1 commit


29 Apr, 2010

1 commit

  • If some read/write error happens (eg.CRC error), UBIFS swotches to
    read-only mode, but the VFS infomation still not update.
    This patch add this also make /proc/mounts update.

    Signed-off-by: Zhang Jiejing

    ZhangJieJing
     

30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

08 Mar, 2010

1 commit

  • This reverts commit a069c266ae5fdfbf5b4aecf2c672413aa33b2504.

    It turns ou that not only was it missing a case (XFS) that needed it,
    but perhaps more importantly, people sometimes want to enable new
    modules that they hadn't had enabled before, and if such a module uses
    list_sort(), it can't easily be inserted any more.

    So rather than add a "select LIST_SORT" to the XFS case, just leave it
    compiled in. It's not all _that_ big, after all, and the inconvenience
    isn't worth it.

    Requested-by: Alexey Dobriyan
    Cc: Christoph Hellwig
    Cc: Don Mullis
    Cc: Andrew Morton
    Cc: Dave Chinner
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

07 Mar, 2010

1 commit

  • Build list_sort() only for configs that need it -- those that don't save
    ~581 bytes (i386).

    Signed-off-by: Don Mullis
    Cc: Dave Airlie
    Cc: Andi Kleen
    Cc: Dave Chinner
    Cc: Artem Bityutskiy
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Don Mullis
     

06 Mar, 2010

1 commit

  • This gives the filesystem more information about the writeback that
    is happening. Trond requested this for the NFS unstable write handling,
    and other filesystems might benefit from this too by beeing able to
    distinguish between the different callers in more detail.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Al Viro

    Christoph Hellwig
     

13 Jan, 2010

1 commit

  • There are two copies of list_sort() in the tree already, one in the DRM
    code, another in ubifs. Now XFS needs this as well. Create a generic
    list_sort() function from the ubifs version and convert existing users
    to it so we don't end up with yet another copy in the tree.

    Signed-off-by: Dave Chinner
    Acked-by: Dave Airlie
    Acked-by: Artem Bityutskiy
    Signed-off-by: Linus Torvalds

    Dave Chinner
     

18 Dec, 2009

1 commit

  • After I_SYNC was split from I_LOCK the leftover is always used together with
    I_NEW and thus superflous.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Al Viro

    Christoph Hellwig
     

16 Dec, 2009

1 commit


11 Dec, 2009

1 commit

  • * git://git.infradead.org/ubifs-2.6:
    UBIFS: fix return code in check_leaf
    UBI: flush wl before clearing update marker
    MAINTAINERS: change e-mail of Artem Bityutskiy
    UBIFS: remove manual O_SYNC handling
    UBIFS: support mounting of UBI volume character devices
    UBI: Add ubi_open_volume_path

    Linus Torvalds
     

08 Dec, 2009

1 commit


04 Dec, 2009

1 commit

  • That is "success", "unknown", "through", "performance", "[re|un]mapping"
    , "access", "default", "reasonable", "[con]currently", "temperature"
    , "channel", "[un]used", "application", "example","hierarchy", "therefore"
    , "[over|under]flow", "contiguous", "threshold", "enough" and others.

    Signed-off-by: André Goddard Rosa
    Signed-off-by: Jiri Kosina

    André Goddard Rosa
     

24 Nov, 2009

2 commits

  • generic_file_aio_write already calls into ->fsync to handle O_SYNC/O_DSYNC.
    Remove the duplicate call to ubifs_sync_wbufs_by_inode which is already
    covered by ubifs_fsync.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Artem Bityutskiy

    Christoph Hellwig
     
  • This patch makes it possible to mount UBI character device
    nodes, and use something like:

    $ mount -t ubifs /dev/ubi_volume_name /mnt/ubifs

    instead of the old restrictive 'nodev' semantics:

    $ mount -t ubifs ubi0_0 /mnt/ubifs

    [Comments and the patch were amended a bit by Artem]

    Signed-off-by: Corentin Chary
    Signed-off-by: Artem Bityutskiy

    Corentin Chary
     

28 Sep, 2009

1 commit


22 Sep, 2009

1 commit


21 Sep, 2009

1 commit


17 Sep, 2009

1 commit


16 Sep, 2009

2 commits

  • bdi_start_writeback() is currently split into two paths, one for
    WB_SYNC_NONE and one for WB_SYNC_ALL. Add bdi_sync_writeback()
    for WB_SYNC_ALL writeback and let bdi_start_writeback() handle
    only WB_SYNC_NONE.

    Push down the writeback_control allocation and only accept the
    parameters that make sense for each function. This cleans up
    the API considerably.

    Signed-off-by: Jens Axboe

    Jens Axboe
     
  • We do this automatically in get_sb_bdev() from the set_bdev_super()
    callback. Filesystems that have their own private backing_dev_info
    must assign that in ->fill_super().

    Note that ->s_bdi assignment is required for proper writeback!

    Acked-by: Christoph Hellwig
    Signed-off-by: Jens Axboe

    Jens Axboe
     

15 Sep, 2009

4 commits


11 Sep, 2009

2 commits


10 Sep, 2009

2 commits

  • This patch amends and nicifies commentaries in file.c, as well as
    fixes some spelling problems.

    Signed-off-by: Artem Bityutskiy

    Artem Bityutskiy
     
  • The 'ubifs_scan()' function returns -EUCLEAN if something is corrupted
    and recovery is needed, otherwise it returns other error codes. However,
    in few places UBIFS does not check the error codes and runs recovery.
    This patch changes this behavior and makes UBIFS start recovery only
    on -EUCLEAN errors.

    Signed-off-by: Artem Bityutskiy
    Reviewed-by: Adrian Hunter

    Artem Bityutskiy