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)
committerJens Axboe <axboe@kernel.dk>
Tue, 2 Aug 2022 23:14:40 +0000 (17:14 -0600)
commiteac58d08d4937d2eab8f71c663d98d0759845bde
treebe424e94edc28059f85fb1cb4bf28f321fcc7d76
parent6f28c5c3128c79f628da2aee2f8128aaa3b91f22
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>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/md/md.c
drivers/md/md.h