ext4: make extent status types exclusive
authorZhang Yi <yi.zhang@huawei.com>
Tue, 13 Aug 2024 12:34:50 +0000 (20:34 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 2 Sep 2024 19:26:14 +0000 (15:26 -0400)
commitce09036ea4f0a54e9dcd7ba644bb1db7cf2d95d4
tree252f0129ad54cbdc2351f700cef0aec9a69266ab
parent3b4ba269ab6673d664d2522a0e76797a3550983f
ext4: make extent status types exclusive

Since we don't add delayed flag in unwritten extents, all of the four
extent status types EXTENT_STATUS_WRITTEN, EXTENT_STATUS_UNWRITTEN,
EXTENT_STATUS_DELAYED and EXTENT_STATUS_HOLE are exclusive now, add
assertion when storing pblock before inserting extent into status tree
and add comment to the status definition.

Suggested-by: Jan Kara <jack@suse.cz>
Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
Link: https://patch.msgid.link/20240813123452.2824659-11-yi.zhang@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/extents_status.h