summaryrefslogtreecommitdiffstats
path: root/fs/orangefs/waitqueue.c
Commit message (Collapse)AuthorAgeFilesLines
* Orangefs: improve gossip statementsMike Marshall2016-03-031-10/+23
| | | | Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* Orangefs: code sanitation.Mike Marshall2016-02-261-14/+30
| | | | Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* Orangefs: code sanitationMike Marshall2016-02-241-10/+25
| | | | Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: have ..._clean_interrupted_...() wait for copy to/from daemonAl Viro2016-02-191-12/+10
| | | | | | | | | | | | | | | | | | * turn all those list_del(&op->list) into list_del_init() * don't pick ops that are already given up in control device ->read()/->write_iter(). * have orangefs_clean_interrupted_operation() notice if op is currently being copied to/from daemon (by said ->read()/->write_iter()) and wait for that to finish. * when we are done copying to/from daemon and find that it had been given up while we were doing that, wake the waiting ..._clean_interrupted_... As the result, we are guaranteed that orangefs_clean_interrupted_operation(op) doesn't return until nobody else can see op. Moreover, we don't need to play with op refcounts anymore. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* Orangefs: remove vestigial ASYNC codeMike Marshall2016-02-191-7/+0
| | | | Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* Orangefs: make some gossip statements more helpful.Mike Marshall2016-02-191-4/+10
| | | | Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: bufmap rewriteAl Viro2016-02-191-61/+0
| | | | | | | | | | | | | | | | | | | | | 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>
* orangefs: lift handling of timeouts and attempts count to service_operation()Al Viro2016-02-191-25/+21
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* service_operation(): don't block signals, just use ..._killableAl Viro2016-02-191-15/+14
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: sanitize handling of request listAl Viro2016-02-191-50/+18
| | | | | | | | | | | | | | * checking that daemon is running (to decide whether we want to limit the timeout) should be done *after* the damn thing is included into the list; doing that before means that if the daemon gets shut down in between, we'll end up waiting indefinitely (== up to kill -9). * cancels should go into the head of the queue - the sooner they are picked, the less work daemon has to do and the sooner we get to free the slot held by aborted operation. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: get rid of loop in wait_for_matching_downcall()Al Viro2016-02-191-84/+45
| | | | | | | turn op->waitq into struct completion... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: delay freeing slot until cancel completesAl Viro2016-02-191-93/+40
| | | | | | | | | | | | | | | Make cancels reuse the aborted read/write op, to make sure they do not fail on lack of memory. Don't issue a cancel unless the daemon has seen our read/write, has not replied and isn't being shut down. If cancel *is* issued, don't wait for it to complete; stash the slot in there and just have it freed when cancel is finally replied to or purged (and delay dropping the reference until then, obviously). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* Orangefs: added a couple of WARN_ONs, perhaps just temporarily.Mike Marshall2016-02-041-0/+1
| | | | Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: get rid of MSECS_TO_JIFFIESAl Viro2016-01-231-6/+4
| | | | | | | | | All timeouts are in _seconds_, so all calls are of form MSECS_TO_JIFFIES(n * 1000), which is a convoluted way to spell n * HZ. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs_clean_up_interrupted_operation: call with op->lock heldAl Viro2016-01-231-32/+4
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: reduce nesting in wait_for_matching_downcall()Al Viro2016-01-231-60/+58
| | | | | | | reorder if branches... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: remove cargo-culting spin_lock_irqsave() in service_operation()Al Viro2016-01-231-7/+0
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: hopefully saner op refcounting and lockingAl Viro2016-01-231-20/+4
| | | | | | | | | | | | | | | | | | * create with refcount 1 * make op_release() decrement and free if zero (i.e. old put_op() has become that). * mark when submitter has given up waiting; from that point nobody else can move between the lists, change state, etc. * have daemon read/write_iter grab a reference when picking op and *always* give it up in the end * don't put into hash until we know it's been successfully passed to daemon * move op->lock _lower_ than htab_in_progress_lock (and make sure to take it in purge_inprogress_ops()) Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: make wait_for_...downcall() staticAl Viro2016-01-231-0/+3
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: move wakeups into set_op_state_{serviced,purged}()Al Viro2016-01-231-1/+0
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: make wait_for_...downcall() staticAl Viro2016-01-231-2/+2
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* make orangefs_clean_up_interrupted_operation() staticAl Viro2016-01-231-1/+1
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: get rid of <censored> macrosAl Viro2016-01-231-0/+44
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: Fix some more global namespace pollution.Martin Brandenburg2016-01-041-4/+4
| | | | | | | This only changes the names of things, so there is no functional change. Signed-off-by: Martin Brandenburg <martin@omnibond.com> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* orangefs: Don't pollute global namespaceRichard Weinberger2016-01-041-3/+3
| | | | | | | | | | | Prefix public functions with "orangefs_" do don't pollute the global namespace. This fixes a build issue on UML which also has block_signals(). Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Martin Brandenburg <martin@omnibond.com> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* Orangefs: Don't wait the old-fashioned way.Mike Marshall2015-12-141-26/+11
| | | | | | | Get rid of add_wait_queue, set_current_state, etc, and use the wait_event() model. Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* Orangefs: change pvfs2 filenames to orangefsMike Marshall2015-12-041-2/+2
| | | | | | | Also changed references within source files that referred to header files whose names had changed. Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* OrangeFS: Change almost all instances of the string PVFS2 to OrangeFS.Yi Liu2015-12-031-35/+35
| | | | | | | | | | | | | | | | | | | | | | OrangeFS was formerly known as PVFS2 and retains the name in many places. I leave the device /dev/pvfs2-req since this affects userspace. I leave the filesystem type pvfs2 since this affects userspace. Further the OrangeFS sysint library reads fstab for an entry of type pvfs2 independently of kernel mounts. I leave extended attribute keys user.pvfs2 and system.pvfs2 as the sysint library understands these. I leave references to userspace binaries still named pvfs2. I leave the filenames. Signed-off-by: Yi Liu <yi9@clemson.edu> [martin@omnibond.com: clairify above constraints and merge] Signed-off-by: Martin Brandenburg <martin@omnibond.com> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* Orangefs: update signal blocking code before Oleg sees it.Mike Marshall2015-10-031-3/+3
| | | | Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* Orangefs: sooth most sparse complaintsMike Marshall2015-10-031-0/+7
| | | | Signed-off-by: Mike Marshall <hubcap@omnibond.com>
* Orangefs: kernel client part 5Mike Marshall2015-10-031-0/+522
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
OpenPOWER on IntegriCloud