linux-next/fs/zonefs
Damien Le Moal 46a9c526ee zonefs: Simplify IO error handling
Simplify zonefs_check_zone_condition() by moving the code that changes
an inode access rights to the new function zonefs_inode_update_mode().
Furthermore, since on mount an inode wpoffset is always zero when
zonefs_check_zone_condition() is called during an inode initialization,
the "mount" boolean argument is not necessary for the readonly zone
case. This argument is thus removed.

zonefs_io_error_cb() is also modified to use the inode offline and
zone state flags instead of checking the device zone condition. The
multiple calls to zonefs_check_zone_condition() are reduced to the first
call on entry, which allows removing the "warn" argument.
zonefs_inode_update_mode() is also used to update an inode access rights
as zonefs_io_error_cb() modifies the inode flags depending on the volume
error handling mode (defined with a mount option). Since an inode mode
change differs for read-only zones between mount time and IO error time,
the flag ZONEFS_ZONE_INIT_MODE is used to differentiate both cases.

Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
2023-01-23 09:25:51 +09:00
..
file.c zonefs: Reorganize code 2023-01-23 09:25:50 +09:00
Kconfig zonefs: select CONFIG_CRC32 2021-01-04 09:06:42 +09:00
Makefile zonefs: Reorganize code 2023-01-23 09:25:50 +09:00
super.c zonefs: Simplify IO error handling 2023-01-23 09:25:51 +09:00
sysfs.c zonefs: Remove to_attr() helper function 2022-11-16 16:08:31 +09:00
trace.h fs/zonefs: Use the enum req_op type for tracing request operations 2022-07-14 12:14:33 -06:00
zonefs.h zonefs: Simplify IO error handling 2023-01-23 09:25:51 +09:00