From b70abcb24711d1327a8a505ab3e931c24cbab0a7 Mon Sep 17 00:00:00 2001 From: Shaohua Li Date: Thu, 13 Aug 2015 14:31:58 -0700 Subject: raid5: add a new state for stripe log handling When a stripe finishes construction, we write the stripe to raid in ops_run_io normally. With log, we do a bunch of other operations before the stripe is written to raid. Mainly write the stripe to log disk, flush disk cache and so on. The operations are still driven by raid5d and run in the stripe state machine. We introduce a new state for such stripe (trapped into log). The stripe is in this state from the time it first enters ops_run_io (finish construction) to the time it is written to raid. Since we know the state is only for log, we bypass other check/operation in handle_stripe. Signed-off-by: Shaohua Li Signed-off-by: NeilBrown --- drivers/md/raid5.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/md/raid5.h') diff --git a/drivers/md/raid5.h b/drivers/md/raid5.h index 7686fcb62157..a42c123d15d2 100644 --- a/drivers/md/raid5.h +++ b/drivers/md/raid5.h @@ -340,6 +340,7 @@ enum { STRIPE_BITMAP_PENDING, /* Being added to bitmap, don't add * to batch yet. */ + STRIPE_LOG_TRAPPED, /* trapped into log */ }; #define STRIPE_EXPAND_SYNC_FLAGS \ -- cgit