mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: [NFS] Re: Non-blocking lock requests during the grace period
@ 2002-11-19 18:06 Juan Gomez
  2002-11-20 18:23 ` Mike Kupfer
  0 siblings, 1 reply; 3+ messages in thread
From: Juan Gomez @ 2002-11-19 18:06 UTC (permalink / raw)
  To: mike.kupfer; +Cc: kupfer, linux-kernel, nfs, trond.myklebust





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





|---------+---------------------------->
|         |           mike.kupfer@sun.c|
|         |           om               |
|         |           Sent by:         |
|         |           kupfer@athyra.eng|
|         |           .sun.com         |
|         |                            |
|         |                            |
|         |           11/18/02 05:04 PM|
|         |                            |
|---------+---------------------------->
  >-------------------------------------------------------------------------------------------------------------------------|
  |                                                                                                                         |
  |       To:       trond.myklebust@fys.uio.no                                                                              |
  |       cc:       Juan Gomez/Almaden/IBM@IBMUS, linux-kernel@vger.kernel.org, nfs@lists.sourceforge.net                   |
  |       Subject:  Re: [NFS] Re: Non-blocking lock requests during the grace period                                        |
  |                                                                                                                         |
  |                                                                                                                         |
  >-------------------------------------------------------------------------------------------------------------------------|



>>>>> "Trond" == Trond Myklebust <trond.myklebust@fys.uio.no> writes:

>>>>> " " == Juan Gomez <juang@us.ibm.com> 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                                            mike.kupfer@sun.com
Solaris File Sharing                                   Speaking for myself,
not for Sun.






^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [NFS] Re: Non-blocking lock requests during the grace period
  2002-11-19 18:06 [NFS] Re: Non-blocking lock requests during the grace period Juan Gomez
@ 2002-11-20 18:23 ` Mike Kupfer
  0 siblings, 0 replies; 3+ messages in thread
From: Mike Kupfer @ 2002-11-20 18:23 UTC (permalink / raw)
  To: Juan Gomez; +Cc: linux-kernel, nfs, trond.myklebust

>>>>> "Juan" == Juan Gomez <juang@us.ibm.com> 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				mike.kupfer@sun.com
Solaris File Sharing			Speaking for myself, not for Sun.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [NFS] Re: Non-blocking lock requests during the grace period
  2002-11-15 20:01 Trond Myklebust
@ 2002-11-19  1:04 ` mike.kupfer
  0 siblings, 0 replies; 3+ messages in thread
From: mike.kupfer @ 2002-11-19  1:04 UTC (permalink / raw)
  To: trond.myklebust; +Cc: Juan Gomez, linux-kernel, nfs

>>>>> "Trond" == Trond Myklebust <trond.myklebust@fys.uio.no> writes:

>>>>> " " == Juan Gomez <juang@us.ibm.com> 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				mike.kupfer@sun.com
Solaris File Sharing			Speaking for myself, not for Sun.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-11-20 18:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-19 18:06 [NFS] Re: Non-blocking lock requests during the grace period Juan Gomez
2002-11-20 18:23 ` Mike Kupfer
  -- strict thread matches above, loose matches on Subject: below --
2002-11-15 20:01 Trond Myklebust
2002-11-19  1:04 ` [NFS] " mike.kupfer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®