Permalink
Switch branches/tags
xfs_for_3.2-rc1_v1 xfs-rmap-for-linus-4.8-rc1 xfs-reflink-for-linus-4.9-rc1 xfs-pnfs-for-linus-3.20-rc1 xfs-iomap-for-linus-4.8-rc5 xfs-iomap-for-linus-4.8-rc3 xfs-for-linux-4.10-rc5-1 xfs-for-linus-v3.14-rc1 xfs-for-linus-v3.14-rc1-2 xfs-for-linus-v3.13-rc8 xfs-for-linus-v3.13-rc5 xfs-for-linus-v3.13-rc4 xfs-for-linus-v3.13-rc1 xfs-for-linus-v3.13-rc1-2 xfs-for-linus-v3.12-rc4 xfs-for-linus-v3.12-rc3 xfs-for-linus-v3.12-rc1 xfs-for-linus-v3.12-rc1-2 xfs-for-linus-4.10-rc7-1 xfs-for-linus-4.10-rc6-5 xfs-for-linus-4.10-rc6-4 xfs-for-linus-4.10-rc6-3 xfs-for-linus-4.10-rc6-2 xfs-for-linus-4.10-rc5 xfs-for-linus-4.10-rc4 xfs-for-linus-4.10-rc4-1 xfs-for-linus-4.10-rc3 xfs-for-linus-4.10-rc3-2 xfs-for-linus-4.9-rc1 xfs-for-linus-4.8-rc1 xfs-for-linus-4.7-rc1 xfs-for-linus-4.6-rc1 xfs-for-linus-4.5 xfs-for-linus-4.5-rc7 xfs-for-linus-4.5-2 xfs-for-linus-4.4 xfs-for-linus-4.3 xfs-for-linus-4.2-rc4 xfs-for-linus-4.2-rc1 xfs-for-linus-4.1-rc6 xfs-for-linus-4.1-rc1 xfs-for-linus-4.0-rc2 xfs-for-linus-3.20-rc1 xfs-for-linus-3.19-rc1 xfs-for-linus-3.18-rc3 xfs-for-linus-3.18-rc1 xfs-for-linus-3.17-rc3 xfs-for-linus-3.17-rc1 xfs-for-linus-3.16-rc5 xfs-for-linus-3.16-rc1 xfs-for-linus-3.15-rc6 xfs-for-linus-3.15-rc5 xfs-for-linus-3.15-rc2 xfs-for-linus-3.15-rc1 xfs-fixes-for-linus-4.9-rc5 xfs-fixes-for-linus-4.9-rc3 xfs-fixes-for-linus-4.5 xfs-4.14-merge-7 xfs-4.14-merge-6 xfs-4.14-merge-5 xfs-4.14-merge-4 xfs-4.14-merge-3 xfs-4.14-merge-2 xfs-4.14-merge-1 xfs-4.14-fixes-2 xfs-4.14-fixes-1 xfs-4.13-merge-6 xfs-4.13-merge-5 xfs-4.13-merge-4 xfs-4.13-merge-3 xfs-4.13-merge-2 xfs-4.13-merge-1 xfs-4.13-fixes-5 xfs-4.13-fixes-4 xfs-4.13-fixes-3 xfs-4.13-fixes-2 xfs-4.13-fixes-1 xfs-4.12-merge-7 xfs-4.12-merge-6 xfs-4.12-merge-5 xfs-4.12-merge-4 xfs-4.12-merge-3 xfs-4.12-merge-2 xfs-4.12-merge-1 xfs-4.12-fixes-5 xfs-4.12-fixes-4 xfs-4.12-fixes-3 xfs-4.12-fixes-2 xfs-4.12-fixes-1 xfs-4.11-merge-7 xfs-4.11-merge-6 xfs-4.11-merge-5 xfs-4.11-merge-4 xfs-4.11-merge-3 xfs-4.11-fixes-3 xfs-4.11-fixes-2 xfs-4.11-fixes-1 v4.14-rc2 v4.14-rc1 v4.13
Nothing to show
Commits on Oct 3, 2017
  1. xfs: don't let cow cancellation transaction alloc recurse into fs rec…

    djwong committed Sep 26, 2017
    …laim
    
    Reclaiming blocks allocated to an inode's CoW fork can happen as part of
    inode reclamation, which in turn can be triggered by memory reclaim.
    Therefore, we cannot let the transaction allocation recurse into fs
    reclaim.  This manifests as lockdep warnings such as:
    
    ======================================================
    WARNING: possible circular locking dependency detected
    4.14.0-rc1 #1 Not tainted
    ------------------------------------------------------
    xfs_scrub/1344 is trying to acquire lock:
     (fs_reclaim){+.+.}, at: [<ffffffff811b2b75>] fs_reclaim_acquire.part.75+0x5/0x30
    
    but task is already holding lock:
     (sb_internal){.+.+}, at: [<ffffffffa015e65b>] xfs_trans_alloc+0xeb/0x130 [xfs]
    
    which lock already depends on the new lock.
    
    
    the existing dependency chain (in reverse order) is:
    
    -> #1 (sb_internal){.+.+}:
           lock_acquire+0xab/0x200
           __sb_start_write+0xbc/0x200
           xfs_trans_alloc+0xeb/0x130 [xfs]
           xfs_reflink_cancel_cow_range+0x8e/0x3d0 [xfs]
           xfs_fs_destroy_inode+0x22f/0x350 [xfs]
           dispose_list+0x48/0x70
           prune_icache_sb+0x42/0x50
           super_cache_scan+0x13b/0x190
           shrink_slab.constprop.79+0x212/0x5d0
           shrink_node+0x5f/0x190
           do_try_to_free_pages+0xd8/0x2d0
           try_to_free_pages+0xf1/0x370
           __alloc_pages_slowpath+0x445/0x10d0
           __alloc_pages_nodemask+0x2c4/0x340
           khugepaged+0xb38/0x2510
           kthread+0x148/0x180
           ret_from_fork+0x2a/0x40
    
    -> #0 (fs_reclaim){+.+.}:
           __lock_acquire+0x10bf/0x1110
           lock_acquire+0xab/0x200
           fs_reclaim_acquire.part.75+0x29/0x30
           kmem_cache_alloc+0x29/0x2d0
           kmem_zone_alloc+0x83/0x100 [xfs]
           xfs_trans_alloc+0x68/0x130 [xfs]
           xfs_reflink_cancel_cow_range+0x8e/0x3d0 [xfs]
           xfs_fs_destroy_inode+0x22f/0x350 [xfs]
           xfs_bulkstat_one_int+0x262/0x480 [xfs]
           xfs_bulkstat_one+0x16/0x20 [xfs]
           xfs_bulkstat+0x4c5/0x6b0 [xfs]
           xfs_ioc_bulkstat+0xee/0x190 [xfs]
           xfs_file_ioctl+0x41b/0xd30 [xfs]
           do_vfs_ioctl+0x8f/0x6f0
           SyS_ioctl+0x3b/0x70
           entry_SYSCALL_64_fastpath+0x1f/0xbe
    
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
  2. xfs: cross-reference the realtime rmapbt

    djwong committed Sep 26, 2017
    When we're scrubbing the realtime metadata, cross-reference
    the rtrmapt.
    
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
  3. xfs: cross-reference realtime bitmap to realtime rmapbt scrubber

    djwong committed Sep 26, 2017
    When we're checking the realtime rmapbt, cross-reference the entries
    with the realtime bitmap too.
    
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
  4. xfs: scrub the realtime rmapbt

    djwong committed Sep 26, 2017
    Check the realtime reverse mapping btree against the rtbitmap, and
    modify the rtbitmap scrub to check against the rtrmapbt.
    
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
  5. xfs: wire up getfsmap to the realtime reverse mapping btree

    djwong committed Sep 26, 2017
    Connect the getfsmap ioctl to the realtime rmapbt.
    
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
  6. xfs: enable realtime rmap btree

    djwong committed Sep 26, 2017
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
  7. xfs: wire up rmap map and unmap to the realtime rmapbt

    djwong committed Sep 26, 2017
    Connect the map and unmap reverse-mapping operations to the realtime
    rmapbt via the deferred operation callbacks.  This enables us to
    perform rmap operations against the correct btree.
    
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
  8. xfs: don't assume a left rmap when allocating a new rmap

    djwong committed Sep 26, 2017
    The original rmap code assumed that there would always be at least
    one rmap in the rmapbt (the AG sb/agf/agi) and so errored out if
    it didn't find one.  This assumption isn't true for rtrmapbt, so
    remove the check and just deal with the situation.
    
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
  9. xfs: wire up a new inode fork type for the realtime rmap

    djwong committed Sep 26, 2017
    Plumb in the pieces we need to embed the root of the realtime rmap
    btree in an inode's data fork, complete with new fork type and
    on-disk interpretation functions.
    
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
  10. xfs: add realtime reverse map inode to superblock

    djwong committed Sep 26, 2017
    Add a field to the superblock to record the rt rmapbt inode and load
    it at mount time.  The rtrmapbt inode will have a unique extent format
    code, which means that we also have to update the inode validation and
    flush routines to look for it.
    
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
  11. xfs: add realtime rmap btree block detection to log recovery

    djwong committed Sep 26, 2017
    Identify rtrmapbt blocks in the log correctly so that we can
    validate them during log recovery.
    
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
  12. xfs: add a realtime flag to the rmap update log redo items

    djwong committed Sep 26, 2017
    Extend the rmap update (RUI) log items with a new realtime flag that
    indicates that the updates apply against the realtime rmapbt.  We'll
    wire up the actual rmap code later.
    
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
  13. xfs: prepare rmap functions to deal with rtrmapbt

    djwong committed Sep 26, 2017
    Prepare the high-level rmap functions to deal with the new realtime
    rmapbt and its slightly different conventions.  Provide the ability
    to talk to either rmapbt or rtrmapbt formats from the same high
    level code.
    
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
  14. xfs: add realtime rmap btree operations

    djwong committed Sep 26, 2017
    Implement the generic btree operations needed to manipulate rtrmap
    btree blocks. This is different from the regular rmapbt in that we
    allocate space from the filesystem at large, and are neither
    constrained to the free space nor any particular AG.
    
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
  15. xfs: realtime rmap btree transaction reservations

    djwong committed Sep 26, 2017
    Make sure that there's enough log reservation to handle mapping
    and unmapping realtime extents.  We have to reserve enough space
    to handle a split in the rtrmapbt to add the record and a second
    split in the regular rmapbt to record the rtrmapbt split.
    
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
  16. xfs: define the on-disk realtime rmap btree format

    djwong committed Sep 26, 2017
    Start filling out the rtrmap btree implementation. Start with the
    on-disk btree format; add everything needed to read, write and
    manipulate rmap btree blocks. This prepares the way for connecting the
    btree operations implementation.
    
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
  17. xfs: introduce realtime rmap btree definitions

    djwong committed Sep 26, 2017
    Add new realtime rmap btree definitions. The realtime rmap btree will
    be rooted from a hidden inode, but has its own shape and therefore
    needs to have most of its own separate types.
    
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
  18. xfs: widen xfs_refcount_irec fields to handle realtime rmapbt

    djwong committed Sep 26, 2017
    Change the startblock and blockcount fields of xfs_refcount_irec to
    be 64 bits wide.  This enables us to use the same high level rmap
    code for either tree.  We'll also collect all the resulting breakage
    fixes here.
    
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
  19. xfs: support storing records in the inode core root

    djwong committed Sep 26, 2017
    Make it so that we can actually store btree records in the inode
    core (i.e. enable bb_level == 0) so that the rtrmapbt can do this.
    
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
  20. xfs: make iroot_realloc a btree function

    djwong committed Sep 26, 2017
    For btrees that are rooted in the inode core, we have to have a
    function to resize the root.  This is fairly specific to each
    btree type, so make xfs_iroot_realloc a per-btree function.
    
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
  21. xfs: scrub in-core metadata

    djwong committed Sep 26, 2017
    Whenever we load a buffer, explicitly re-call the structure verifier to
    ensure that memory isn't corrupting things.
    
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
  22. xfs: create a new buf_ops pointer to verify structure metadata

    djwong committed Sep 26, 2017
    Expose all metadata structure buffer verifier functions via buf_ops.
    These will be used by the online scrub mechanism to look for problems
    with buffers that are already sitting around in memory.
    
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
  23. xfs: fail out of xfs_attr3_leaf_lookup_int if it looks corrupt

    djwong committed Sep 26, 2017
    If the xattr leaf block looks corrupt, return -EFSCORRUPTED to userspace
    instead of ASSERTing on debug kernels or running off the end of the
    buffer on regular kernels.
    
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
  24. xfs: provide a centralized method for verifying inline fork data

    djwong committed Sep 26, 2017
    Replace the current haphazard dir2 shortform verifier callsites with a
    centralized verifier function that can be called either with the default
    verifier functions or with a custom set.  This helps us strengthen
    integrity checking while providing us with flexibility for repair tools.
    
    xfs_repair wants this to be able to supply its own verifier functions
    when trying to fix possibly corrupt metadata.
    
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
  25. xfs: refactor short form directory structure verifier function

    djwong committed Sep 26, 2017
    Change the short form directory structure verifier function to return
    the instruction pointer of a failing check or NULL if everything's ok.
    
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
  26. xfs: create structure verifier function for short form symlinks

    djwong committed Sep 26, 2017
    Create a function to check the structure of short form symlink targets.
    
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
  27. xfs: create structure verifier function for shortform xattrs

    djwong committed Sep 26, 2017
    Create a function to perform structure verification for short form
    extended attributes.
    
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
  28. xfs: move inode fork verifiers to xfs_dinode_verify

    djwong committed Sep 26, 2017
    Consolidate the fork size and format verifiers to xfs_dinode_verify so
    that we can reject bad inodes earlier and in a single place.
    
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
  29. xfs: verify dinode header first

    djwong committed Sep 26, 2017
    Move the v3 inode integrity information (crc, owner, metauuid) before we
    look at anything else in the inode so that we don't waste time on a torn
    write or a totally garbled block.  This makes xfs_dinode_verify more
    consistent with the other verifiers.
    
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
  30. xfs: refactor verifier callers to print address of failing check

    djwong committed Sep 26, 2017
    Refactor the callers of verifiers to print the instruction address of a
    failing check.
    
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
  31. xfs: have buffer verifier functions report failing address

    djwong committed Sep 26, 2017
    Modify each function that checks the contents of a metadata buffer to
    return the instruction address of the failing test so that we can report
    more precise failure errors to the log.
    
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
  32. xfs: remove XFS_WANT_CORRUPTED_RETURN from dir3 data verifiers

    djwong committed Sep 26, 2017
    Since __xfs_dir3_data_check verifies on-disk metadata, we can't have it
    noisily blowing asserts and hanging the system on corrupt data coming in
    off the disk.  Instead, have it return a boolean like all the other
    checker functions, and only have it noisily fail if we fail in debug
    mode.
    
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
  33. xfs: refactor long-format btree header verification routines

    djwong committed Sep 26, 2017
    Create two helper functions to verify the headers of a long format
    btree block.  We'll use this later for the realtime rmapbt.
    
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
  34. xfs: whine to dmesg when we encounter errors

    djwong committed Sep 26, 2017
    Forward everything scrub whines about to dmesg.
    
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
  35. xfs: repair damaged symlinks

    djwong committed Sep 26, 2017
    Repair inconsistent symbolic link data.
    
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>