* [PATCH] Do not skip records with nonblocking connections
@ 2011-06-05 15:43 Steve Dickson
2011-06-05 22:57 ` [Libtirpc-devel] " Chuck Lever
0 siblings, 1 reply; 3+ messages in thread
From: Steve Dickson @ 2011-06-05 15:43 UTC (permalink / raw)
To: Libtirpc Devel List; +Cc: Linux NFS Mailing List
With non-blocking connections, do not skip records when receiving
the streams since entire value messages can be ignored which
in cause the entire stream to become out of sync.
For example, two mounts simultaneously send two unmaps
commands. The first one is read, then the second thrown
away due to skipping the record. Skipping this record
will cause XDR error later in processing of the stream.
Signed-off-by: Steve Dickson <steved@redhat.com>
---
src/svc_vc.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/src/svc_vc.c b/src/svc_vc.c
index aaaf2d7..15dac18 100644
--- a/src/svc_vc.c
+++ b/src/svc_vc.c
@@ -610,6 +610,11 @@ svc_vc_recv(xprt, msg)
}
xdrs->x_op = XDR_DECODE;
+ /*
+ * No need skip records with nonblocking connections
+ */
+ if (cd->nonblock == FALSE)
+ (void)xdrrec_skiprecord(xdrs);
(void)xdrrec_skiprecord(xdrs);
if (xdr_callmsg(xdrs, msg)) {
cd->x_id = msg->rm_xid;
--
1.7.4.4
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [Libtirpc-devel] [PATCH] Do not skip records with nonblocking connections
2011-06-05 15:43 [PATCH] Do not skip records with nonblocking connections Steve Dickson
@ 2011-06-05 22:57 ` Chuck Lever
2011-06-05 23:51 ` Steve Dickson
0 siblings, 1 reply; 3+ messages in thread
From: Chuck Lever @ 2011-06-05 22:57 UTC (permalink / raw)
To: Steve Dickson; +Cc: Libtirpc Devel List, Linux NFS Mailing List
Sent from my iPad
On Jun 5, 2011, at 11:43 AM, Steve Dickson <steved@redhat.com> wrote:
> With non-blocking connections, do not skip records when receiving
> the streams since entire value messages can be ignored which
> in cause the entire stream to become out of sync.
>
> For example, two mounts simultaneously send two unmaps
> commands. The first one is read, then the second thrown
> away due to skipping the record. Skipping this record
> will cause XDR error later in processing of the stream.
>
> Signed-off-by: Steve Dickson <steved@redhat.com>
> ---
> src/svc_vc.c | 5 +++++
> 1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/src/svc_vc.c b/src/svc_vc.c
> index aaaf2d7..15dac18 100644
> --- a/src/svc_vc.c
> +++ b/src/svc_vc.c
> @@ -610,6 +610,11 @@ svc_vc_recv(xprt, msg)
> }
>
> xdrs->x_op = XDR_DECODE;
> + /*
> + * No need skip records with nonblocking connections
> + */
> + if (cd->nonblock == FALSE)
> + (void)xdrrec_skiprecord(xdrs);
> (void)xdrrec_skiprecord(xdrs);
Do you want to delete the unconditional invocation of xdrrec_skiprecord() here?
> if (xdr_callmsg(xdrs, msg)) {
> cd->x_id = msg->rm_xid;
> --
> 1.7.4.4
>
>
> ------------------------------------------------------------------------------
> Simplify data backup and recovery for your virtual environment with vRanger.
> Installation's a snap, and flexible recovery options mean your data is safe,
> secure and there when you need it. Discover what all the cheering's about.
> Get your free trial download today.
> http://p.sf.net/sfu/quest-dev2dev2
> _______________________________________________
> Libtirpc-devel mailing list
> Libtirpc-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/libtirpc-devel
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [Libtirpc-devel] [PATCH] Do not skip records with nonblocking connections
2011-06-05 22:57 ` [Libtirpc-devel] " Chuck Lever
@ 2011-06-05 23:51 ` Steve Dickson
0 siblings, 0 replies; 3+ messages in thread
From: Steve Dickson @ 2011-06-05 23:51 UTC (permalink / raw)
To: Chuck Lever; +Cc: Libtirpc Devel List, Linux NFS Mailing List
On 06/05/2011 06:57 PM, Chuck Lever wrote:
>
>
> Sent from my iPad
>
> On Jun 5, 2011, at 11:43 AM, Steve Dickson <steved@redhat.com> wrote:
>
>> With non-blocking connections, do not skip records when receiving
>> the streams since entire value messages can be ignored which
>> in cause the entire stream to become out of sync.
>>
>> For example, two mounts simultaneously send two unmaps
>> commands. The first one is read, then the second thrown
>> away due to skipping the record. Skipping this record
>> will cause XDR error later in processing of the stream.
>>
>> Signed-off-by: Steve Dickson <steved@redhat.com>
>> ---
>> src/svc_vc.c | 5 +++++
>> 1 files changed, 5 insertions(+), 0 deletions(-)
>>
>> diff --git a/src/svc_vc.c b/src/svc_vc.c
>> index aaaf2d7..15dac18 100644
>> --- a/src/svc_vc.c
>> +++ b/src/svc_vc.c
>> @@ -610,6 +610,11 @@ svc_vc_recv(xprt, msg)
>> }
>>
>> xdrs->x_op = XDR_DECODE;
>> + /*
>> + * No need skip records with nonblocking connections
>> + */
>> + if (cd->nonblock == FALSE)
>> + (void)xdrrec_skiprecord(xdrs);
>> (void)xdrrec_skiprecord(xdrs);
>
> Do you want to delete the unconditional invocation of xdrrec_skiprecord() here?
Yes I do... a small cut/past error... good catch!
steved.
>
>> if (xdr_callmsg(xdrs, msg)) {
>> cd->x_id = msg->rm_xid;
>> --
>> 1.7.4.4
>>
>>
>> ------------------------------------------------------------------------------
>> Simplify data backup and recovery for your virtual environment with vRanger.
>> Installation's a snap, and flexible recovery options mean your data is safe,
>> secure and there when you need it. Discover what all the cheering's about.
>> Get your free trial download today.
>> http://p.sf.net/sfu/quest-dev2dev2
>> _______________________________________________
>> Libtirpc-devel mailing list
>> Libtirpc-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/libtirpc-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-06-05 23:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-05 15:43 [PATCH] Do not skip records with nonblocking connections Steve Dickson
2011-06-05 22:57 ` [Libtirpc-devel] " Chuck Lever
2011-06-05 23:51 ` Steve Dickson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).