2002-11-19 17:59:46

by Juan Gomez

[permalink] [raw]
Subject: Re: [NFS] Re: Non-blocking lock requests during the grace period





Mike,

I agree with the F_GETLK part, as I pointed out to Trond earlier. However,
I feel it is odd to block a client for about one minutre when it issues
"non-blocking" lock requests. I have seen that Solaris code does so but
still feels odd and it may conflict with what most programmers expect,
though I see your point, perhaps if this was well documented in man pages
there would not be a problem. In Linux this is not the case.


Juan





|---------+---------------------------->
| | [email protected]|
| | om |
| | Sent by: |
| | [email protected]|
| | .sun.com |
| | |
| | |
| | 11/18/02 05:04 PM|
| | |
|---------+---------------------------->
>-------------------------------------------------------------------------------------------------------------------------|
| |
| To: [email protected] |
| cc: Juan Gomez/Almaden/IBM@IBMUS, [email protected], [email protected] |
| Subject: Re: [NFS] Re: Non-blocking lock requests during the grace period |
| |
| |
>-------------------------------------------------------------------------------------------------------------------------|



>>>>> "Trond" == Trond Myklebust <[email protected]> writes:

>>>>> " " == Juan Gomez <[email protected]> writes:

>> (note that F_GETLK man page does not provide EAGAIN as a
>> possible error code).

F_GETLK indicates a conflict by changing the arg struct to show the
conflicting lock.

As for the original topic, I would hesitate before changing the client
locking code to return EAGAIN just because the server is in its grace
period. The "blocking" or "non-blocking" behavior is tied to what
happens when there is already a lock that conflicts with the requested
one. When the server is in the grace period, it's unknown as to
whether there is already a lock that conflicts with the requested
one.

Mike Kupfer [email protected]
Solaris File Sharing Speaking for myself,
not for Sun.






2002-11-20 18:18:35

by Mike Kupfer

[permalink] [raw]
Subject: Re: [NFS] Re: Non-blocking lock requests during the grace period

>>>>> "Juan" == Juan Gomez <[email protected]> writes:

Juan> However, I feel it is odd to block a client for about one
Juan> minutre when it issues "non-blocking" lock requests.

But if the server goes down, the call can end up blocking for
significantly longer than one minute anyway.

Juan> I have seen that Solaris code does so but still feels odd
Juan> and it may conflict with what most programmers expect

Perhaps, but there are other expectations to keep in mind. In
particular, when using NFS, the expectation (at least with hard
mounts) is that when the server goes down, the application will simply
wait until the server comes back. Your change would conflict with
that expectation.

Mike Kupfer [email protected]
Solaris File Sharing Speaking for myself, not for Sun.