20 Jul, 2011

1 commit


28 May, 2011

1 commit


26 May, 2011

2 commits


25 Mar, 2011

1 commit

  • * 'for-2.6.39/core' of git://git.kernel.dk/linux-2.6-block: (65 commits)
    Documentation/iostats.txt: bit-size reference etc.
    cfq-iosched: removing unnecessary think time checking
    cfq-iosched: Don't clear queue stats when preempt.
    blk-throttle: Reset group slice when limits are changed
    blk-cgroup: Only give unaccounted_time under debug
    cfq-iosched: Don't set active queue in preempt
    block: fix non-atomic access to genhd inflight structures
    block: attempt to merge with existing requests on plug flush
    block: NULL dereference on error path in __blkdev_get()
    cfq-iosched: Don't update group weights when on service tree
    fs: assign sb->s_bdi to default_backing_dev_info if the bdi is going away
    block: Require subsystems to explicitly allocate bio_set integrity mempool
    jbd2: finish conversion from WRITE_SYNC_PLUG to WRITE_SYNC and explicit plugging
    jbd: finish conversion from WRITE_SYNC_PLUG to WRITE_SYNC and explicit plugging
    fs: make fsync_buffers_list() plug
    mm: make generic_writepages() use plugging
    blk-cgroup: Add unaccounted time to timeslice_used.
    block: fixup plugging stubs for !CONFIG_BLOCK
    block: remove obsolete comments for blkdev_issue_zeroout.
    blktrace: Use rq->cmd_flags directly in blk_add_trace_rq.
    ...

    Fix up conflicts in fs/{aio.c,super.c}

    Linus Torvalds
     

24 Mar, 2011

1 commit

  • As a preparation for removing ext2 non-atomic bit operations from
    asm/bitops.h. This converts ext2 non-atomic bit operations to
    little-endian bit operations.

    Signed-off-by: Akinobu Mita
    Acked-by: Jan Kara
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     

18 Mar, 2011

1 commit


14 Mar, 2011

1 commit

  • The exportfs encode handle function should return the minimum required
    handle size. This helps user to find out the handle size by passing 0
    handle size in the first step and then redoing to the call again with
    the returned handle size value.

    Acked-by: Serge Hallyn
    Signed-off-by: Aneesh Kumar K.V
    Signed-off-by: Al Viro

    Aneesh Kumar K.V
     

10 Mar, 2011

1 commit

  • Code has been converted over to the new explicit on-stack plugging,
    and delay users have been converted to use the new API for that.
    So lets kill off the old plugging along with aops->sync_page().

    Signed-off-by: Jens Axboe

    Jens Axboe
     

03 Mar, 2011

1 commit

  • (256 << sizeof(x)) - 1 is not the maximal possible value of x...
    In reality, the maximal allowed value for UDF FileLinkCount is
    65535.

    Signed-off-by: Al Viro

    Al Viro
     

23 Feb, 2011

2 commits

  • Fix compiler warning

    fs/udf/balloc.c: In function 'udf_bitmap_new_block':
    fs/udf/balloc.c:273: warning: passing argument 1 of '_find_next_bit_le' from incompatible pointer type
    fs/udf/balloc.c:285: warning: passing argument 1 of '_find_next_bit_le' from incompatible pointer type
    fs/udf/balloc.c:311: warning: passing argument 1 of '_find_next_bit_le' from incompatible pointer type
    fs/udf/balloc.c:325: warning: passing argument 1 of '_find_next_bit_le' from incompatible pointer type

    The main fix is to add a cast in ext2_find_next_bit().

    As all other usage locations of udf_find_next_one_bit()
    directly use bh->b_data (which is a char *), the useless
    (char *) cast in line 311 can be removed, too.

    Signed-off-by: Dirk Behme
    Signed-off-by: George G. Davis
    Signed-off-by: Jan Kara

    Dirk Behme
     
  • Use new truncation sequence in UDF and fix up error handling in the
    code.

    Signed-off-by: Jan Kara

    Jan Kara
     

12 Jan, 2011

1 commit

  • * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-udf-2.6:
    UDF: Close small mem leak in udf_find_entry()
    udf: Fix directory corruption after extent merging
    udf: Protect udf_file_aio_write from possible races
    udf: Remove unnecessary bkl usages
    udf: Use of s_alloc_mutex to serialize udf_relocate_blocks() execution
    udf: Replace bkl with the UDF_I(inode)->i_data_sem for protect udf_inode_info struct
    udf: Remove BKL from free space counting functions
    udf: Call udf_add_free_space() for more blocks at once in udf_free_blocks()
    udf: Remove BKL from udf_put_super() and udf_remount_fs()
    udf: Protect default inode credentials by rwlock
    udf: Protect all modifications of LVID with s_alloc_mutex
    udf: Move handling of uniqueID into a helper function and protect it by a s_alloc_mutex
    udf: Remove BKL from udf_update_inode
    udf: Convert UDF_SB(sb)->s_flags to use bitops
    fs/udf: Add printf format/argument verification
    fs/udf: Use vzalloc

    (Evil merge: this also removes the BKL dependency from the Kconfig file)

    Linus Torvalds
     

07 Jan, 2011

17 commits

  • RCU free the struct inode. This will allow:

    - Subsequent store-free path walking patch. The inode must be consulted for
    permissions when walking, so an RCU inode reference is a must.
    - sb_inode_list_lock to be moved inside i_lock because sb list walkers who want
    to take i_lock no longer need to take sb_inode_list_lock to walk the list in
    the first place. This will simplify and optimize locking.
    - Could remove some nested trylock loops in dcache code
    - Could potentially simplify things a bit in VM land. Do not need to take the
    page lock to follow page->mapping.

    The downsides of this is the performance cost of using RCU. In a simple
    creat/unlink microbenchmark, performance drops by about 10% due to inability to
    reuse cache-hot slab objects. As iterations increase and RCU freeing starts
    kicking over, this increases to about 20%.

    In cases where inode lifetimes are longer (ie. many inodes may be allocated
    during the average life span of a single inode), a lot of this cache reuse is
    not applicable, so the regression caused by this patch is smaller.

    The cache-hot regression could largely be avoided by using SLAB_DESTROY_BY_RCU,
    however this adds some complexity to list walking and store-free path walking,
    so I prefer to implement this at a later date, if it is shown to be a win in
    real situations. I haven't found a regression in any non-micro benchmark so I
    doubt it will be a problem.

    Signed-off-by: Nick Piggin

    Nick Piggin
     
  • Hi,

    There's a small memory leak in fs/udf/namei.c::udf_find_entry().

    We dynamically allocate memory for 'fname' with kmalloc() and in most
    situations we free it before we leave the function, but there is one
    situation where we do not (but should). This patch closes the leak by
    jumping to the 'out_ok' label which does the correct cleanup rather than
    doing half the cleanup and returning directly.

    Signed-off-by: Jesper Juhl
    Signed-off-by: Jan Kara

    Jesper Juhl
     
  • If udf_bread() called from udf_add_entry() managed to merge created extent to
    an already existing one (or if previous extents could be merged), the code
    truncating the last extent to proper size would just overwrite the freshly
    allocated extent with an extent that used to be in that place. This obviously
    results in a directory corruption. Fix the problem by properly reloading the
    last extent.

    Signed-off-by: Jan Kara

    Jan Kara
     
  • Code doing conversion from INICB file to a normal file in udf_file_aio_write()
    is not protected by any lock from other code modifying the inode. Use
    i_alloc_sem for that.

    Reported-by: Alessio Igor Bogani
    Signed-off-by: Jan Kara

    Jan Kara
     
  • The udf_readdir(), udf_lookup(), udf_create(), udf_mknod(), udf_mkdir(),
    udf_rmdir(), udf_link(), udf_get_parent() and udf_unlink() seems already
    adequately protected by i_mutex held by VFS invoking calls. The udf_rename()
    instead should be already protected by lock_rename again by VFS. The
    udf_ioctl(), udf_fill_super() and udf_evict_inode() don't requires any further
    protection.

    This work was supported by a hardware donation from the CE Linux Forum.

    Signed-off-by: Alessio Igor Bogani
    Signed-off-by: Jan Kara

    Alessio Igor Bogani
     
  • This work was supported by a hardware donation from the CE Linux Forum.

    Signed-off-by: Alessio Igor Bogani
    Signed-off-by: Jan Kara

    Alessio Igor Bogani
     
  • Replace bkl with the UDF_I(inode)->i_data_sem rw semaphore in
    udf_release_file(), udf_symlink(), udf_symlink_filler(), udf_get_block(),
    udf_block_map(), and udf_setattr(). The rule now is that any operation
    on regular file's or symlink's extents (or generally allocation information
    including goal block) needs to hold i_data_sem.

    This work was supported by a hardware donation from the CE Linux Forum.

    Signed-off-by: Alessio Igor Bogani
    Signed-off-by: Jan Kara

    Alessio Igor Bogani
     
  • udf_count_free_bitmap() does not need BKL because bitmaps are in a fixed
    place on disk and so we can count set bits without serialization.
    udf_count_free_table() is now protected by s_alloc_mutex instead of BKL
    to get a consistent view of free space extents.

    Signed-off-by: Jan Kara

    Jan Kara
     
  • There's no need to call udf_add_free_space() for one block at a time. It saves
    us noticeable amount of work and yields different result from the original
    code only if the filesystem is corrupted and bitmap bit is already cleared.
    In such case counter of free blocks is probably wrong anyways so the change
    does not matter.

    Signed-off-by: Jan Kara

    Jan Kara
     
  • udf_put_super() does not need BKL because the filesystem is shut down so
    there's nothing to race with. The credential changes in udf_remount_fs()
    and LVID changes are now protected by dedicated locks so we can remove BKL
    from this function as well.

    Signed-off-by: Jan Kara

    Jan Kara
     
  • Superblock carries credentials (uid, gid, etc.) which are used as default
    values in __udf_read_inode() when media does not provide these. These
    credentials can change during remount so we protect them by a rwlock so that
    each inode gets a consistent set of credentials.

    Signed-off-by: Jan Kara

    Jan Kara
     
  • udf_open_lvid() and udf_close_lvid() were modifying LVID without
    s_alloc_mutex. Since they can be called from remount, the modification
    could race with other filesystem modifications of LVID so protect them
    by s_alloc_mutex just to be sure.

    Signed-off-by: Jan Kara

    Jan Kara
     
  • uniqueID handling has been duplicated in three places. Move it into a common
    helper. Since we modify an LVID buffer with uniqueID update, we take
    sbi->s_alloc_mutex to protect agaist other modifications of the structure.

    Signed-off-by: Jan Kara

    Jan Kara
     
  • udf_update_inode() does not need BKL since on-disk inode modifications are
    protected by the buffer lock and reading of values of in-memory inode is
    safe without any lock. In some cases we can write inconsistent inode state
    to disk but in that case inode will be marked dirty and overwritten later.

    Also make unnecessarily global udf_sync_inode() static.

    Signed-off-by: Jan Kara

    Jan Kara
     
  • Use atomic bitops to manipulate with sb flags to make manipulation safe
    without any locking.

    Signed-off-by: Jan Kara

    Jan Kara
     
  • Add __attribute__((format... to udf_warning.

    All arguments matched formats, no other changes necessary.

    Signed-off-by: Joe Perches
    Signed-off-by: Jan Kara

    Joe Perches
     
  • Signed-off-by: Joe Perches
    Signed-off-by: Jan Kara

    Joe Perches
     

29 Oct, 2010

1 commit


26 Oct, 2010

1 commit


23 Oct, 2010

1 commit

  • * 'vfs' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl: (30 commits)
    BKL: remove BKL from freevxfs
    BKL: remove BKL from qnx4
    autofs4: Only declare function when CONFIG_COMPAT is defined
    autofs: Only declare function when CONFIG_COMPAT is defined
    ncpfs: Lock socket in ncpfs while setting its callbacks
    fs/locks.c: prepare for BKL removal
    BKL: Remove BKL from ncpfs
    BKL: Remove BKL from OCFS2
    BKL: Remove BKL from squashfs
    BKL: Remove BKL from jffs2
    BKL: Remove BKL from ecryptfs
    BKL: Remove BKL from afs
    BKL: Remove BKL from USB gadgetfs
    BKL: Remove BKL from autofs4
    BKL: Remove BKL from isofs
    BKL: Remove BKL from fat
    BKL: Remove BKL from ext2 filesystem
    BKL: Remove BKL from do_new_mount()
    BKL: Remove BKL from cgroup
    BKL: Remove BKL from NTFS
    ...

    Linus Torvalds
     

21 Oct, 2010

1 commit

  • With all the patches we have queued in the BKL removal tree, only a
    few dozen modules are left that actually rely on the BKL, and even
    there are lots of low-hanging fruit. We need to decide what to do
    about them, this patch illustrates one of the options:

    Every user of the BKL is marked as 'depends on BKL' in Kconfig,
    and the CONFIG_BKL becomes a user-visible option. If it gets
    disabled, no BKL using module can be built any more and the BKL
    code itself is compiled out.

    The one exception is file locking, which is practically always
    enabled and does a 'select BKL' instead. This effectively forces
    CONFIG_BKL to be enabled until we have solved the fs/lockd
    mess and can apply the patch that removes the BKL from fs/locks.c.

    Signed-off-by: Arnd Bergmann

    Arnd Bergmann
     

05 Oct, 2010

1 commit

  • This patch is a preparation necessary to remove the BKL from do_new_mount().
    It explicitly adds calls to lock_kernel()/unlock_kernel() around
    get_sb/fill_super operations for filesystems that still uses the BKL.

    I've read through all the code formerly covered by the BKL inside
    do_kern_mount() and have satisfied myself that it doesn't need the BKL
    any more.

    do_kern_mount() is already called without the BKL when mounting the rootfs
    and in nfsctl. do_kern_mount() calls vfs_kern_mount(), which is called
    from various places without BKL: simple_pin_fs(), nfs_do_clone_mount()
    through nfs_follow_mountpoint(), afs_mntpt_do_automount() through
    afs_mntpt_follow_link(). Both later functions are actually the filesystems
    follow_link inode operation. vfs_kern_mount() is calling the specified
    get_sb function and lets the filesystem do its job by calling the given
    fill_super function.

    Therefore I think it is safe to push down the BKL from the VFS to the
    low-level filesystems get_sb/fill_super operation.

    [arnd: do not add the BKL to those file systems that already
    don't use it elsewhere]

    Signed-off-by: Jan Blunck
    Signed-off-by: Arnd Bergmann
    Cc: Matthew Wilcox
    Cc: Christoph Hellwig

    Jan Blunck
     

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

4 commits

  • Signed-off-by: Al Viro

    Al Viro
     
  • Replace inode_setattr with opencoded variants of it in all callers. This
    moves the remaining call to vmtruncate into the filesystem methods where it
    can be replaced with the proper truncate sequence.

    In a few cases it was obvious that we would never end up calling vmtruncate
    so it was left out in the opencoded variant:

    spufs: explicitly checks for ATTR_SIZE earlier
    btrfs,hugetlbfs,logfs,dlmfs: explicitly clears ATTR_SIZE earlier
    ufs: contains an opencoded simple_seattr + truncate that sets the filesize just above

    In addition to that ncpfs called inode_setattr with handcrafted iattrs,
    which allowed to trim down the opencoded variant.

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

    Christoph Hellwig
     
  • For the new truncate sequence every filesystem that wants to truncate on-disk
    state needs a seattr method. Convert the remaining filesystems that implement
    the truncate inode operation to have its own setattr method.

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

    Christoph Hellwig
     
  • Move the call to vmtruncate to get rid of accessive blocks to the callers
    in preparation of the new truncate sequence and rename the non-truncating
    version to block_write_begin.

    While we're at it also remove several unused arguments to block_write_begin.

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

    Christoph Hellwig