29 Oct, 2010

1 commit


28 Oct, 2010

9 commits


26 Oct, 2010

2 commits


23 Oct, 2010

2 commits

  • * 'for-2.6.37/barrier' of git://git.kernel.dk/linux-2.6-block: (46 commits)
    xen-blkfront: disable barrier/flush write support
    Added blk-lib.c and blk-barrier.c was renamed to blk-flush.c
    block: remove BLKDEV_IFL_WAIT
    aic7xxx_old: removed unused 'req' variable
    block: remove the BH_Eopnotsupp flag
    block: remove the BLKDEV_IFL_BARRIER flag
    block: remove the WRITE_BARRIER flag
    swap: do not send discards as barriers
    fat: do not send discards as barriers
    ext4: do not send discards as barriers
    jbd2: replace barriers with explicit flush / FUA usage
    jbd2: Modify ASYNC_COMMIT code to not rely on queue draining on barrier
    jbd: replace barriers with explicit flush / FUA usage
    nilfs2: replace barriers with explicit flush / FUA usage
    reiserfs: replace barriers with explicit flush / FUA usage
    gfs2: replace barriers with explicit flush / FUA usage
    btrfs: replace barriers with explicit flush / FUA usage
    xfs: replace barriers with explicit flush / FUA usage
    block: pass gfp_mask and flags to sb_issue_discard
    dm: convey that all flushes are processed as empty
    ...

    Linus Torvalds
     
  • * '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
     

05 Oct, 2010

4 commits

  • If a filesystem has inode size > 128 and someone deletes lost+found and
    reuses inode 11 for some other file, extented attributes set for this
    inode before umount will get lost after remounting the filesystem. This
    is because extended attributes will get stored in an inode but ext3_iget
    will ignore them due to workaround of a bug in an old mkfs.

    Fix the problem by initializing i_extra_isize to 0 for freshly allocated
    inodes where mkfs workaround in ext3_iget applies. This way these inodes
    will always store extended attributes in a special block and no problems
    occur.

    The bug was spotted and a reproduction test provided by:
    Masayoshi MIZUMA

    Reviewed-by: Andreas Dilger
    Signed-off-by: Jan Kara

    Jan Kara
     
  • The BKL lock is protecting the remounting against a potential call to
    ext3_put_super(). This could not happen, since this is protected by the
    s_umount rw semaphore of struct super_block.

    Therefore I think the BKL is protecting nothing here.

    Signed-off-by: Jan Blunck
    Acked-by: Jan Kara
    Signed-off-by: Arnd Bergmann

    Jan Blunck
     
  • The BKL is protecting nothing than two memory allocations here.

    Signed-off-by: Jan Blunck
    Acked-by: Jan Kara
    Signed-off-by: Arnd Bergmann

    Jan Blunck
     
  • 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
     

17 Sep, 2010

1 commit

  • All the blkdev_issue_* helpers can only sanely be used for synchronous
    caller. To issue cache flushes or barriers asynchronously the caller needs
    to set up a bio by itself with a completion callback to move the asynchronous
    state machine ahead. So drop the BLKDEV_IFL_WAIT flag that is always
    specified when calling blkdev_issue_* and also remove the now unused flags
    argument to blkdev_issue_flush and blkdev_issue_zeroout. For
    blkdev_issue_discard we need to keep it for the secure discard flag, which
    gains a more descriptive name and loses the bitops vs flag confusion.

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

    Christoph Hellwig
     

10 Sep, 2010

1 commit

  • As part of adding support for OCFS2 to mount huge volumes, we need to
    check that the sector_t and page cache of the system are capable of
    addressing the entire volume.

    An identical check already appears in ext3 and ext4. This patch moves
    the addressability check into its own function in fs/libfs.c and
    modifies ext3 and ext4 to invoke it.

    [Edited to -EINVAL instead of BUG_ON() for bad blocksize_bits -- Joel]

    Signed-off-by: Patrick LoPresti
    Cc: linux-ext4@vger.kernel.org
    Acked-by: Andreas Dilger
    Signed-off-by: Joel Becker

    Patrick J. LoPresti
     

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

5 commits

  • The mbcache code was written to support a variable number of indexes,
    but all the existing users use exactly one index. Simplify to code to
    support only that case.

    There are also no users of the cache entry free operation, and none of
    the users keep extra data in cache entries. Remove those features as
    well.

    Signed-off-by: Andreas Gruenbacher
    Signed-off-by: Al Viro

    Andreas Gruenbacher
     
  • 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
     
  • Split up the block_write_begin implementation - __block_write_begin is a new
    trivial wrapper for block_prepare_write that always takes an already
    allocated page and can be either called from block_write_begin or filesystem
    code that already has a page allocated. Remove the handling of already
    allocated pages from block_write_begin after switching all callers that
    do it to __block_write_begin.

    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 prepearation of the new truncate calling sequence. This was only done
    for DIO_LOCKING filesystems, so the __blockdev_direct_IO_newtrunc variant
    was not needed anyway. Get rid of blockdev_direct_IO_no_locking and
    its _newtrunc variant while at it as just opencoding the two additional
    paramters is shorted than the name suffix.

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

    Christoph Hellwig
     

06 Aug, 2010

1 commit

  • In data=journal mode, we still use block_write_begin() to prepare page for
    writing. This function can occasionally mark buffer dirty which violates
    journalling assumptions - when a buffer is part of a transaction, it should be
    dirty and a buffer can be already part of a forget list of some transaction
    when block_write_begin() gets called. This violation of journalling assumptions
    then results in "JBD: Spotted dirty metadata buffer..." warnings.

    In fact, temporary dirtying the buffer while the page is still locked does not
    really cause problems to the journalling because we won't write the buffer
    until the page gets unlocked. So we just have to make sure to clear dirty bits
    before unlocking the page.

    Reviewed-by: "Theodore Ts'o"
    Signed-off-by: Jan Kara

    Jan Kara
     

23 Jul, 2010

1 commit

  • data=writeback mode is dangerous as it leads to higher data loss and stale data
    exposure when systems crash. It should not be the default, especially when all
    major distros ensure their ext3 filesystems default to ordered mode. Change the
    default mode to the safer data=ordered mode, because we should be caring far
    more about avoiding stale data exposure than performance.

    CC: linux-ext4@vger.kernel.org
    Signed-off-by: Dave Chinner
    Acked-by: Eric Sandeen
    Signed-off-by: Jan Kara

    Dave Chinner
     

21 Jul, 2010

3 commits

  • It can happen that ext3_free_branches calls ext3_forget() for an indirect block
    in an earlier transaction than a transaction in which we clear pointer to this
    indirect block. Thus if we crash before a transaction clearing the block
    pointer is committed, we will see indirect block pointing to already freed
    blocks and complain during orphan list cleanup.

    The fix is simple: Make sure ext3_forget() is called in the transaction
    doing block pointer clearing.

    This is a backport of an ext4 fix by Amir G.

    Signed-off-by: Jan Kara

    Jan Kara
     
  • The nobh option was only supported for writeback mode, but given that all
    write paths (except mmapped writed) actually create buffer heads, it
    effectively was a no-op already.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Jan Kara

    Christoph Hellwig
     
  • [tytso@mit.edu: Fix compilation with CONFIG_JBD_DEBUG enabled]

    Acked-by: tytso@mit.edu
    cc: linux-ext4@vger.kernel.org
    Signed-off-by: Andi Kleen
    Signed-off-by: Jan Kara

    Andi Kleen
     

25 Jun, 2010

1 commit


31 May, 2010

1 commit

  • * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6:
    quota: Convert quota statistics to generic percpu_counter
    ext3 uses rb_node = NULL; to zero rb_root.
    quota: Fixup dquot_transfer
    reiserfs: Fix resuming of quotas on remount read-write
    pohmelfs: Remove dead quota code
    ufs: Remove dead quota code
    udf: Remove dead quota code
    quota: rename default quotactl methods to dquot_
    quota: explicitly set ->dq_op and ->s_qcop
    quota: drop remount argument to ->quota_on and ->quota_off
    quota: move unmount handling into the filesystem
    quota: kill the vfs_dq_off and vfs_dq_quota_on_remount wrappers
    quota: move remount handling into the filesystem
    ocfs2: Fix use after free on remount read-only

    Fix up conflicts in fs/ext4/super.c and fs/ufs/file.c

    Linus Torvalds
     

28 May, 2010

1 commit


27 May, 2010

1 commit

  • The problem with this is that 17d9ddc72fb8bba0d4f678 ("rbtree: Add support
    for augmented rbtrees") in the linux-next tree adds a new field to that
    struct which needs to be NULLas well. This patch uses RB_ROOT as the
    intializer so all of the relevant fields will be NULL'd.

    Signed-off-by: Venkatesh Pallipadi
    Cc: Eric Paris
    Cc: Jan Kara
    Signed-off-by: Andrew Morton
    Signed-off-by: Jan Kara

    Venkatesh Pallipadi
     

24 May, 2010

5 commits

  • Follow the dquot_* style used elsewhere in dquot.c.

    [Jan Kara: Fixed up missing conversion of ext2]

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Jan Kara

    Christoph Hellwig
     
  • Remount handling has fully moved into the filesystem, so all this is
    superflous now.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Jan Kara

    Christoph Hellwig
     
  • Currently the VFS calls into the quotactl interface for unmounting
    filesystems. This means filesystems with their own quota handling
    can't easily distinguish between user-space originating quotaoff
    and an unount. Instead move the responsibily of the unmount handling
    into the filesystem to be consistent with all other dquot handling.

    Note that we do call dquot_disable a lot later now, e.g. after
    a sync_filesystem. But this is fine as the quota code does all its
    writes via blockdev's mapping and that is synced even later.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Jan Kara

    Christoph Hellwig
     
  • Instead of having wrappers in the VFS namespace export the dquot_suspend
    and dquot_resume helpers directly. Also rename vfs_quota_disable to
    dquot_disable while we're at it.

    [Jan Kara: Moved dquot_suspend to quotaops.h and made it inline]

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Jan Kara

    Christoph Hellwig
     
  • Currently do_remount_sb calls into the dquot code to tell it about going
    from rw to ro and ro to rw. Move this code into the filesystem to
    not depend on the dquot code in the VFS - note ocfs2 already ignores
    these calls and handles remount by itself. This gets rid of overloading
    the quotactl calls and allows to unify the VFS and XFS codepaths in
    that area later.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Jan Kara

    Christoph Hellwig