mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 00:20:32 +00:00
Bug fixes for 6.6-rc6:
* Fix calculation of offset of AG's last block and its length. * Update incore AG block count when shrinking an AG. * Process free extents to busy list in FIFO order. * Make XFS report its i_version as the STATX_CHANGE_COOKIE. Signed-off-by: Chandan Babu R <chandanbabu@kernel.org> -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQQjMC4mbgVeU7MxEIYH7y4RirJu9AUCZSjJjQAKCRAH7y4RirJu 9HK3AQDLHHw5nlrVShiOtps543OOJ1uBA2PO/lxvvM3X6GPbbwEA8uYLqNPThpF2 +a5h8y9LV6uTEDsdpSoEPBmCgXKhYQg= =RmDo -----END PGP SIGNATURE----- Merge tag 'xfs-6.6-fixes-5' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fixes from Chandan Babu: - Fix calculation of offset of AG's last block and its length - Update incore AG block count when shrinking an AG - Process free extents to busy list in FIFO order - Make XFS report its i_version as the STATX_CHANGE_COOKIE * tag 'xfs-6.6-fixes-5' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: reinstate the old i_version counter as STATX_CHANGE_COOKIE xfs: Remove duplicate include xfs: correct calculation for agend and blockcount xfs: process free extents to busy list in FIFO order xfs: adjust the incore perag block_count when shrinking
This commit is contained in:
commit
70f8c6f8f8
5 changed files with 16 additions and 5 deletions
|
@ -1001,6 +1001,12 @@ xfs_ag_shrink_space(
|
|||
error = -ENOSPC;
|
||||
goto resv_init_out;
|
||||
}
|
||||
|
||||
/* Update perag geometry */
|
||||
pag->block_count -= delta;
|
||||
__xfs_agino_range(pag->pag_mount, pag->block_count, &pag->agino_min,
|
||||
&pag->agino_max);
|
||||
|
||||
xfs_ialloc_log_agi(*tpp, agibp, XFS_AGI_LENGTH);
|
||||
xfs_alloc_log_agf(*tpp, agfbp, XFS_AGF_LENGTH);
|
||||
return 0;
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
#include "xfs_log_format.h"
|
||||
#include "xfs_trans_resv.h"
|
||||
#include "xfs_mount.h"
|
||||
#include "xfs_format.h"
|
||||
#include "scrub/xfile.h"
|
||||
#include "scrub/xfarray.h"
|
||||
#include "scrub/scrub.h"
|
||||
|
|
|
@ -62,7 +62,8 @@ xfs_extent_busy_insert_list(
|
|||
rb_link_node(&new->rb_node, parent, rbp);
|
||||
rb_insert_color(&new->rb_node, &pag->pagb_tree);
|
||||
|
||||
list_add(&new->list, busy_list);
|
||||
/* always process discard lists in fifo order */
|
||||
list_add_tail(&new->list, busy_list);
|
||||
spin_unlock(&pag->pagb_lock);
|
||||
}
|
||||
|
||||
|
|
|
@ -584,6 +584,11 @@ xfs_vn_getattr(
|
|||
}
|
||||
}
|
||||
|
||||
if ((request_mask & STATX_CHANGE_COOKIE) && IS_I_VERSION(inode)) {
|
||||
stat->change_cookie = inode_query_iversion(inode);
|
||||
stat->result_mask |= STATX_CHANGE_COOKIE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Note: If you add another clause to set an attribute flag, please
|
||||
* update attributes_mask below.
|
||||
|
|
|
@ -126,8 +126,8 @@ xfs_dax_notify_ddev_failure(
|
|||
struct xfs_rmap_irec ri_low = { };
|
||||
struct xfs_rmap_irec ri_high;
|
||||
struct xfs_agf *agf;
|
||||
xfs_agblock_t agend;
|
||||
struct xfs_perag *pag;
|
||||
xfs_agblock_t range_agend;
|
||||
|
||||
pag = xfs_perag_get(mp, agno);
|
||||
error = xfs_alloc_read_agf(pag, tp, 0, &agf_bp);
|
||||
|
@ -148,10 +148,10 @@ xfs_dax_notify_ddev_failure(
|
|||
ri_high.rm_startblock = XFS_FSB_TO_AGBNO(mp, end_fsbno);
|
||||
|
||||
agf = agf_bp->b_addr;
|
||||
agend = min(be32_to_cpu(agf->agf_length),
|
||||
range_agend = min(be32_to_cpu(agf->agf_length) - 1,
|
||||
ri_high.rm_startblock);
|
||||
notify.startblock = ri_low.rm_startblock;
|
||||
notify.blockcount = agend - ri_low.rm_startblock;
|
||||
notify.blockcount = range_agend + 1 - ri_low.rm_startblock;
|
||||
|
||||
error = xfs_rmap_query_range(cur, &ri_low, &ri_high,
|
||||
xfs_dax_failure_fn, ¬ify);
|
||||
|
|
Loading…
Reference in a new issue