[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [win-pv-devel] [PATCH 1/3] Read backend features and disk info before setting Connected
> -----Original Message----- > From: win-pv-devel [mailto:win-pv-devel-bounces@xxxxxxxxxxxxxxxxxxxx] On > Behalf Of owen.smith@xxxxxxxxxx > Sent: 21 November 2016 15:28 > To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx > Cc: Owen Smith <owen.smith@xxxxxxxxxx> > Subject: [win-pv-devel] [PATCH 1/3] Read backend features and disk info > before setting Connected > > From: Owen Smith <owen.smith@xxxxxxxxxx> > > Setting connected should be the last step of the connection > state transitions. > > Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx> I'm not sure it actually makes much difference what order things happen in given that there doesn't seem to be an error path which would prevent the frontend from going connected. But I agree that it makes the code look more sensible. Acked-by: Paul Durrant <paul.durrant@xxxxxxxxxx> > --- > src/xenvbd/frontend.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/src/xenvbd/frontend.c b/src/xenvbd/frontend.c > index 1aec99e..b1fa1a9 100644 > --- a/src/xenvbd/frontend.c > +++ b/src/xenvbd/frontend.c > @@ -1121,11 +1121,6 @@ abort: > if (BackendState != XenbusStateConnected) > goto fail7; > > - // Frontend: -> CONNECTED > - Status = ___SetState(Frontend, XenbusStateConnected); > - if (!NT_SUCCESS(Status)) > - goto fail8; > - > // read disk info > __ReadDiskInfo(Frontend); > FrontendReadDiskInfo(Frontend); > @@ -1133,6 +1128,11 @@ abort: > // blkback doesnt write features before InitWait, blkback writes features > before Connected! > FrontendReadFeatures(Frontend); > > + // Frontend: -> CONNECTED > + Status = ___SetState(Frontend, XenbusStateConnected); > + if (!NT_SUCCESS(Status)) > + goto fail8; > + > return STATUS_SUCCESS; > > fail8: > -- > 2.8.3 > > > _______________________________________________ > win-pv-devel mailing list > win-pv-devel@xxxxxxxxxxxxxxxxxxxx > https://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel _______________________________________________ win-pv-devel mailing list win-pv-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |