mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-29 11:54:38 +01:00
abd: Fix stats asymmetry in case of Direct I/O
abd_alloc_from_pages() does not call abd_update_scatter_stats(), since memory is not really allocated there. But abd_free_scatter() called by abd_free() does. It causes negative overflow of some ABD and possibly ARC counters. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Rob Norris <[email protected]> Signed-off-by: Alexander Motin <[email protected]> Closes #18390
This commit is contained in:
1 parent
869d805997
commit
a22b3f6700
1 file changed
+2
-1
+2
-1
@@ -280,7 +280,8 @@ static void
|
||||
abd_free_scatter(abd_t *abd)
|
||||
{
|
||||
abd_free_chunks(abd);
|
||||
abd_update_scatter_stats(abd, ABDSTAT_DECR);
|
||||
if (!abd_is_from_pages(abd))
|
||||
abd_update_scatter_stats(abd, ABDSTAT_DECR);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in new issue
Block a user