RE: [PATCH 4/9] imsm: FIX: After checkpoint mark array have to be clean
flat view
From: Kwolek, Adam <hidden>
Date: 2011-03-08 08:52:40
-----Original Message----- From: NeilBrown [mailto:neilb@suse.de] Sent: Tuesday, March 08, 2011 6:08 AM To: Kwolek, Adam Cc: linux-raid@vger.kernel.org; Williams, Dan J; Ciechanowski, Ed; Neubauer, Wojciech Subject: Re: [PATCH 4/9] imsm: FIX: After checkpoint mark array have to be clean On Wed, 02 Mar 2011 14:29:27 +0100 Adam Kwolek [off-list ref] wrote:quoted
When checkpoint is marked set volume as clean. Reshape on dirty volume cannot be restarted from checkpoint. Signed-off-by: Adam Kwolek <redacted> --- super-intel.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)diff --git a/super-intel.c b/super-intel.c index 11972f3..04e32ae 100644 --- a/super-intel.c +++ b/super-intel.c@@ -5218,6 +5218,7 @@ static int imsm_set_array_state(structactive_array *a, int consistent)quoted
__le32_to_cpu(dev->vol.curr_migr_unit)) { dev->vol.curr_migr_unit = __cpu_to_le32(unit); + dev->vol.dirty = 0; super->updates_pending++; } }hi Adam, You'll need to explain this one a bit more. If the array isn't clean, then it is wrong to mark it as clean. If it is clean, then 'consistent' should be 'true' and it will be marked clean anyway.
This could be true if set_array_state has possibility to execute this code in general migration case. During reshape after updtate curr_migr_unit set array state exits (super-intel.c: 5225 /return 0/) To achieve this it can be changed: 1. Consistent flag should be == 1 during reshape monitor.c:387 - a->container->ss->set_array_state(a, a->curr_state <= clean); + a->container->ss->set_array_state(a, a->curr_state <= active); Array state is active during reshape 2. use consistent flag during reshape for imsm Super-intel.c: set_array_state() - remove all code for a->curr_action == reshape (around line 5211) - instead removed code add 'goto' to calculating blocks_per_unit at the end of this function This will allow for mark clear/dirty volume also I'll send 2 patch to make this description more clear. 1. FIX: During reshape array is in active state 2. imsm: FIX: Mark checkpoint and array state clean during reshape
Why cannot a reshape of a dirty volume be restarted from a checkpoint? I would think it would continue with the reshape and then when that finished, go back and do the resync. NeilBrown
If array is dirty and during reshape is not assembled due to i.e: super-intel.c:1792 for dirty volume info->resync_start = 0; Code for analyzing migration type is not executed. If you find my 2 patches I mention above ok, for now second case it not urgent. BR Adam