11 Jan, 2012

1 commit


09 Jan, 2012

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-3.0-nmw:
    GFS2: local functions should be static
    GFS2: We only need one ACL getting function
    GFS2: Fix multi-block allocation
    GFS2: decouple quota allocations from block allocations
    GFS2: split function rgblk_search
    GFS2: Fix up "off by one" in the previous patch
    GFS2: move toward a generic multi-block allocator
    GFS2: O_(D)SYNC support for fallocate
    GFS2: remove vestigial al_alloced
    GFS2: combine gfs2_alloc_block and gfs2_alloc_di
    GFS2: Add non-try locks back to get_local_rgrp
    GFS2: f_ra is always valid in dir readahead function
    GFS2: Fix very unlikley memory leak in ACL xattr code
    GFS2: More automated code analysis fixes
    GFS2: Add readahead to sequential directory traversal
    GFS2: Fix up REQ flags

    Linus Torvalds
     

04 Jan, 2012

4 commits


06 Dec, 2011

1 commit


22 Nov, 2011

2 commits

  • Clean up gfs2_alloc_blocks so that it takes the full extent length
    rather than just the number of non-inode blocks as an argument. That
    will only make a difference in the inode allocation case for now.

    Also, this fixes the extent length handling around gfs2_alloc_extent() so
    that multi block allocations will work again.

    The rd_last_alloc block is set to the final block in the allocated
    extent (as per the update to i_goal, but referenced to a different
    start point).

    This also removes the dinode argument to rgblk_search() which is no
    longer used.

    Signed-off-by: Steven Whitehouse

    Steven Whitehouse
     
  • This patch separates the code pertaining to allocations into two
    parts: quota-related information and block reservations.
    This patch also moves all the block reservation structure allocations to
    function gfs2_inplace_reserve to simplify the code, and moves
    the frees to function gfs2_inplace_release.

    Signed-off-by: Bob Peterson
    Signed-off-by: Steven Whitehouse

    Bob Peterson
     

21 Nov, 2011

1 commit

  • This patch is a revision of the one I previously posted.
    I tried to integrate all the suggestions Steve gave.
    The purpose of the patch is to change function gfs2_alloc_block
    (allocate either a dinode block or an extent of data blocks)
    to a more generic gfs2_alloc_blocks function that can
    allocate both a dinode _and_ an extent of data blocks in the
    same call. This will ultimately help us create a multi-block
    reservation scheme to reduce file fragmentation.

    This patch moves more toward a generic multi-block allocator that
    takes a pointer to the number of data blocks to allocate, plus whether
    or not to allocate a dinode. In theory, it could be called to allocate
    (1) a single dinode block, (2) a group of one or more data blocks, or
    (3) a dinode plus several data blocks.

    Signed-off-by: Bob Peterson
    Signed-off-by: Steven Whitehouse

    Bob Peterson
     

15 Nov, 2011

1 commit

  • GFS2 functions gfs2_alloc_block and gfs2_alloc_di do basically
    the same things, with a few exceptions. This patch combines
    the two functions into a slightly more generic gfs2_alloc_block.
    Having one centralized block allocation function will reduce
    code redundancy and make it easier to implement multi-block
    reservations to reduce file fragmentation in the future.

    Signed-off-by: Bob Peterson
    Signed-off-by: Steven Whitehouse

    Bob Peterson
     

08 Nov, 2011

1 commit


29 Oct, 2011

1 commit

  • * http://sucs.org/~rohan/git/gfs2-3.0-nmw: (24 commits)
    GFS2: Move readahead of metadata during deallocation into its own function
    GFS2: Remove two unused variables
    GFS2: Misc fixes
    GFS2: rewrite fallocate code to write blocks directly
    GFS2: speed up delete/unlink performance for large files
    GFS2: Fix off-by-one in gfs2_blk2rgrpd
    GFS2: Clean up ->page_mkwrite
    GFS2: Correctly set goal block after allocation
    GFS2: Fix AIL flush issue during fsync
    GFS2: Use cached rgrp in gfs2_rlist_add()
    GFS2: Call do_strip() directly from recursive_scan()
    GFS2: Remove obsolete assert
    GFS2: Cache the most recently used resource group in the inode
    GFS2: Make resource groups "append only" during life of fs
    GFS2: Use rbtree for resource groups and clean up bitmap buffer ref count scheme
    GFS2: Fix lseek after SEEK_DATA, SEEK_HOLE have been added
    GFS2: Clean up gfs2_create
    GFS2: Use ->dirty_inode()
    GFS2: Fix bug trap and journaled data fsync
    GFS2: Fix inode allocation error path
    ...

    Linus Torvalds
     

21 Oct, 2011

5 commits

  • This means that after the initial allocation for any inode, the
    last used resource group is cached in the inode for future use.
    This drastically reduces the number of lookups of resource
    groups in the common case, and this the contention on that
    data structure.

    The allocation algorithm is the same as previously, except that we
    always check to see if the goal block is within the cached rgrp
    first before going to the rbtree to look one up.

    Signed-off-by: Steven Whitehouse

    Steven Whitehouse
     
  • Since we have ruled out supporting online filesystem shrink,
    it is possible to make the resource group list append only
    during the life of a super block. This gives several benefits:

    Firstly, we only need to read new rindex elements as they are added
    rather than needing to reread the whole rindex file each time one
    element is added.

    Secondly, the rindex glock can be held for much shorter periods of
    time, and is completely removed from the fast path for allocations.
    The lock is taken in shared mode only when updating the resource
    groups when the first allocation occurs, and after a grow has
    taken place.

    Thirdly, this results in a reduction in code size, and everything
    gets a lot simpler to understand in this area.

    Signed-off-by: Steven Whitehouse

    Steven Whitehouse
     
  • If we pass through knowledge of whether the creation is intended to be
    exclusive or not, then we can deal with that in gfs2_create_inode
    and remove one set of locking. Also this removes the loop in
    gfs2_create and simplifies the code a bit.

    Signed-off-by: Steven Whitehouse

    Steven Whitehouse
     
  • The aim of this patch is to use the newly enhanced ->dirty_inode()
    super block operation to deal with atime updates, rather than
    piggy backing that code into ->write_inode() as is currently
    done.

    The net result is a simplification of the code in various places
    and a reduction of the number of gfs2_dinode_out() calls since
    this is now implied by ->dirty_inode().

    Some of the mark_inode_dirty() calls have been moved under glocks
    in order to take advantage of then being able to avoid locking in
    ->dirty_inode() when we already have suitable locks.

    One consequence is that generic_write_end() now correctly deals
    with file size updates, so that we do not need a separate check
    for that afterwards. This also, indirectly, means that fdatasync
    should work correctly on GFS2 - the current code always syncs the
    metadata whether it needs to or not.

    Has survived testing with postmark (with and without atime) and
    also fsx.

    Signed-off-by: Steven Whitehouse

    Steven Whitehouse
     
  • If we have got far enough through the inode allocation code
    path that an inode has already been allocated, then we must
    call iput to dispose of it, if an error occurs during a
    later part of the process. This will always be the final iput
    since there will be no other references to the inode.

    Unlike when the inode has been unlinked, its block state will
    be GFS2_BLKST_INODE rather than GFS2_BLKST_UNLINKED so we need
    to skip the test in ->evict_inode() for this one case in order
    to ensure that it will be deallocated correctly. This patch adds
    a new flag in order to ensure that this will happen correctly.

    Signed-off-by: Steven Whitehouse

    Steven Whitehouse
     

09 Aug, 2011

1 commit


26 Jul, 2011

1 commit

  • Replace the ->check_acl method with a ->get_acl method that simply reads an
    ACL from disk after having a cache miss. This means we can replace the ACL
    checking boilerplate code with a single implementation in namei.c.

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

    Christoph Hellwig
     

21 Jul, 2011

1 commit


20 Jul, 2011

3 commits


19 Jul, 2011

1 commit

  • This patch changes the security_inode_init_security API by adding a
    filesystem specific callback to write security extended attributes.
    This change is in preparation for supporting the initialization of
    multiple LSM xattrs and the EVM xattr. Initially the callback function
    walks an array of xattrs, writing each xattr separately, but could be
    optimized to write multiple xattrs at once.

    For existing security_inode_init_security() calls, which have not yet
    been converted to use the new callback function, such as those in
    reiserfs and ocfs2, this patch defines security_old_inode_init_security().

    Signed-off-by: Mimi Zohar

    Mimi Zohar
     

13 May, 2011

3 commits


10 May, 2011

2 commits


09 May, 2011

5 commits


05 May, 2011

1 commit

  • To avoid any possible races relating to the link count, we need to
    recheck it under the inode's glock in all cases where it matters.
    Also to ensure we never get any nasty surprises, this patch also
    ensures that once the link count has hit zero it can never be
    elevated by rereading in data from disk.

    The only place we cannot provide a proper solution is in rename
    in the case where we are removing a target inode and we discover
    that the target inode has been already unlinked on another node.
    The race window is very small, and we return EAGAIN in this case
    to indicate what has happened. The proper solution would be to move
    the lookup parts of rename from the vfs into library calls which
    the fs could call directly, but that is potentially a very big job
    and this fix should cover most cases for now.

    Signed-off-by: Steven Whitehouse

    Steven Whitehouse
     

20 Apr, 2011

2 commits

  • This patch adds writeback_control to writing back the AIL
    list. This means that we can then take advantage of the
    information we get in ->write_inode() in order to set off
    some pre-emptive writeback.

    In addition, the AIL code is cleaned up a bit to make it
    a bit simpler to understand.

    There is still more which can usefully be done in this area,
    but this is a good start at least.

    Signed-off-by: Steven Whitehouse

    Steven Whitehouse
     
  • The GLF_LRU flag introduced in the previous patch can be
    used to check if a glock is on the lru list when a new
    holder is queued and if so remove it, without having first
    to get the lru_lock.

    The main purpose of this patch however is to optimise the
    glocks left over when an inode at end of life is being
    evicted. Previously such glocks were left with the GLF_LFLUSH
    flag set, so that when reclaimed, each one required a log flush.
    This patch resets the GLF_LFLUSH flag when there is nothing
    left to flush thus preventing later log flushes as glocks are
    reused or demoted.

    In order to do this, we need to keep track of the number of
    revokes which are outstanding, and also to clear the GLF_LFLUSH
    bit after a log commit when only revokes have been processed.

    Signed-off-by: Steven Whitehouse

    Steven Whitehouse
     

18 Apr, 2011

1 commit

  • This patch fixes a deadlock in GFS2 where two processes are trying
    to reclaim an unlinked dinode:
    One holds the inode glock and calls gfs2_lookup_by_inum trying to look
    up the inode, which it can't, due to I_FREEING. The other has set
    I_FREEING from vfs and is at the beginning of gfs2_delete_inode
    waiting for the glock, which is held by the first. The solution is to
    add a new non_block parameter to the gfs2_iget function that causes it
    to return -ENOENT if the inode is being freed.

    Signed-off-by: Bob Peterson
    Signed-off-by: Steven Whitehouse

    Bob Peterson
     

08 Mar, 2011

1 commit