public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/3] Fixes for ENOSPC xfs_remove
@ 2023-11-30  4:05 Jiachen Zhang
  2023-11-30  4:05 ` [PATCH v3 1/3] xfs: ensure logflagsp is initialized in xfs_bmap_del_extent_real Jiachen Zhang
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Jiachen Zhang @ 2023-11-30  4:05 UTC (permalink / raw)
  To: Chandan Babu R, Darrick J. Wong
  Cc: Dave Chinner, Allison Henderson, Zhang Tianci, Brian Foster,
	linux-xfs, linux-kernel, xieyongji, me, Jiachen Zhang

Hi,

Recently, our use-case ran into 2 bugs in case doing xfs_remove when the
disk space is in-pressure, which may cause xfs shutdown and kernel crash
in the xfs log recovery procedure. Here are 2 patches to fix the
problem, and a patch adding a helper to optimize the code structure.

The 1st patch fixes an uninitialized variable issue.

The 2nd patch ensures the blkno in the xfs_buf is updated when doing
xfs_da3_swap_lastblock().

The 3rd patch adds a xfs_buf copy helper to optimize the code structure.

Changes of v2:
- directly set the *logflagsp value to make the code more robust in the
  1st commit,
- check xfs's crc-feature rather than magic in the 2nd commit, and
- fixed code style and rebased onto the master branch.

Changes of v3:
- fix code style, and
- add a new patch which does xfs_buf memcpy in a helper.

Thanks,
Jiachen


Jiachen Zhang (1):
  xfs: ensure logflagsp is initialized in xfs_bmap_del_extent_real

Zhang Tianci (2):
  xfs: update dir3 leaf block metadata after swap
  xfs: extract xfs_da_buf_copy() helper function

 fs/xfs/libxfs/xfs_attr_leaf.c | 12 ++----
 fs/xfs/libxfs/xfs_bmap.c      | 73 +++++++++++++++--------------------
 fs/xfs/libxfs/xfs_da_btree.c  | 70 +++++++++++++++------------------
 fs/xfs/libxfs/xfs_da_btree.h  |  2 +
 4 files changed, 69 insertions(+), 88 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-12-04  7:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-30  4:05 [PATCH v3 0/3] Fixes for ENOSPC xfs_remove Jiachen Zhang
2023-11-30  4:05 ` [PATCH v3 1/3] xfs: ensure logflagsp is initialized in xfs_bmap_del_extent_real Jiachen Zhang
2023-11-30 19:01   ` Darrick J. Wong
2023-11-30  4:05 ` [PATCH v3 2/3] xfs: update dir3 leaf block metadata after swap Jiachen Zhang
2023-12-01  0:48   ` Darrick J. Wong
2023-12-04  7:18   ` Christoph Hellwig
2023-11-30  4:05 ` [PATCH v3 3/3] xfs: extract xfs_da_buf_copy() helper function Jiachen Zhang
2023-12-04  7:25   ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox