The first question I asked myself when I started thinking about your post is
the same one you should be asking - what is your ERESOURCE protecting.
While there are some rare circumstances when I’ve done thread-to-thread I/O
handoffs of lock ownership.
So, is the ERESOURCE protecting the queue or is it protecting the request
structure? If it is protecting the queue, you only need to hold it around
queue/dequeue operations. If it protects the request, you only need to hold
it while using/modifying the request. This latter case would make more
sense in the scheme you describe, but then I don’t think you need the
ERESOURCE at all - the request is a token, and only the owner of the token
can modify it.
I hope this makes sense.
Regards,
Tony
Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com
-----Original Message-----
From: Jagannath Krishnan [mailto:xxxxx@hotmail.com]
Sent: Tuesday, March 04, 2003 2:20 PM
To: File Systems Developers
Subject: [ntfsd] RE: ERESOURCE
Thanks Tony!
The scheme I was trying to describe is a little different. I’ll use your
method to describe it.
Enter File System (Disabling APCs)
Acquire ERESOURCE
Deque Request1, send chunk 1 of request 1, enque request1
Exit File System (enabling APCs)
return
Enter File System (Disabling APCs)
Deque Request1, Process reply of chunk1, send chunk 2 of request 1, enque
request1
Exit File System (enabling APCs)
return
.
.
.
Enter File System (Disabling APCs)
Deque Request1, process reply of n-1, send chunk n of request 1, enque
request1
Exit File System (enabling APCs)
return
Enter File System (Disabling APCs)
Deque Request1, process reply of chunk n
Release ERESOURCE
Exit File System (enabling APCs)
return
Ofcourse beween any two steps, a chunk of some entirely different request
can be sent.
In an earlier posting on this list last month, you have described how APCs
need to be disabled when the resource is acquired, to prevent deadlocks.
In the above scheme, APCs are enabled just before exiting file system
code. The resource is held across multiple invocations of the FS code till
an entire request completes. Will this still result in deadlock? Is it not
advisable for some other reason?
Im also concerned that I have to hold the resource for so long. Is there
any other, more standard way to provide atomicity of operations in remote
file systems? I notice that in SMBMRX in the IFS toolkit they dont seem to
use ERESOURCE objects.
Thanks again for your prompt reply!
Jagannath
You are currently subscribed to ntfsd as: xxxxx@osr.com
To unsubscribe send a blank email to xxxxx@lists.osr.com