From: Chen Gang <gang.chen@asianux.com>
To: Jeff Layton <jlayton@redhat.com>
Cc: "Myklebust, Trond" <Trond.Myklebust@netapp.com>,
"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [Bug fix] nfs-client: fix nfs_inode_attrs_need_update for async read_done comes during truncating to smaller size
Date: Wed, 17 Oct 2012 09:37:52 +0800 [thread overview]
Message-ID: <507E0BF0.7050207@asianux.com> (raw)
In-Reply-To: <20121016081320.74fccc5b@tlielax.poochiereds.net>
于 2012年10月16日 20:13, Jeff Layton 写道:
>>
>> 2) but, are we truly no ways to solve this issue ? (I do not think so).
>>
>
> Not that I see, but don't let me stop you from trying to find one. ;)
>
we can divide the issue to 2 separate parts:
1) the inconsistent attribute by time delay between client and server:
A) it is the nfs v2/v3 design issue, the "user" can understand (not
implementation mistake)
B) we need make the time delay as shorter as we can. (this is the
reason why I call it "performance", although this "word" is still not
quit suitable)
C) "user" can understand, not mean can bear (such as skipping writing
operation attribute changes)
2) the inconsistent attribute by a client itself:
A) it is implementation issue, the "user" can not understand (it is
an implementation mistake)
B) we need solve it (so I call it "correctness" issue).
C) "user" can not understand, not mean can not bear (such as current
issue which I report)
at last, for maintainer:
A) for "performance", we need try our best to do;
B) for "correctness", we need fix it completely;
>> 3) I think an executable way (but maybe not a good way) is :
>>
>> A) for each client, check each task id of the client its own (such as
>> rpc task xid), so can know the order of tasks of the client its own.
>>
>
> We do something like this already. That's what the gencount thing is
> all about. It's still possible though to fool that check if two calls
> are scheduled closely enough.
>
1) I think gencount is not equal to sequence number, the sequence number
can mark all relative tasks of one client in order.
2) I also think, it is not quite complex to make a client itself in
consistency. (it is implementation issue, not design issue)
> Also note that it's not just the reordering of replies that you have to
> concern yourself with. The requests themselves can be reordered on the
> network. The server is also under no obligation to execute calls in the
> order received.
>
1) I agree with you, in nfs_inode_attrs_need_update(), it need consider
this situation (the tasks from server return is not in order).
2) I do not think it can not be accomplished if the tasks of client
itself have sequence number. (maybe, it would be enough to only judge
which task is later between the 2 tasks by sequence number).
>> B) maybe also need another some synchronization code, but I think it
>> does not have much negative effect with performance.
>>
>
> Yeah, serializing things to fix this is probably a non-starter. NFSv2
> and UDP transports are basically legacy code at this point, so there's
> not a lot of incentive to do anything drastic here.
>
1) I agree with what you said above, but maybe you misunderstand of what
I said for the "item B)"
2) the "item B)" is for the completion of "item A)". when we fix this
issue, maybe have to add additional synchronization code which maybe can
cause negative effect with performance, but I think it is not much
("user" can bear).
At last, I suggest we need think of how to fix this implementation bug
in nfs-client region.
--
Chen Gang
Asianux Corporation
prev parent reply other threads:[~2012-10-17 1:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-15 2:12 [Bug fix] nfs-client: fix nfs_inode_attrs_need_update for async read_done comes during truncating to smaller size Chen Gang
2012-10-15 4:27 ` Myklebust, Trond
2012-10-15 4:52 ` Chen Gang
2012-10-15 5:39 ` Chen Gang
2012-10-15 12:32 ` Myklebust, Trond
2012-10-16 1:37 ` Chen Gang
2012-10-16 2:51 ` Myklebust, Trond
2012-10-16 4:13 ` Chen Gang
2012-10-16 10:33 ` Jeff Layton
2012-10-16 11:44 ` Chen Gang
2012-10-16 12:13 ` Jeff Layton
2012-10-17 1:37 ` Chen Gang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=507E0BF0.7050207@asianux.com \
--to=gang.chen@asianux.com \
--cc=Trond.Myklebust@netapp.com \
--cc=jlayton@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox