md: Use enum for overloaded magic numbers used by mddev->curr_resync
authorLogan Gunthorpe <logang@deltatee.com>
Wed, 8 Jun 2022 16:27:54 +0000 (10:27 -0600)
committerSong Liu <song@kernel.org>
Sun, 3 Jul 2022 14:55:38 +0000 (07:55 -0700)
commitff3a0996abb9e45d31bb58022fd64f28eebefb63
tree1523f29ff64d810e70d0ee54fe4994e7f60e9031
parent13a5bd4c6b10491376d5ed95e88892c9a129dac3
md: Use enum for overloaded magic numbers used by mddev->curr_resync

Comments in the code document special values used for
mddev->curr_resync. Make this clearer by using an enum to label these
values.

The only functional change is a couple places use the wrong comparison
operator that implied 3 is another special value. They are all
fixed to imply that 3 or greater is an active resync.

Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Song Liu <song@kernel.org>
drivers/md/md.c
drivers/md/md.h