]> git.baikalelectronics.ru Git - kernel.git/commit
zonefs: Fix active zone accounting
authorDamien Le Moal <damien.lemoal@opensource.wdc.com>
Mon, 21 Nov 2022 07:29:37 +0000 (16:29 +0900)
committerDamien Le Moal <damien.lemoal@opensource.wdc.com>
Fri, 25 Nov 2022 08:01:22 +0000 (17:01 +0900)
commit810f75625eb99d638394945838b6c3cd2e1527c7
tree4248dbc5acc984c73f4bc2ae8de017949686fad3
parent8b61e51d09bd487e5f21e03367fda57b2e26911a
zonefs: Fix active zone accounting

If a file zone transitions to the offline or readonly state from an
active state, we must clear the zone active flag and decrement the
active seq file counter. Do so in zonefs_account_active() using the new
zonefs inode flags ZONEFS_ZONE_OFFLINE and ZONEFS_ZONE_READONLY. These
flags are set if necessary in zonefs_check_zone_condition() based on the
result of report zones operation after an IO error.

Fixes: 76dff81de8fc ("zonefs: Add active seq file accounting")
Cc: stable@vger.kernel.org
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
fs/zonefs/super.c
fs/zonefs/zonefs.h