Commit 5b9ff397 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'xfs-6.3-fixes-7' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux

Pull yet more xfs bug fixes from Darrick Wong:
 "The first bugfix addresses a longstanding problem where we use the
  wrong file mapping cursors when trying to compute the speculative
  preallocation quantity. This has been causing sporadic crashes when
  alwayscow mode is engaged.

  The other two fixes correct minor problems in more recent changes.

   - Fix the new allocator tracepoints because git am mismerged the
     changes such that the trace_XXX got rebased to be in function YYY
     instead of XXX

   - Ensure that the perag AGFL_RESET state is consistent with whatever
     we've just read off the disk

   - Fix a bug where we used the wrong iext cursor during a write begin"

* tag 'xfs-6.3-fixes-7' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
  xfs: fix mismerged tracepoints
  xfs: clear incore AGFL_RESET state if it's not needed
  xfs: pass the correct cursor to xfs_iomap_prealloc_size
parents f768b35a 4dfb02d5
......@@ -3045,6 +3045,8 @@ xfs_alloc_read_agf(
pag->pagf_refcount_level = be32_to_cpu(agf->agf_refcount_level);
if (xfs_agfl_needs_reset(pag->pag_mount, agf))
set_bit(XFS_AGSTATE_AGFL_NEEDS_RESET, &pag->pag_opstate);
else
clear_bit(XFS_AGSTATE_AGFL_NEEDS_RESET, &pag->pag_opstate);
/*
* Update the in-core allocbt counter. Filter out the rmapbt
......@@ -3411,7 +3413,7 @@ xfs_alloc_vextent_start_ag(
args->agno = NULLAGNUMBER;
args->agbno = NULLAGBLOCK;
trace_xfs_alloc_vextent_first_ag(args);
trace_xfs_alloc_vextent_start_ag(args);
error = xfs_alloc_vextent_check_args(args, target, &minimum_agno);
if (error) {
......@@ -3464,7 +3466,7 @@ xfs_alloc_vextent_first_ag(
args->agno = NULLAGNUMBER;
args->agbno = NULLAGBLOCK;
trace_xfs_alloc_vextent_start_ag(args);
trace_xfs_alloc_vextent_first_ag(args);
error = xfs_alloc_vextent_check_args(args, target, &minimum_agno);
if (error) {
......@@ -3498,7 +3500,7 @@ xfs_alloc_vextent_exact_bno(
args->agno = XFS_FSB_TO_AGNO(mp, target);
args->agbno = XFS_FSB_TO_AGBNO(mp, target);
trace_xfs_alloc_vextent_near_bno(args);
trace_xfs_alloc_vextent_exact_bno(args);
error = xfs_alloc_vextent_check_args(args, target, &minimum_agno);
if (error) {
......@@ -3536,7 +3538,7 @@ xfs_alloc_vextent_near_bno(
args->agno = XFS_FSB_TO_AGNO(mp, target);
args->agbno = XFS_FSB_TO_AGBNO(mp, target);
trace_xfs_alloc_vextent_exact_bno(args);
trace_xfs_alloc_vextent_near_bno(args);
error = xfs_alloc_vextent_check_args(args, target, &minimum_agno);
if (error) {
......
......@@ -1090,9 +1090,12 @@ xfs_buffered_write_iomap_begin(
*/
if (xfs_has_allocsize(mp))
prealloc_blocks = mp->m_allocsize_blocks;
else
else if (allocfork == XFS_DATA_FORK)
prealloc_blocks = xfs_iomap_prealloc_size(ip, allocfork,
offset, count, &icur);
else
prealloc_blocks = xfs_iomap_prealloc_size(ip, allocfork,
offset, count, &ccur);
if (prealloc_blocks) {
xfs_extlen_t align;
xfs_off_t end_offset;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment