11 Jul, 2013

1 commit

  • Add project quota changes to all the places where group quota field
    is used:
    * add separate project quota members into various structures
    * split project quota and group quotas so that instead of overriding
    the group quota members incore, the new project quota members are
    used instead
    * get rid of usage of the OQUOTA flag incore, in favor of separate
    group and project quota flags.
    * add a project dquot argument to various functions.

    Not using the pquotino field from superblock yet.

    Signed-off-by: Chandra Seetharaman
    Reviewed-by: Ben Myers
    Signed-off-by: Ben Myers

    Chandra Seetharaman
     

10 Jul, 2013

1 commit

  • Macro get_unused_fd() is used to allocate a file descriptor with
    default flags. Those default flags (0) can be "unsafe":
    O_CLOEXEC must be used by default to not leak file descriptor
    across exec().

    Instead of macro get_unused_fd(), functions anon_inode_getfd()
    or get_unused_fd_flags() should be used with flags given by userspace.
    If not possible, flags should be set to O_CLOEXEC to provide userspace
    with a default safe behavor.

    In a further patch, get_unused_fd() will be removed so that
    new code start using anon_inode_getfd() or get_unused_fd_flags()
    with correct flags.

    This patch replaces calls to get_unused_fd() with equivalent call to
    get_unused_fd_flags(0) to preserve current behavor for existing code.

    The hard coded flag value (0) should be reviewed on a per-subsystem basis,
    and, if possible, set to O_CLOEXEC.

    Signed-off-by: Yann Droneaud
    Reviewed-by: Ben Myers
    Signed-off-by: Ben Myers

    Yann Droneaud
     

08 May, 2013

1 commit

  • Shamelessly copied from dchinner's:
    ad650f5b xfs: fallback to vmalloc for large buffers in xfs_attrmulti_attr_get

    xfsdump uses for a large buffer for extended attributes, which has a
    kmalloc'd shadow buffer in the kernel. This can fail after the
    system has been running for some time as it is a high order
    allocation. Add a fallback to vmalloc so that it doesn't require
    contiguous memory and so won't randomly fail while xfsdump is
    running.

    Signed-off-by: Eric Sandeen
    Reviewed-by: Mark Tinguely
    Signed-off-by: Ben Myers

    Eric Sandeen
     

23 Feb, 2013

1 commit


09 Nov, 2012

2 commits


03 Nov, 2012

1 commit

  • Uninitialised variable build warning introduced by 2903ff0 ("switch
    simple cases of fget_light to fdget"), gcc is not smart enough to
    work out that the variable is not used uninitialised, and the commit
    removed the initialisation at declaration that the old variable had.

    Signed-off-by: Dave Chinner
    Reviewed-by: Christoph Hellwig
    Reviewed-by: Mark Tinguely
    Signed-off-by: Ben Myers

    Dave Chinner
     

27 Sep, 2012

2 commits


31 Jul, 2012

1 commit

  • Generic code now blocks all writers from standard write paths. So we add
    blocking of all writers coming from ioctl (we get a protection of ioctl against
    racing remount read-only as a bonus) and convert xfs_file_aio_write() to a
    non-racy freeze protection. We also keep freeze protection on transaction
    start to block internal filesystem writes such as removal of preallocated
    blocks.

    CC: Ben Myers
    CC: Alex Elder
    CC: xfs@oss.sgi.com
    Signed-off-by: Jan Kara
    Signed-off-by: Al Viro

    Jan Kara
     

23 Jul, 2012

1 commit


15 May, 2012

2 commits

  • With the removal of xfs_rw.h and other changes over time, xfs_bit.h
    is being included in many files that don't actually need it. Clean
    up the includes as necessary.

    Also move the only-used-once xfs_ialloc_find_free() static inline
    function out of a header file that is widely included to reduce
    the number of needless dependencies on xfs_bit.h.

    Signed-off-by: Dave Chinner
    Reviewed-by: Mark Tinguely
    Signed-off-by: Ben Myers

    Dave Chinner
     
  • Untangle the header file includes a bit by moving the definition of
    xfs_agino_t to xfs_types.h. This removes the dependency that xfs_ag.h has on
    xfs_inum.h, meaning we don't need to include xfs_inum.h everywhere we include
    xfs_ag.h.

    Signed-off-by: Dave Chinner
    Reviewed-by: Mark Tinguely
    Signed-off-by: Ben Myers

    Dave Chinner
     

23 Mar, 2012

1 commit

  • Sparse identified some unsafe handling of open flags in the xfs open
    by handle ioctl code. Update the code to use the correct access
    macros to ensure that we handle the open flags correctly.

    Signed-off-by: Dave Chinner
    Reviewed-by: Christoph Hellwig
    Reviewed-by: Mark Tinguely
    Signed-off-by: Ben Myers

    Dave Chinner
     

16 Mar, 2012

1 commit

  • xfsdump uses for a large buffer for extended attributes, which has a
    kmalloc'd shadow buffer in the kernel. This can fail after the
    system has been running for some time as it is a high order
    allocation. Add a fallback to vmalloc so that it doesn't require
    contiguous memory and so won't randomly fail while xfsdump is
    running.

    Signed-off-by: Dave Chinner
    Reviewed-by: Christoph Hellwig
    Reviewed-by: Mark Tinguely
    Signed-off-by: Ben Myers

    Dave Chinner
     

04 Jan, 2012

2 commits


12 Oct, 2011

1 commit

  • There is no reason to keep a reference to the inode even if we unlock
    it during transaction commit because we never drop a reference between
    the ijoin and commit. Also use this fact to merge xfs_trans_ijoin_ref
    back into xfs_trans_ijoin - the third argument decides if an unlock
    is needed now.

    I'm actually starting to wonder if allowing inodes to be unlocked
    at transaction commit really is worth the effort. The only real
    benefit is that they can be unlocked earlier when commiting a
    synchronous transactions, but that could be solved by doing the
    log force manually after the unlock, too.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Alex Elder

    Christoph Hellwig
     

13 Aug, 2011

1 commit

  • Use the move from Linux 2.6 to Linux 3.x as an excuse to kill the
    annoying subdirectories in the XFS source code. Besides the large
    amount of file rename the only changes are to the Makefile, a few
    files including headers with the subdirectory prefix, and the binary
    sysctl compat code that includes a header under fs/xfs/ from
    kernel/.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Alex Elder

    Christoph Hellwig