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

8 commits


15 Oct, 2007

5 commits

  • 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
     
  • One of the perpetual scaling problems XFS has is indexing it's incore
    inodes. We currently uses hashes and the default hash sizes chosen can
    only ever be a tradeoff between memory consumption and the maximum
    realistic size of the cache.

    As a result, anyone who has millions of inodes cached on a filesystem
    needs to tunes the size of the cache via the ihashsize mount option to
    allow decent scalability with inode cache operations.

    A further problem is the separate inode cluster hash, whose size is based
    on the ihashsize but is smaller, and so under certain conditions (sparse
    cluster cache population) this can become a limitation long before the
    inode hash is causing issues.

    The following patchset removes the inode hash and cluster hash and
    replaces them with radix trees to avoid the scalability limitations of the
    hashes. It also reduces the size of the inodes by 3 pointers....

    SGI-PV: 969561
    SGI-Modid: xfs-linux-melb:xfs-kern:29481a

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

    David Chinner
     
  • Simplify the readlink code to get rid of the last user of uio.

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

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

    Christoph Hellwig
     
  • Currently xfs has a rather complicated internal scheme to allow for
    different directory formats in IRIX. This patch rips all code related to
    this out and pushes useage of the Linux filldir callback into the lowlevel
    directory code. This does not make the code any less portable because
    filldir can be used to create dirents of all possible variations
    (including the IRIX ones as proved by the IRIX binary emulation code under
    arch/mips/).

    This patch get rid of an unessecary copy in the readdir path, about 400
    lines of code and one of the last two users of the uio structure.

    This version is updated to deal with dmapi aswell which greatly simplifies
    the get_dirattrs code. The dmapi part has been tested using the
    get_dirattrs tools from the xfstest dmapi suite1 with various small and
    large directories.

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

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

    Christoph Hellwig
     
  • SGI-PV: 968690
    SGI-Modid: xfs-linux-melb:xfs-kern:29340a

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Vlad Apostolov
    Signed-off-by: Tim Shimmin

    Christoph Hellwig
     

18 Sep, 2007

1 commit


19 Jul, 2007

2 commits

  • When changing the file size by a truncate() call, we log the change in the
    inode size. However, we do not flush any outstanding data that might not
    have been written to disk, thereby violating the data/inode size update
    order. This can leave files full of NULLs on crash.

    Hence if we are truncating the file, flush any unwritten data that may lie
    between the curret on disk inode size and the new inode size that is being
    logged to ensure that ordering is preserved.

    SGI-PV: 966308
    SGI-Modid: xfs-linux-melb:xfs-kern:29174a

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

    David Chinner
     
  • Make the free file space transaction able to dip into the reserved blocks
    to ensure that we can successfully free blocks when the filesystem is at
    ENOSPC.

    SGI-PV: 967788
    SGI-Modid: xfs-linux-melb:xfs-kern:29167a

    Signed-off-by: David Chinner
    Signed-off-by: Vlad Apostolov
    Signed-off-by: Tim Shimmin

    David Chinner
     

14 Jul, 2007

6 commits

  • SGI-PV: 967035
    SGI-Modid: xfs-linux-melb:xfs-kern:29026a

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

    David Chinner
     
  • In media spaces, video is often stored in a frame-per-file format. When
    dealing with uncompressed realtime HD video streams in this format, it is
    crucial that files do not get fragmented and that multiple files a placed
    contiguously on disk.

    When multiple streams are being ingested and played out at the same time,
    it is critical that the filesystem does not cross the streams and
    interleave them together as this creates seek and readahead cache miss
    latency and prevents both ingest and playout from meeting frame rate
    targets.

    This patch set creates a "stream of files" concept into the allocator to
    place all the data from a single stream contiguously on disk so that RAID
    array readahead can be used effectively. Each additional stream gets
    placed in different allocation groups within the filesystem, thereby
    ensuring that we don't cross any streams. When an AG fills up, we select a
    new AG for the stream that is not in use.

    The core of the functionality is the stream tracking - each inode that we
    create in a directory needs to be associated with the directories' stream.
    Hence every time we create a file, we look up the directories' stream
    object and associate the new file with that object.

    Once we have a stream object for a file, we use the AG that the stream
    object point to for allocations. If we can't allocate in that AG (e.g. it
    is full) we move the entire stream to another AG. Other inodes in the same
    stream are moved to the new AG on their next allocation (i.e. lazy
    update).

    Stream objects are kept in a cache and hold a reference on the inode.
    Hence the inode cannot be reclaimed while there is an outstanding stream
    reference. This means that on unlink we need to remove the stream
    association and we also need to flush all the associations on certain
    events that want to reclaim all unreferenced inodes (e.g. filesystem
    freeze).

    SGI-PV: 964469
    SGI-Modid: xfs-linux-melb:xfs-kern:29096a

    Signed-off-by: David Chinner
    Signed-off-by: Barry Naujok
    Signed-off-by: Donald Douwsma
    Signed-off-by: Christoph Hellwig
    Signed-off-by: Tim Shimmin
    Signed-off-by: Vlad Apostolov

    David Chinner
     
  • A check for file_count is always a bad idea. Linux has the ->release
    method to deal with cleanups on last close and ->flush is only for the
    very rare case where we want to perform an operation on every drop of a
    reference to a file struct.

    This patch gets rid of vop_close and surrounding code in favour of simply
    doing the page flushing from ->release.

    SGI-PV: 966562
    SGI-Modid: xfs-linux-melb:xfs-kern:28952a

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

    Christoph Hellwig
     
  • SGI-PV: 966502
    SGI-Modid: xfs-linux-melb:xfs-kern:28943a

    Signed-off-by: Jesper Juhl
    Signed-off-by: David Chinner
    Signed-off-by: Tim Shimmin

    Jesper Juhl
     
  • SGI-PV: 966004
    SGI-Modid: xfs-linux-melb:xfs-kern:28866a

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

    David Chinner
     
  • If hole punching at EOF is done as two steps (i.e. truncate then extend)
    the file is in a transient state between the two steps where an
    application can see the incorrect file size. Punching a hole to EOF needs
    to be treated in teh same way as all other hole punching cases so that the
    file size is never seen to change.

    SGI-PV: 962012
    SGI-Modid: xfs-linux-melb:xfs-kern:28641a

    Signed-off-by: David Chinner
    Signed-off-by: Vlad Apostolov
    Signed-off-by: Tim Shimmin

    David Chinner
     

10 Jul, 2007

1 commit


08 May, 2007

6 commits

  • SGI-PV: 963965
    SGI-Modid: xfs-linux-melb:xfs-kern:28485a

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

    Lachlan McIlroy
     
  • SGI-PV: 907752
    SGI-Modid: xfs-linux-melb:xfs-kern:28344a

    Signed-off-by: Tim Shimmin
    Signed-off-by: Lachlan McIlroy
    Signed-off-by: Eric Sandeen

    Tim Shimmin
     
  • The problem that has been addressed is that of synchronising updates of
    the file size with writes that extend a file. Without the fix the update
    of a file's size, as a result of a write beyond eof, is independent of
    when the cached data is flushed to disk. Often the file size update would
    be written to the filesystem log before the data is flushed to disk. When
    a system crashes between these two events and the filesystem log is
    replayed on mount the file's size will be set but since the contents never
    made it to disk the file is full of holes. If some of the cached data was
    flushed to disk then it may just be a section of the file at the end that
    has holes.

    There are existing fixes to help alleviate this problem, particularly in
    the case where a file has been truncated, that force cached data to be
    flushed to disk when the file is closed. If the system crashes while the
    file(s) are still open then this flushing will never occur.

    The fix that we have implemented is to introduce a second file size,
    called the in-memory file size, that represents the current file size as
    viewed by the user. The existing file size, called the on-disk file size,
    is the one that get's written to the filesystem log and we only update it
    when it is safe to do so. When we write to a file beyond eof we only
    update the in- memory file size in the write operation. Later when the I/O
    operation, that flushes the cached data to disk completes, an I/O
    completion routine will update the on-disk file size. The on-disk file
    size will be updated to the maximum offset of the I/O or to the value of
    the in-memory file size if the I/O includes eof.

    SGI-PV: 958522
    SGI-Modid: xfs-linux-melb:xfs-kern:28322a

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

    Lachlan McIlroy
     
  • This patch handles error return values in fs_flush_pages and
    fs_flushinval_pages. It changes the prototype of fs_flushinval_pages so we
    can propogate the errors and handle them at higher layers. I also modified
    xfs_itruncate_start so that it could propogate the error further.

    SGI-PV: 961990
    SGI-Modid: xfs-linux-melb:xfs-kern:28231a

    Signed-off-by: Lachlan McIlroy
    Signed-off-by: Stewart Smith
    Signed-off-by: Tim Shimmin

    Lachlan McIlroy
     
  • Patch provided by Eric Sandeen.

    SGI-PV: 961695
    SGI-Modid: xfs-linux-melb:xfs-kern:28205a

    Signed-off-by: Eric Sandeen
    Signed-off-by: Lachlan McIlroy
    Signed-off-by: Tim Shimmin

    Eric Sandeen
     
  • NULL.

    Patch provided by Eric Sandeen.

    SGI-PV: 961693
    SGI-Modid: xfs-linux-melb:xfs-kern:28199a

    Signed-off-by: Eric Sandeen
    Signed-off-by: Lachlan McIlroy
    Signed-off-by: Tim Shimmin

    Eric Sandeen
     

10 Feb, 2007

2 commits

  • xfs_mac.h and xfs_cap.h provide definitions and macros that aren't used
    anywhere in XFS at all. They are left-overs from "to be implement at some
    point in the future" functionality that Irix XFS has. If this
    functionality ever goes into Linux, it will be provided at a different
    layer, most likely through the security hooks in the kernel so we will
    never need this functionality in XFS.

    Patch provided by Eric Sandeen (sandeen@sandeen.net).

    SGI-PV: 960895
    SGI-Modid: xfs-linux-melb:xfs-kern:28036a

    Signed-off-by: Eric Sandeen
    Signed-off-by: David Chinner
    Signed-off-by: Tim Shimmin

    Eric Sandeen
     
  • The firstblock argument to xfs_bmap_finish is not used by that function.
    Remove it and cleanup the code a bit.

    Patch provided by Eric Sandeen.

    SGI-PV: 960196
    SGI-Modid: xfs-linux-melb:xfs-kern:28034a

    Signed-off-by: Eric Sandeen
    Signed-off-by: David Chinner
    Signed-off-by: Tim Shimmin

    Eric Sandeen
     

11 Nov, 2006

3 commits

  • The previous fixes for the use after free in xfs_iunpin left a nasty log
    deadlock when xfslogd unpinned the inode and dropped the last reference to
    the inode. the ->clear_inode() method can issue transactions, and if the
    log was full, the transaction could push on the log and get stuck trying
    to push the inode it was currently unpinning.

    To fix this, we provide xfs_iunpin a guarantee that it will always have a
    valid xfs_inode linux inode link or a particular flag will be set on
    the inode. We then use log forces during lookup to ensure transactions are
    completed before we recycle the inode. This ensures that xfs_iunpin will
    never use the linux inode after it is being freed, and any lookup on an
    inode on the reclaim list will wait until it is safe to attach a new linux
    inode to the xfs inode.

    SGI-PV: 956832
    SGI-Modid: xfs-linux-melb:xfs-kern:27359a

    Signed-off-by: David Chinner
    Signed-off-by: Shailendra Tripathi
    Signed-off-by: Takenori Nagano
    Signed-off-by: Tim Shimmin

    David Chinner
     
  • SGI-PV: 956832
    SGI-Modid: xfs-linux-melb:xfs-kern:27358a

    Signed-off-by: David Chinner
    Signed-off-by: Nathan Scott
    Signed-off-by: Tim Shimmin

    David Chinner
     
  • SGI-PV: 957004
    SGI-Modid: xfs-linux-melb:xfs-kern:27231a

    Signed-off-by: Vlad Apostolov
    Signed-off-by: Tim Shimmin

    Vlad Apostolov
     

28 Sep, 2006

3 commits


27 Jun, 2006

1 commit


20 Jun, 2006

1 commit