btrfs: fix the delayed iputs ASSERT() when the fs
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 3 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | btrfs: run btrfs_error_commit_super() earlyfs/ | +8 | 1 reply | |
| 2/2 | btrfs: add extra warning if delayed iput is added when it's not allowedfs/ fs/ fs/ | +11 | 2 replies |
Reviews trailers per patch
1 of 2 patches has a Reviewed-by or Acked-by.
| Patch | Filipe Manana |
|---|---|
| 1/2 | R-b |
| 2/2 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/2] btrfs: fix the delayed iputs ASSERT() when the fs
Although Filipe fixes a lot of cases where the delayed iputs ASSERT() can be triggered, that's all focusing on the common cases where the fs is still in a good shape.
However in my experimental 2K block size runs, the test case generic/475 has a very high chance that the emulated error makes the fs to flips into an error status.
That error status will trigger a completely new path inside close_ctree(), calling btrfs_error_commit_super() which flush and wait for all ordered extents.
That btrfs_error_commit_super() will generate new delayed iputs asynchronously, thus trigger the later ASSERT().
The first patch is to fix the error, at least I can no longer trigger the ASSERT() in generic/475.
The second patch is to add an extra WARN_ON_ONCE() inside btrfs_add_delayed_iput(), triggered if close_ctree() has processed after btrfs_error_commit_super() calls.
Qu Wenruo (2):
btrfs: run btrfs_error_commit_super() early
btrfs: add extra warning if delayed iput is added when it's not
allowed
fs/btrfs/disk-io.c | 14 +++++++++++--- fs/btrfs/fs.h | 4 ++++ fs/btrfs/inode.c | 4 ++++ 3 files changed, 19 insertions(+), 3 deletions(-)
Signature · 1 line
2.48.1