diff options
author | Brian Foster <bfoster@redhat.com> | 2021-02-11 19:46:38 +0300 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2021-02-11 19:46:38 +0300 |
commit | 1cd738b13ae9b29e03d6149f0246c61f76e81fcf (patch) | |
tree | 3cfd697808822bd451895ee588531131f1f3396a /fs/xfs/xfs_sysctl.c | |
parent | 8646b982baf7d389a140ca3974974a4cbbc3f171 (diff) | |
download | linux-1cd738b13ae9b29e03d6149f0246c61f76e81fcf.tar.xz |
xfs: consider shutdown in bmapbt cursor delete assert
The assert in xfs_btree_del_cursor() checks that the bmapbt block
allocation field has been handled correctly before the cursor is
freed. This field is used for accurate calculation of indirect block
reservation requirements (for delayed allocations), for example.
generic/019 reproduces a scenario where this assert fails because
the filesystem has shutdown while in the middle of a bmbt record
insertion. This occurs after a bmbt block has been allocated via the
cursor but before the higher level bmap function (i.e.
xfs_bmap_add_extent_hole_real()) completes and resets the field.
Update the assert to accommodate the transient state if the
filesystem has shutdown. While here, clean up the indentation and
comments in the function.
Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/xfs_sysctl.c')
0 files changed, 0 insertions, 0 deletions