[ Sasha's backport helper bot ]
Hi,
✅ All tests passed successfully. No issues detected. No action required from the submitter.
The upstream commit SHA1 provided is correct: 6773da870ab89123d1b513da63ed59e32a29cb77
WARNING: Author mismatch between patch and upstream commit: Backport author: Leah Rumancikleah.rumancik@gmail.com Commit author: Christoph Hellwighch@lst.de
Status in newer kernel trees: 6.14.y | Present (exact SHA1) 6.12.y | Present (exact SHA1) 6.6.y | Present (different SHA1: f43bd357fde0)
Note: The patch differs from the upstream commit: --- 1: 6773da870ab89 ! 1: 00b5c634c7b39 xfs: fix error returns from xfs_bmapi_write @@ Metadata ## Commit message ## xfs: fix error returns from xfs_bmapi_write
+ [ Upstream commit 6773da870ab89123d1b513da63ed59e32a29cb77 ] + xfs_bmapi_write can return 0 without actually returning a mapping in mval in two different cases:
@@ Commit message Reported-by: 刘通 lyutoon@gmail.com Reviewed-by: "Darrick J. Wong" djwong@kernel.org Signed-off-by: Chandan Babu R chandanbabu@kernel.org + Signed-off-by: Leah Rumancik leah.rumancik@gmail.com + Acked-by: "Darrick J. Wong" djwong@kernel.org
## fs/xfs/libxfs/xfs_attr_remote.c ## @@ fs/xfs/libxfs/xfs_attr_remote.c: xfs_attr_rmtval_set_blk( @@ fs/xfs/libxfs/xfs_bmap.c: xfs_bmapi_write( return 0; error0: xfs_bmapi_finish(&bma, whichfork, error); -@@ fs/xfs/libxfs/xfs_bmap.c: xfs_bmapi_convert_one_delalloc( +@@ fs/xfs/libxfs/xfs_bmap.c: xfs_bmapi_convert_delalloc( if (error) goto out_finish;
- error = -ENOSPC; - if (WARN_ON_ONCE(bma.blkno == NULLFSBLOCK)) - goto out_finish; - if (WARN_ON_ONCE(!xfs_valid_startblock(ip, bma.got.br_startblock))) { - xfs_bmap_mark_sick(ip, whichfork); - error = -EFSCORRUPTED; + error = -EFSCORRUPTED; + if (WARN_ON_ONCE(!xfs_valid_startblock(ip, bma.got.br_startblock))) + goto out_finish;
## fs/xfs/libxfs/xfs_da_btree.c ## @@ fs/xfs/libxfs/xfs_da_btree.c: xfs_da_grow_inode_int( @@ fs/xfs/libxfs/xfs_da_btree.c: xfs_da_grow_inode_int( /* * Count the blocks we got, make sure it matches the total.
- ## fs/xfs/scrub/quota_repair.c ## -@@ fs/xfs/scrub/quota_repair.c: xrep_quota_item_fill_bmap_hole( - irec, &nmaps); - if (error) - return error; -- if (nmaps != 1) -- return -ENOSPC; - - dq->q_blkno = XFS_FSB_TO_DADDR(mp, irec->br_startblock); - -@@ fs/xfs/scrub/quota_repair.c: xrep_quota_data_fork( - XFS_BMAPI_CONVERT, 0, &nrec, &nmap); - if (error) - goto out; -- if (nmap != 1) { -- error = -ENOSPC; -- goto out; -- } - ASSERT(nrec.br_startoff == irec.br_startoff); - ASSERT(nrec.br_blockcount == irec.br_blockcount); - - - ## fs/xfs/scrub/rtbitmap_repair.c ## -@@ fs/xfs/scrub/rtbitmap_repair.c: xrep_rtbitmap_data_mappings( - 0, &map, &nmaps); - if (error) - return error; -- if (nmaps != 1) -- return -EFSCORRUPTED; - - /* Commit new extent and all deferred work. */ - error = xrep_defer_finish(sc); - ## fs/xfs/xfs_bmap_util.c ## @@ fs/xfs/xfs_bmap_util.c: xfs_alloc_file_space( if (error) @@ fs/xfs/xfs_iomap.c: xfs_iomap_write_direct( - goto out_unlock; - } - - if (unlikely(!xfs_valid_startblock(ip, imap->br_startblock))) { - xfs_bmap_mark_sick(ip, XFS_DATA_FORK); + if (unlikely(!xfs_valid_startblock(ip, imap->br_startblock))) error = xfs_alert_fsblock_zero(ip, imap); +
## fs/xfs/xfs_reflink.c ## @@ fs/xfs/xfs_reflink.c: xfs_reflink_fill_cow_hole( ---
Results of testing on various branches:
| Branch | Patch Apply | Build Test | |---------------------------|-------------|------------| | stable/linux-6.1.y | Success | Success |