04 Jan, 2012

1 commit


08 Jul, 2011

1 commit

  • Split up xfs_setattr into two functions, one for the complex truncate
    handling, and one for the trivial attribute updates. Also move both
    new routines to xfs_iops.c as they are fairly Linux-specific.

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

    Christoph Hellwig
     

26 Mar, 2011

1 commit

  • Preallocation and hole punch transactions are currently synchronous
    and this is causing performance problems in some cases. The
    transactions don't need to be synchronous as we don't need to
    guarantee the preallocation is persistent on disk until a
    fdatasync, fsync, sync operation occurs. If the file is opened
    O_SYNC or O_DATASYNC, only then should the transaction be issued
    synchronously.

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

    Dave Chinner
     

19 Oct, 2010

1 commit

  • We're not actually passing around credentials inside XFS for a while
    now, so remove all xfs_cred.h with it's cred_t typedef and all
    instances of it.

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

    Christoph Hellwig
     

02 Mar, 2010

3 commits

  • Move the two declarations to better fitting headers now that
    xfs_lrw.c is gone.

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

    Christoph Hellwig
     
  • Currently the fsync file operation is divided into a low-level
    routine doing all the work and one that implements the Linux file
    operation and does minimal argument wrapping. This is a leftover
    from the days of the vnode operations layer and can be removed to
    simplify the code a bit, as well as preparing for the implementation
    of an optimized fdatasync which needs to look at the Linux inode
    state.

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

    Christoph Hellwig
     
  • Currently the code to implement the file operations is split over
    two small files. Merge the content of xfs_lrw.c into xfs_file.c to
    have it in one place. Note that I haven't done various cleanups
    that are possible after this yet, they will follow in the next
    patch. Also the function xfs_dev_is_read_only which was in
    xfs_lrw.c before really doesn't fit in here at all and was moved to
    xfs_mount.c.

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

    Christoph Hellwig
     

20 Jan, 2010

1 commit

  • To be consistent with the directory code, the attr code should use
    unsigned names. Convert the names from the vfs at the highest level
    to unsigned, and ænsure they are consistenly used as unsigned down
    to disk.

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

    Dave Chinner
     

12 Dec, 2009

1 commit

  • Currently the reclaim code for the case where we don't reclaim the
    final reclaim is overly complicated. We know that the inode is clean
    but instead of just directly reclaiming the clean inode we go through
    the whole process of marking the inode reclaimable just to directly
    reclaim it from the calling context. Besides being overly complicated
    this introduces a race where iget could recycle an inode between
    marked reclaimable and actually being reclaimed leading to panics.

    This patch gets rid of the existing reclaim path, and replaces it with
    a simple call to xfs_ireclaim if the inode was clean. While we're at
    it we also use the slightly more lax xfs_inode_clean check we'd use
    later to determine if we need to flush the inode here.

    Finally get rid of xfs_reclaim function and place the remaining small
    bits of reclaim code directly into xfs_fs_destroy_inode.

    Signed-off-by: Christoph Hellwig
    Reported-by: Patrick Schreurs
    Reported-by: Tommy van Leeuwen
    Tested-by: Patrick Schreurs
    Reviewed-by: Alex Elder
    Signed-off-by: Alex Elder

    Christoph Hellwig
     

10 Jun, 2009

1 commit

  • This patch rips out the XFS ACL handling code and uses the generic
    fs/posix_acl.c code instead. The ondisk format is of course left
    unchanged.

    This also introduces the same ACL caching all other Linux filesystems do
    by adding pointers to the acl and default acl in struct xfs_inode.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Eric Sandeen

    Christoph Hellwig
     

09 Feb, 2009

1 commit


04 Feb, 2009

1 commit


29 Dec, 2008

1 commit

  • Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6

    Conflicts:

    fs/xfs/linux-2.6/xfs_cred.h
    fs/xfs/linux-2.6/xfs_globals.h
    fs/xfs/linux-2.6/xfs_ioctl.c
    fs/xfs/xfs_vnodeops.h

    Signed-off-by: Lachlan McIlroy

    Lachlan McIlroy
     

11 Dec, 2008

1 commit

  • XFS has a mode called invisble I/O that doesn't update any of the
    timestamps. It's used for HSM-style applications and exposed through
    the nasty open by handle ioctl.

    Instead of doing directly assignment of file operations that set an
    internal flag for it add a new FMODE_NOCMTIME flag that we can check
    in the normal file operations.

    (addition of the generic VFS flag has been ACKed by Al as an interims
    solution)

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Lachlan McIlroy

    Christoph Hellwig
     

01 Dec, 2008

2 commits

  • XFS gets the sign of the error wrong in several places when
    gathering the error from generic linux functions. These functions
    return negative error values, while the core XFS code returns
    positive error values. Hence when XFS inverts the error to be
    returned to the VFS, it can incorrectly invert a negative
    error and this error will be ignored by the syscall return.

    Fix all the problems related to calling filemap_* functions.

    Problem initially identified by Nick Piggin in xfs_fsync().

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

    Dave Chinner
     
  • Currently there's no ->open method set for directories on XFS. That
    means we don't perform any check for opening too large directories
    without O_LARGEFILE, we don't check for shut down filesystems, and we
    don't actually do the readahead for the first block in the directory.

    Instead of just setting the directories open routine to xfs_file_open
    we merge the shutdown check directly into xfs_file_open and create
    a new xfs_dir_open that first calls xfs_file_open and then performs
    the readahead for block 0.

    (First sent on September 29th)

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

    Christoph Hellwig
     

14 Nov, 2008

1 commit

  • Separate the task security context from task_struct. At this point, the
    security data is temporarily embedded in the task_struct with two pointers
    pointing to it.

    Note that the Alpha arch is altered as it refers to (E)UID and (E)GID in
    entry.S via asm-offsets.

    With comment fixes Signed-off-by: Marc Dionne

    Signed-off-by: David Howells
    Acked-by: James Morris
    Acked-by: Serge Hallyn
    Signed-off-by: James Morris

    David Howells
     

30 Oct, 2008

1 commit

  • capable_cred has been unused for a while so we can kill it and sys_cred.
    That also means the cred argument to xfs_setattr and xfs_change_file_space
    can be removed now.

    SGI-PV: 988918

    SGI-Modid: xfs-linux-melb:xfs-kern:32412a

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Tim Shimmin
    Signed-off-by: David Chinner
    Signed-off-by: Lachlan McIlroy

    Christoph Hellwig
     

28 Jul, 2008

3 commits

  • it can be switched to take struct iattr directly and thus simplify the
    implementation greatly. Also rename the ATTR_ flags to XFS_ATTR_ to not
    conflict with the ATTR_ flags used by the VFS.

    SGI-PV: 984565

    SGI-Modid: xfs-linux-melb:xfs-kern:31678a

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Tim Shimmin
    Signed-off-by: Lachlan McIlroy

    Christoph Hellwig
     
  • xfs_remove and xfs_rmdir are almost the same with a little more work
    performed in xfs_rmdir due to the . and .. entries. This patch merges
    xfs_rmdir into xfs_remove and performs these actions conditionally.

    Also clean up the error handling which was a nightmare in both versions
    before.

    SGI-PV: 981498

    SGI-Modid: xfs-linux-melb:xfs-kern:31335a

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Barry Naujok
    Signed-off-by: Lachlan McIlroy

    Christoph Hellwig
     
  • This implements the code to store the actual filename found during a
    lookup in the dentry cache and to avoid multiple entries in the dcache
    pointing to the same inode.

    To avoid polluting the dcache, we implement a new directory inode
    operations for lookup. xfs_vn_ci_lookup() stores the correct case name in
    the dcache.

    The "actual name" is only allocated and returned for a case- insensitive
    match and not an actual match.

    Another unusual interaction with the dcache is not storing negative
    dentries like other filesystems doing a d_add(dentry, NULL) when an ENOENT
    is returned. During the VFS lookup, if a dentry returned has no inode,
    dput is called and ENOENT is returned. By not doing a d_add, this actually
    removes it completely from the dcache to be reused. create/rename have to
    be modified to support unhashed dentries being passed in.

    SGI-PV: 981521
    SGI-Modid: xfs-linux-melb:xfs-kern:31208a

    Signed-off-by: Barry Naujok
    Signed-off-by: Christoph Hellwig

    Barry Naujok
     

23 May, 2008

1 commit

  • xfs_fsync() fails to wait for data I/O completion before checking if the
    inode is dirty or clean to decide whether to log the inode or not. This
    misses inode size updates when the data flushed by the fsync() is
    extending the file.

    Hence, like fdatasync(), we need to wait for I/o completion first, then
    check the inode for cleanliness. Doing so makes the behaviour of
    xfs_fsync() identical for fsync and fdatasync and we *always* use
    synchronous semantics if the inode is dirty. Therefore also kill the
    differences and remove the unused flags from the xfs_fsync function and
    callers.

    SGI-PV: 981296
    SGI-Modid: xfs-linux-melb:xfs-kern:31033a

    Signed-off-by: David Chinner
    Signed-off-by: Christoph Hellwig
    Signed-off-by: Lachlan McIlroy

    David Chinner
     

29 Apr, 2008

4 commits

  • Remove the last sendfile leftovers in mainline. This code is already
    gone in CVS.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Lachlan McIlroy

    Christoph Hellwig
     
  • SGI-PV: 976035
    SGI-Modid: xfs-linux-melb:xfs-kern:30913a

    Signed-off-by: Barry Naujok
    Signed-off-by: Christoph Hellwig
    Signed-off-by: Lachlan McIlroy

    Barry Naujok
     
  • ->rename already gets the target inode passed if it exits. Pass it down to
    xfs_rename so that we can avoid looking it up again. Also simplify locking
    as the first lock section in xfs_rename can go away now: the isdir is an
    invariant over the lifetime of the inode, and new_parent and the nlink
    check are namespace topology protected by i_mutex in the VFS. The projid
    check needs to move into the second lock section anyway to not be racy.

    Also kill the now unused xfs_dir_lookup_int and remove the now-unused
    first_locked argumet to xfs_lock_inodes.

    SGI-PV: 976035
    SGI-Modid: xfs-linux-melb:xfs-kern:30903a

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Lachlan McIlroy

    Christoph Hellwig
     
  • It's currently used by the ACL code to read di_mode/di_uid, but these are
    simple 32bit scalar values we can just read directly without locking.

    SGI-PV: 976035
    SGI-Modid: xfs-linux-melb:xfs-kern:30897a

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Lachlan McIlroy

    Christoph Hellwig
     

18 Apr, 2008

6 commits


07 Feb, 2008

2 commits

  • Now that all direct caller of xfs_iaccess are gone we can kill xfs_iaccess
    and xfs_access and just use generic_permission with a check_acl callback.
    This is required for the per-mount read-only patchset in -mm to work
    properly with XFS.

    SGI-PV: 971186
    SGI-Modid: xfs-linux-melb:xfs-kern:30370a

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Lachlan McIlroy

    Christoph Hellwig
     
  • - merge xfs_fid2 into it's only caller xfs_dm_inode_to_fh.
    - remove xfs_vget and opencode it in the two callers, simplifying
    both of them by avoiding the awkward calling convetion.
    - assign directly to the dm_fid_t members in various places in the
    dmapi code instead of casting them to xfs_fid_t first (which
    is identical to dm_fid_t)

    SGI-PV: 974747
    SGI-Modid: xfs-linux-melb:xfs-kern:30258a

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Vlad Apostolov
    Signed-off-by: Lachlan McIlroy

    Christoph Hellwig
     

19 Oct, 2007

1 commit

  • Currently XFs has three different fid types: struct fid, struct xfs_fid
    and struct xfs_fid2 with hte latter two beeing identicaly and the first
    one beeing the same size but an unstructured array with the same size.

    This patch consolidates all this to alway uuse struct xfs_fid.

    This patch is required for an upcoming patch series from me that revamps
    the nfs exporting code and introduces a Linux-wide struct fid.

    SGI-PV: 970336
    SGI-Modid: xfs-linux-melb:xfs-kern:29651a

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Lachlan McIlroy
    Signed-off-by: Tim Shimmin

    Christoph Hellwig
     

16 Oct, 2007

1 commit

  • Simplify the prototype for xfs_create/xfs_mkdir/xfs_symlink by not passing
    down a bhv_vattr_t that just hogs stack space. Instead pass down the mode
    in a mode_t and in case of xfs_create the rdev as a scalar type as well.

    SGI-PV: 968563
    SGI-Modid: xfs-linux-melb:xfs-kern:29794a

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Lachlan McIlroy
    Signed-off-by: Tim Shimmin

    Christoph Hellwig
     

15 Oct, 2007

1 commit

  • All vnode ops now take struct xfs_inode pointers and the behaviour related
    glue is split out into methods of it's own. This required fixing
    xfs_create/mkdir/symlink to not mess with the inode pointer but rather use
    a separate boolean for error handling. Thanks to Dave Chinner for that
    fix.

    SGI-PV: 969608
    SGI-Modid: xfs-linux-melb:xfs-kern:29492a

    Signed-off-by: Christoph Hellwig
    Signed-off-by: David Chinner
    Signed-off-by: Tim Shimmin

    Christoph Hellwig