]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - fs/xfs/xfs_dir2_node.c
xfs: fix split buffer vector log recovery support
[mirror_ubuntu-bionic-kernel.git] / fs / xfs / xfs_dir2_node.c
index 1806a22d55933e601806566fcefa3a09e2afde15..5246de4912d4b07d3fda2940bfe30a15d77a09f1 100644 (file)
@@ -168,7 +168,7 @@ __xfs_dir3_free_read(
 
        /* try read returns without an error or *bpp if it lands in a hole */
        if (!err && tp && *bpp)
-               xfs_trans_buf_set_type(tp, *bpp, XFS_BLF_DIR_FREE_BUF);
+               xfs_trans_buf_set_type(tp, *bpp, XFS_BLFT_DIR_FREE_BUF);
        return err;
 }
 
@@ -256,7 +256,7 @@ xfs_dir3_free_get_buf(
        if (error)
                return error;
 
-       xfs_trans_buf_set_type(tp, bp, XFS_BLF_DIR_FREE_BUF);
+       xfs_trans_buf_set_type(tp, bp, XFS_BLFT_DIR_FREE_BUF);
        bp->b_ops = &xfs_dir3_free_buf_ops;
 
        /*
@@ -404,7 +404,7 @@ xfs_dir2_leaf_to_node(
        else
                leaf->hdr.info.magic = cpu_to_be16(XFS_DIR3_LEAFN_MAGIC);
        lbp->b_ops = &xfs_dir3_leafn_buf_ops;
-       xfs_trans_buf_set_type(tp, lbp, XFS_BLF_DIR_LEAFN_BUF);
+       xfs_trans_buf_set_type(tp, lbp, XFS_BLFT_DIR_LEAFN_BUF);
        xfs_dir3_leaf_log_header(tp, lbp);
        xfs_dir3_leaf_check(mp, lbp);
        return 0;
@@ -820,7 +820,7 @@ xfs_dir2_leafn_lookup_for_entry(
                                                        (char *)curbp->b_addr);
                        state->extrablk.magic = XFS_DIR2_DATA_MAGIC;
                        curbp->b_ops = &xfs_dir3_data_buf_ops;
-                       xfs_trans_buf_set_type(tp, curbp, XFS_BLF_DIR_DATA_BUF);
+                       xfs_trans_buf_set_type(tp, curbp, XFS_BLFT_DIR_DATA_BUF);
                        if (cmp == XFS_CMP_EXACT)
                                return XFS_ERROR(EEXIST);
                }
@@ -835,7 +835,7 @@ xfs_dir2_leafn_lookup_for_entry(
                        state->extrablk.blkno = curdb;
                        state->extrablk.magic = XFS_DIR2_DATA_MAGIC;
                        curbp->b_ops = &xfs_dir3_data_buf_ops;
-                       xfs_trans_buf_set_type(tp, curbp, XFS_BLF_DIR_DATA_BUF);
+                       xfs_trans_buf_set_type(tp, curbp, XFS_BLFT_DIR_DATA_BUF);
                } else {
                        /* If the curbp is not the CI match block, drop it */
                        if (state->extrablk.bp != curbp)
@@ -993,7 +993,7 @@ xfs_dir2_leafn_rebalance(
        xfs_dir2_leaf_t         *leaf1;         /* first leaf structure */
        xfs_dir2_leaf_t         *leaf2;         /* second leaf structure */
        int                     mid;            /* midpoint leaf index */
-#ifdef DEBUG
+#if defined(DEBUG) || defined(XFS_WARN)
        int                     oldstale;       /* old count of stale leaves */
 #endif
        int                     oldsum;         /* old total leaf count */
@@ -1022,7 +1022,7 @@ xfs_dir2_leafn_rebalance(
        ents2 = xfs_dir3_leaf_ents_p(leaf2);
 
        oldsum = hdr1.count + hdr2.count;
-#ifdef DEBUG
+#if defined(DEBUG) || defined(XFS_WARN)
        oldstale = hdr1.stale + hdr2.stale;
 #endif
        mid = oldsum >> 1;