diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2016-02-13 21:01:21 -0500 |
---|---|---|
committer | Mike Marshall <hubcap@omnibond.com> | 2016-02-19 13:45:54 -0500 |
commit | ea2c9c9f6574e835cbc903c94b82b5a34a334866 (patch) | |
tree | 47637785f81f2e7edb746de19a7b1a3c6ccd9627 /fs/orangefs/waitqueue.c | |
parent | 178041848a6e7072cc6ebc1c6c7763e33f564722 (diff) |
orangefs: bufmap rewrite
new waiting-for-slot logics:
* make request for slot wait for bufmap to be set up if it
comes before it's installed *OR* while it's running down
* make closing control device wait for all slots to be freed
* waiting itself rewritten to (open-coded) analogues of wait_event_...
primitives - we would need wait_event_locked() and, pardon an obscenely
long name, wait_event_interruptible_exclusive_timeout_locked().
* we never wait for more than slot_timeout_secs in total and,
if during the wait the daemon goes away, we only allow
ORANGEFS_BUFMAP_WAIT_TIMEOUT_SECS for it to come back.
* (cosmetical) bitmap is used instead of an array of zeroes and ones
* old (and only reached if we are about to corrupt memory) waiting
for daemon restart in service_operation() removed.
[Martin's fixes folded]
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
Diffstat (limited to 'fs/orangefs/waitqueue.c')
-rw-r--r-- | fs/orangefs/waitqueue.c | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/fs/orangefs/waitqueue.c b/fs/orangefs/waitqueue.c index 378cdcf43252..36eedd6a8335 100644 --- a/fs/orangefs/waitqueue.c +++ b/fs/orangefs/waitqueue.c @@ -155,67 +155,6 @@ retry_servicing: * system */ goto retry_servicing; - - /* op uses shared memory */ - if (orangefs_get_bufmap_init() == 0) { - WARN_ON(1); - /* - * This operation uses the shared memory system AND - * the system is not yet ready. This situation occurs - * when the client-core is restarted AND there were - * operations waiting to be processed or were already - * in process. - */ - gossip_debug(GOSSIP_WAIT_DEBUG, - "uses_shared_memory is true.\n"); - gossip_debug(GOSSIP_WAIT_DEBUG, - "Client core in-service status(%d).\n", - is_daemon_in_service()); - gossip_debug(GOSSIP_WAIT_DEBUG, "bufmap_init:%d.\n", - orangefs_get_bufmap_init()); - gossip_debug(GOSSIP_WAIT_DEBUG, - "operation's status is 0x%0x.\n", - op->op_state); - - /* - * let process sleep for a few seconds so shared - * memory system can be initialized. - */ - prepare_to_wait(&orangefs_bufmap_init_waitq, - &wait_entry, - TASK_INTERRUPTIBLE); - - /* - * Wait for orangefs_bufmap_initialize() to wake me up - * within the allotted time. - */ - ret = schedule_timeout( - ORANGEFS_BUFMAP_WAIT_TIMEOUT_SECS * HZ); - - gossip_debug(GOSSIP_WAIT_DEBUG, - "Value returned from schedule_timeout:" - "%d.\n", - ret); - gossip_debug(GOSSIP_WAIT_DEBUG, - "Is shared memory available? (%d).\n", - orangefs_get_bufmap_init()); - - finish_wait(&orangefs_bufmap_init_waitq, &wait_entry); - - if (orangefs_get_bufmap_init() == 0) { - gossip_err("%s:The shared memory system has not started in %d seconds after the client core restarted. Aborting user's request(%s).\n", - __func__, - ORANGEFS_BUFMAP_WAIT_TIMEOUT_SECS, - get_opname_string(op)); - return -EIO; - } - - /* - * Return to the calling function and re-populate a - * shared memory buffer. - */ - return -EAGAIN; - } } out: |