Message ID | 1453187862-24331-2-git-send-email-wency@cn.fujitsu.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Tue, 2016-01-19 at 15:17 +0800, Wen Congyang wrote: > We will have an consistent state when a CHECKPOINT_END record "a consistent ..." (and in the subject too). > is received. After the first CHECKPOINT_END record is received, > we will buffer all records until the next CHECKPOINT_END record > is received. So if the checkpoint() callback returns > XGR_CHECKPOINT_FAILOVER, > we only can do failover if ctx->restore.buffer_all_records is > true. > > Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> > --- Please can you get into the habit of writing a delta from the previous version here. e.g. in this case: v5: New patch. Putting it after the --- means it doesn't go into the actual commit ("git am" will strip it) but it is very useful for reviewers to know what changed in each iteration. See also http://wiki.xen.org/wiki/Submitting_Xen_Patches#Review.2C_Rinse_.26_Repeat > tools/libxc/xc_sr_restore.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/tools/libxc/xc_sr_restore.c b/tools/libxc/xc_sr_restore.c > index 05159bb..9fe2829 100644 > --- a/tools/libxc/xc_sr_restore.c > +++ b/tools/libxc/xc_sr_restore.c > @@ -493,7 +493,11 @@ static int handle_checkpoint(struct xc_sr_context > *ctx) > break; > > case XGR_CHECKPOINT_FAILOVER: > - rc = BROKEN_CHANNEL; > + if ( ctx->restore.buffer_all_records ) > + rc = BROKEN_CHANNEL; > + else > + /* We don't have an consistent state */ "a" not "an" again. I can s/an/a/ in all 3 places upon commit, so no need to resend for just those. Acked-by: Ian Campbell <ian.campbell@citrix.com> I'll give Andy a chance to comment before committing though. > + rc = -1; > goto err; > > default: /* Other fatal error */
On 19/01/16 10:48, Ian Campbell wrote: > On Tue, 2016-01-19 at 15:17 +0800, Wen Congyang wrote: >> We will have an consistent state when a CHECKPOINT_END record > "a consistent ..." (and in the subject too). > >> is received. After the first CHECKPOINT_END record is received, >> we will buffer all records until the next CHECKPOINT_END record >> is received. So if the checkpoint() callback returns >> XGR_CHECKPOINT_FAILOVER, >> we only can do failover if ctx->restore.buffer_all_records is >> true. >> >> Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> >> --- > Please can you get into the habit of writing a delta from the previous > version here. e.g. in this case: > > v5: New patch. > > Putting it after the --- means it doesn't go into the actual commit ("git > am" will strip it) but it is very useful for reviewers to know what changed > in each iteration. > > See also http://wiki.xen.org/wiki/Submitting_Xen_Patches#Review.2C_Rinse_.26_Repeat > >> tools/libxc/xc_sr_restore.c | 6 +++++- >> 1 file changed, 5 insertions(+), 1 deletion(-) >> >> diff --git a/tools/libxc/xc_sr_restore.c b/tools/libxc/xc_sr_restore.c >> index 05159bb..9fe2829 100644 >> --- a/tools/libxc/xc_sr_restore.c >> +++ b/tools/libxc/xc_sr_restore.c >> @@ -493,7 +493,11 @@ static int handle_checkpoint(struct xc_sr_context >> *ctx) >> break; >> >> case XGR_CHECKPOINT_FAILOVER: >> - rc = BROKEN_CHANNEL; >> + if ( ctx->restore.buffer_all_records ) >> + rc = BROKEN_CHANNEL; >> + else >> + /* We don't have an consistent state */ > "a" not "an" again. > > I can s/an/a/ in all 3 places upon commit, so no need to resend for just > those. > > Acked-by: Ian Campbell <ian.campbell@citrix.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>, with suggested corrections > > I'll give Andy a chance to comment before committing though. > >> + rc = -1; >> goto err; >> >> default: /* Other fatal error */
On 01/19/2016 06:48 PM, Ian Campbell wrote: > On Tue, 2016-01-19 at 15:17 +0800, Wen Congyang wrote: >> We will have an consistent state when a CHECKPOINT_END record > > "a consistent ..." (and in the subject too). > >> is received. After the first CHECKPOINT_END record is received, >> we will buffer all records until the next CHECKPOINT_END record >> is received. So if the checkpoint() callback returns >> XGR_CHECKPOINT_FAILOVER, >> we only can do failover if ctx->restore.buffer_all_records is >> true. >> >> Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> >> --- > > Please can you get into the habit of writing a delta from the previous > version here. e.g. in this case: > > v5: New patch. > > Putting it after the --- means it doesn't go into the actual commit ("git > am" will strip it) but it is very useful for reviewers to know what changed > in each iteration. > > See also http://wiki.xen.org/wiki/Submitting_Xen_Patches#Review.2C_Rinse_.26_Repeat > >> tools/libxc/xc_sr_restore.c | 6 +++++- >> 1 file changed, 5 insertions(+), 1 deletion(-) >> >> diff --git a/tools/libxc/xc_sr_restore.c b/tools/libxc/xc_sr_restore.c >> index 05159bb..9fe2829 100644 >> --- a/tools/libxc/xc_sr_restore.c >> +++ b/tools/libxc/xc_sr_restore.c >> @@ -493,7 +493,11 @@ static int handle_checkpoint(struct xc_sr_context >> *ctx) >> break; >> >> case XGR_CHECKPOINT_FAILOVER: >> - rc = BROKEN_CHANNEL; >> + if ( ctx->restore.buffer_all_records ) >> + rc = BROKEN_CHANNEL; >> + else >> + /* We don't have an consistent state */ > > "a" not "an" again. > > I can s/an/a/ in all 3 places upon commit, so no need to resend for just > those. OK, thanks for your help Wen Congyang > > Acked-by: Ian Campbell <ian.campbell@citrix.com> > > I'll give Andy a chance to comment before committing though. > >> + rc = -1; >> goto err; >> >> default: /* Other fatal error */ > > > . >
diff --git a/tools/libxc/xc_sr_restore.c b/tools/libxc/xc_sr_restore.c index 05159bb..9fe2829 100644 --- a/tools/libxc/xc_sr_restore.c +++ b/tools/libxc/xc_sr_restore.c @@ -493,7 +493,11 @@ static int handle_checkpoint(struct xc_sr_context *ctx) break; case XGR_CHECKPOINT_FAILOVER: - rc = BROKEN_CHANNEL; + if ( ctx->restore.buffer_all_records ) + rc = BROKEN_CHANNEL; + else + /* We don't have an consistent state */ + rc = -1; goto err; default: /* Other fatal error */
We will have an consistent state when a CHECKPOINT_END record is received. After the first CHECKPOINT_END record is received, we will buffer all records until the next CHECKPOINT_END record is received. So if the checkpoint() callback returns XGR_CHECKPOINT_FAILOVER, we only can do failover if ctx->restore.buffer_all_records is true. Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> --- tools/libxc/xc_sr_restore.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)