16 Nov, 2012

3 commits

  • To separate the verifiers from iodone functions and associate read
    and write verifiers at the same time, introduce a buffer verifier
    operations structure to the xfs_buf.

    This avoids the need for assigning the write verifier, clearing the
    iodone function and re-running ioend processing in the read
    verifier, and gets rid of the nasty "b_pre_io" name for the write
    verifier function pointer. If we ever need to, it will also be
    easier to add further content specific callbacks to a buffer with an
    ops structure in place.

    We also avoid needing to export verifier functions, instead we
    can simply export the ops structures for those that are needed
    outside the function they are defined in.

    This patch also fixes a directory block readahead verifier issue
    it exposed.

    This patch also adds ops callbacks to the inode/alloc btree blocks
    initialised by growfs. These will need more work before they will
    work with CRCs.

    Signed-off-by: Dave Chinner
    Reviewed-by: Phil White
    Signed-off-by: Ben Myers

    Dave Chinner
     
  • Metadata buffers that are read from disk have write verifiers
    already attached to them, but newly allocated buffers do not. Add
    appropriate write verifiers to all new metadata buffers.

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

    Dave Chinner
     
  • Add an btree block verify callback function and pass it into the
    buffer read functions. Because each different btree block type
    requires different verification, add a function to the ops structure
    that is called from the generic code.

    Also, propagate the verification callback functions through the
    readahead functions, and into the external bmap and bulkstat inode
    readahead code that uses the generic btree buffer read functions.

    Signed-off-by: Dave Chinner
    Reviewed-by: Phil White
    Signed-off-by: Ben Myers

    Dave Chinner
     

16 Jan, 2010

1 commit


17 Dec, 2009

1 commit

  • For a long time we've always stored bmap btree records in the 64bit format,
    so kill off the dead 32bit type, and make sure the 64bit type is named just
    xfs_bmbt_rec everywhere, without any size postfix.

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

    Christoph Hellwig
     

01 Sep, 2009

1 commit


19 Jan, 2009

1 commit


30 Oct, 2008

15 commits

  • Move the XFS_BMAP_SANITY_CHECK macro out of line and make it a properly
    typed function. Also pass the xfs_buf for the btree block instead of just
    the btree block header, as we will need some additional information for it
    to implement CRC checking of btree blocks.

    SGI-PV: 988146

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

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

    Christoph Hellwig
     
  • structures.

    Always use the generic xfs_btree_block type instead of the short / long
    structures. Add XFS_BTREE_SBLOCK_LEN / XFS_BTREE_LBLOCK_LEN defines for
    the length of a short / long form block. The rationale for this is that we
    will grow more btree block header variants to support CRCs and other RAS
    information, and always accessing them through the same datatype with
    unions for the short / long form pointers makes implementing this much
    easier.

    SGI-PV: 988146

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

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

    Christoph Hellwig
     
  • Replace the generic record / key / ptr addressing macros that use cpp
    token pasting with simpler macros that do the job for just one given btree
    type. The new macros lose the cur argument and thus can be used outside
    the core btree code, but also gain an xfs_mount * argument to allow for
    checking the CRC flag in the near future. Note that many of these macros
    aren't actually used in the kernel code, but only in userspace (mostly in
    xfs_repair).

    SGI-PV: 988146

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

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

    Christoph Hellwig
     
  • Clean up the way the maximum and minimum records for the btree blocks are
    calculated. For the alloc and inobt btrees all the values are
    pre-calculated in xfs_mount_common, and we switch the current loop around
    the ugly generic macros that use cpp token pasting to generate type names
    to two small helpers in normal C code. For the bmbt and bmdr trees these
    helpers also exist, but can be called during runtime, too. Here we also
    kill various macros dealing with them and inline the logic into the
    get_minrecs / get_maxrecs / get_dmaxrecs methods in xfs_bmap_btree.c.

    Note that all these new helpers take an xfs_mount * argument which will be
    needed to determine the size of a btree block once we add support for
    extended btree blocks with CRCs and other RAS information.

    SGI-PV: 988146

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

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

    Christoph Hellwig
     
  • SGI-PV: 986558

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

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

    Barry Naujok
     
  • These are equivalent to the xfs_btree_* versions, and the only remaining
    caller can be switched to the generic one after they are exported. Also
    remove some now dead infrastructure in xfs_bmap_btree.c.

    SGI-PV: 985583

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

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Lachlan McIlroy
    Signed-off-by: Bill O'Donnell
    Signed-off-by: David Chinner

    Christoph Hellwig
     
  • Make the btree delete code generic. Based on a patch from David Chinner
    with lots of changes to follow the original btree implementations more
    closely. While this loses some of the generic helper routines for
    inserting/moving/removing records it also solves some of the one off bugs
    in the original code and makes it easier to verify.

    SGI-PV: 985583

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

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Lachlan McIlroy
    Signed-off-by: Bill O'Donnell
    Signed-off-by: David Chinner

    Christoph Hellwig
     
  • Make the btree insert code generic. Based on a patch from David Chinner
    with lots of changes to follow the original btree implementations more
    closely. While this loses some of the generic helper routines for
    inserting/moving/removing records it also solves some of the one off bugs
    in the original code and makes it easier to verify.

    SGI-PV: 985583

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

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Lachlan McIlroy
    Signed-off-by: Bill O'Donnell
    Signed-off-by: David Chinner

    Christoph Hellwig
     
  • xfs_bmbt_newroot is a mostly generic implementation of moving from an
    inode root to a real block based root. So move it to xfs_btree.c where it
    can use all the nice infrastructure there and make it pointer size
    agnostic

    The new name for it is xfs_btree_new_iroot, following the old naming but
    making it clear we're dealing with the root in inode case here, and to
    avoid confusion with xfs_btree_new_root which is used for the not inode
    rooted case.

    SGI-PV: 985583

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

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Lachlan McIlroy
    Signed-off-by: Bill O'Donnell
    Signed-off-by: David Chinner

    Christoph Hellwig
     
  • From: Dave Chinner

    The most complicated part here is the lastrec tracking for the alloc
    btree. Most logic is in the update_lastrec method which has to do some
    hopefully good enough dirty magic to maintain it.

    [hch: split out from bigger patch and a rework of the lastrec

    logic]

    SGI-PV: 985583

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

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Lachlan McIlroy
    Signed-off-by: Bill O'Donnell
    Signed-off-by: David Chinner

    Christoph Hellwig
     
  • From: Dave Chinner

    [hch: split out from bigger patch and minor adaptions]

    SGI-PV: 985583

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

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Lachlan McIlroy
    Signed-off-by: Bill O'Donnell
    Signed-off-by: David Chinner

    Christoph Hellwig
     
  • From: Dave Chinner

    [hch: split out from bigger patch and minor adaptions]

    SGI-PV: 985583

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

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Lachlan McIlroy
    Signed-off-by: Bill O'Donnell
    Signed-off-by: David Chinner

    Christoph Hellwig
     
  • From: Dave Chinner

    Because this is the first major generic btree routine this patch includes
    some infrastrucure, first a few routines to deal with a btree block that
    can be either in short or long form, second xfs_btree_read_buf_block,
    which is the new central routine to read a btree block given a cursor, and
    third the new xfs_btree_ptr_addr routine to calculate the address for a
    given btree pointer record.

    [hch: split out from bigger patch and minor adaptions]

    SGI-PV: 985583

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

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Lachlan McIlroy
    Signed-off-by: Bill O'Donnell
    Signed-off-by: David Chinner

    Christoph Hellwig
     
  • Make the existing bmap btree tracing generic so that it applies to all
    btree types.

    Some fragments lifted from a patch by Dave Chinner.

    SGI-PV: 985583

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

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Lachlan McIlroy
    Signed-off-by: Bill O'Donnell
    Signed-off-by: David Chinner

    Christoph Hellwig
     
  • xfs_btree_init_cursor contains close to little shared code for the
    different btrees and will get even more non-common code in the future.
    Split it up into one routine per btree type.

    Because xfs_btree_dup_cursor needs to call the init routine for a generic
    btree cursor add a new btree operation vector that contains a dup_cursor
    method that initializes a new cursor based on an existing one.

    The btree operations vector is based on an idea and code from Dave Chinner
    and will grow more entries later during this series.

    SGI-PV: 985583

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

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Lachlan McIlroy
    Signed-off-by: Bill O'Donnell
    Signed-off-by: David Chinner

    Christoph Hellwig
     

10 Apr, 2008

1 commit


15 Oct, 2007

3 commits

  • SGI-PV: 968563
    SGI-Modid: xfs-linux-melb:xfs-kern:29321a

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

    Christoph Hellwig
     
  • The BMBT_*BITLEN are currently defined in a complicated way depending on
    XFS_NATIVE_HOST. But if all the macros are expanded they (obviously)
    expand to the same value for both cases.

    This patch defines the macros in the most simple way and updates the
    comment describing them to remove outdated bits.

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

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

    Christoph Hellwig
     
  • currently xfs_bmbt_rec_t is used both for ondisk extents as well as
    host-endian ones. This patch adds a new xfs_bmbt_rec_host_t for the native
    endian ones and cleans up the fallout. There have been various endianess
    issues in the tracing / debug printf code that are fixed by this patch.

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

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

    Christoph Hellwig
     

10 Feb, 2007

2 commits

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

    SGI-PV: 960897
    SGI-Modid: xfs-linux-melb:xfs-kern:28038a

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

    Eric Sandeen
     
  • It makes it incrementally clearer to read the code when the top of a macro
    spaghetti-pile only receives the 3 arguments it uses, rather than 2 extra
    ones which are not used. Also when you start pulling this thread out of
    the sweater (i.e. remove unused args from XFS_BTREE_*_ADDR), a couple
    other third arms etc fall off too. If they're not used in the macro, then
    they sometimes don't need to be passed to the function calling the macro
    either, etc....

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

    SGI-PV: 960197
    SGI-Modid: xfs-linux-melb:xfs-kern:28037a

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

    Eric Sandeen
     

28 Sep, 2006

2 commits


14 Mar, 2006

1 commit

  • functionality, building upon the new layout introduced in mod
    xfs-linux:xfs-kern:207390a. The new multi-level extent allocations are
    only required for heavily fragmented files, so the old-style linear extent
    list is used on files until the extents reach a pre-determined size of 4k.
    4k buffers are used because this is the system page size on Linux i386 and
    systems with larger page sizes don't seem to gain much, if anything, by
    using their native page size as the extent buffer size. Also, using 4k
    extent buffers everywhere provides a consistent interface for CXFS across
    different platforms. The 4k extent buffers are managed by an indirection
    array (xfs_ext_irec_t) which is basically just a pointer array with a bit
    of extra information to keep track of the number of extents in each buffer
    as well as the extent offset of each buffer. Major changes include: -
    Add multi-level in-core file extent functionality to the xfs_iext_
    subroutines introduced in mod: xfs-linux:xfs-kern:207390a - Introduce 13
    new subroutines which add functionality for multi-level in-core file
    extents: xfs_iext_add_indirect_multi()
    xfs_iext_remove_indirect() xfs_iext_realloc_indirect()
    xfs_iext_indirect_to_direct() xfs_iext_bno_to_irec()
    xfs_iext_idx_to_irec() xfs_iext_irec_init()
    xfs_iext_irec_new() xfs_iext_irec_remove()
    xfs_iext_irec_compact() xfs_iext_irec_compact_pages()
    xfs_iext_irec_compact_full() xfs_iext_irec_update_extoffs()

    SGI-PV: 928864
    SGI-Modid: xfs-linux-melb:xfs-kern:207393a

    Signed-off-by: Mandy Kirkconnell
    Signed-off-by: Nathan Scott

    Mandy Kirkconnell
     

02 Nov, 2005

3 commits


08 Sep, 2005

1 commit


21 Jun, 2005

1 commit


17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds