summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* drbd: Disallow the peer_disk_state to be D_OUTDATED while connectedPhilipp Reisner2011-05-241-0/+3
| | | | | Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: Fix for the connection problems on high latency linksPhilipp Reisner2011-05-241-1/+1
| | | | | | | | | | It seems that the real cause of all the issues where that we did not noticed in drbd_try_connect() when the other guy closes one socket if the round trip time gets higher than 100ms. There were that 100ms hard coded! Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: fix potential activity log refcount imbalance in error pathLars Ellenberg2011-05-241-1/+1
| | | | | | | | | It is no longer sufficient to trigger on local WRITE, we need to check on (rq_state & RQ_IN_ACT_LOG) before calling drbd_al_complete_io also in the error path. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: Only downgrade the disk state in case of disk failuresPhilipp Reisner2011-05-241-1/+2
| | | | | Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: fix disconnect/reconnect loop, if ping-timeout == ping-intLars Ellenberg2011-05-241-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | If there is no replication traffic within the idle timeout (ping-int seconds), DRBD will send a P_PING, and adjust the timeout to ping-timeout. If there is no P_PING_ACK received within this ping-timeout, DRBD finally drops the connection, and tries to re-establish it. To decide which timeout was active, we compared the current timeout with the ping-timeout, and dropped the connection, if that was the case. By default, ping-int is 10 seconds, ping-timeout is 500 ms. Unfortunately, if you configure ping-timeout to be the same as ping-int, expiry of the idle-timeout had been mistaken for a missing ping ack, and caused an immediate reconnection attempt. Fix: Allow both timeouts to be equal, use a local variable to store which timeout is active. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: fix potential distributed deadlockLars Ellenberg2011-05-241-35/+59
| | | | | | | | | | | | | | | | | | We limit ourselves to a configurable maximum number of pages used as temporary bio pages. If the configured "max_buffers" is not big enough to match the bandwidth of the respective deployment, a distributed deadlock could be triggered by e.g. fast online verify and heavy application IO. TCP connections would block on congestion, because both receivers would wait on pages to become available. Fortunately the respective senders in this case would be able to give back some pages already. So do that. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* lru_cache.h: fix comments referring to ts_ instead of lc_Lars Ellenberg2011-05-241-6/+6
| | | | | | | | | | For some time we contemplated calling the "struct lru_cache" a "struct tracked_set", and some comments kept the ts_ prefix. Fix those to match the member field names. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: Fix for application IO with the on-io-error=pass-on policyPhilipp Reisner2011-05-242-0/+5
| | | | | | | | | | | | | | | | | In case a write failes on the local disk, go into D_INCONSISTENT disk state. That causes future reads of that block to be shipped to the peer. Read retry remote was already in place. Actually the documentation needs to get fixed now. Since the application is still shielded from the error. (as long as we have only a single disk failing) The difference to detach is that we keep the disk. And therefore might keep all the other, still working sectors up to date. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* Merge branches 'for-jens/xen-backend-fixes' and 'for-jens/xen-blkback-v3.3' ↵Jens Axboe2011-05-196-0/+1850
|\ | | | | | | of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen into for-2.6.40/drivers
| * xen/blkback: don't fail empty barrier requestsJan Beulich2011-05-181-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The sector number on empty barrier requests may (will?) be -1, which, given that it's being treated as unsigned 64-bit quantity, will almost always exceed the actual (virtual) disk's size. Inspired by Konrad's "When writting barriers set the sector number to zero...". While at it also add overflow checking to the math in vbd_translate(). Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
| * xen/blkback: fix xenbus_transaction_start() hang caused by double ↵Laszlo Ersek2011-05-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | xenbus_transaction_end() vbd_resize() up_read()'s xs_state.suspend_mutex twice in a row via double xenbus_transaction_end() calls. The next down_read() in xenbus_transaction_start() (at eg. the next resize attempt) hangs. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=618317 Acked-by: Jan Beulich <jbeulich@novell.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
| * xen/blkback: Align the tabs on the structure.Konrad Rzeszutek Wilk2011-05-121-1/+1
| | | | | | | | | | | | The recent changes caused this field of the structure to be offset a bit. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
| * xen/blkback: if log_stats is enabled print out the data.Konrad Rzeszutek Wilk2011-05-121-1/+1
| | | | | | | | | | And not depend on the driver being built with -DDEBUG flag. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
| * xen/blkback: Add the prefix XEN in the common.h.Konrad Rzeszutek Wilk2011-05-121-3/+3
| | | | | | | | Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
| * xen/blkback: Prefix 'vbd' with 'xen' in structs and functions.Konrad Rzeszutek Wilk2011-05-123-29/+29
| | | | | | | | Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
| * xen/blkback: Change structure name blkif_st to xen_blkif.Konrad Rzeszutek Wilk2011-05-123-27/+27
| | | | | | | | | | | | No need for that '_st' and xen_blkif is more apt. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
| * xen/blkback: Remove the unused typedefs.Konrad Rzeszutek Wilk2011-05-121-4/+0
| | | | | | | | Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
| * xen/blkback: Move include/xen/blkif.h into drivers/block/xen-blkback/common.hKonrad Rzeszutek Wilk2011-05-122-96/+71
| | | | | | | | | | Not point of the blkif.h file. It is not used by the frontend. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
| * xen/blkback: Fixing some more of the cleanpatch.pl warnings.Konrad Rzeszutek Wilk2011-05-122-3/+3
| | | | | | | | Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
| * xen/blkback: Checkpatch.pl recommend against multiple assigments.Konrad Rzeszutek Wilk2011-05-122-5/+10
| | | | | | | | | | | | CHECK: multiple assignments should be avoided Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
| * xen/blkback: Fix checkpatch.pl warnings about more than 80 lines.Konrad Rzeszutek Wilk2011-05-121-3/+6
| | | | | | | | | | | | Break up the macro usage. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
| * xen/blkback: Flesh out the description in the Kconfig.Konrad Rzeszutek Wilk2011-05-121-0/+13
| | | | | | | | | | | | with more details. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
| * xen/blkback: Fix spelling mistakes.Konrad Rzeszutek Wilk2011-05-121-2/+2
| | | | | | | | Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
| * xen/blkback: Move blkif_get_x86_[32|64]_req to common.h in block/xen-blkback ↵Konrad Rzeszutek Wilk2011-05-122-30/+32
| | | | | | | | | | | | | | | | dir. From the blkif.h header, which was exposed to the frontend. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
| * xen/blkback: Removing the debug_lvl option.Konrad Rzeszutek Wilk2011-05-121-7/+0
| | | | | | | | | | | | It is not really used for anything. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
| * xen/blkback: Use the DRV_PFX in the pr_.. macros.Konrad Rzeszutek Wilk2011-05-123-22/+23
| | | | | | | | | | To make it easier to read. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
| * xen/blkback: Make the DPRINTK uniform.Konrad Rzeszutek Wilk2011-05-122-8/+3
| | | | | | | | Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
| * xen/blkback: Change printk/DPRINTK to pr_.. type variant.Konrad Rzeszutek Wilk2011-05-122-40/+37
| | | | | | | | | | | | And also make them uniform and prefix the message with 'xen-blkback'. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
| * xen/blkback: Fixed up comments and converted spaces to tabs.Konrad Rzeszutek Wilk2011-05-113-81/+105
| | | | | | | | | | Suggested-by: Ian Campbell <Ian.Campbell@eu.citrix.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
| * xen/blkback: Fix up some of the comments.Konrad Rzeszutek Wilk2011-05-051-3/+3
| | | | | | | | | | | | They had the wrong data or were in the wrong spot. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
| * xen/blkback: Squash the checking for operation into dispatch_rw_block_ioKonrad Rzeszutek Wilk2011-05-051-32/+13
| | | | | | | | | | | | | | | | We do a check for the operations right before calling dispatch_rw_block_io. And then we do the same check in dispatch_rw_block_io. This patch squashes those checks into the 'dispatch_rw_block_io' function. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
| * xen/blkback: Add support for BLKIF_OP_FLUSH_DISKCACHE and drop ↵Konrad Rzeszutek Wilk2011-05-053-25/+34
| | | | | | | | | | | | | | | | | | | | BLKIF_OP_WRITE_BARRIER. We drop the support for 'feature-barrier' and add in the support for the 'feature-flush-cache' if the real backend storage supports flushing. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
| * xen-blkfront: Provide for 'feature-flush-cache' the ↵Konrad Rzeszutek Wilk2011-05-051-0/+13
| | | | | | | | | | | | | | | | | | | | BLKIF_OP_WRITE_FLUSH_CACHE operation. The operation BLKIF_OP_WRITE_FLUSH_CACHE has existed in the Xen tree header file for years but it was never present in the Linux tree because the frontend (nor the backend) supported this interface. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
| * Revert "xen/blkback: Move the plugging/unplugging to a higher level."Konrad Rzeszutek Wilk2011-04-271-6/+7
| | | | | | | | | | | | This reverts commit 97961ef46b9b5a6a7c918a38b898a7b3e49869f4 b/c we lose about 15% performance if we do the unplugging and the end of the reading the ring buffer.
| * xen/blkback: Stick REQ_SYNC on WRITEs to deal with CFQ I/O scheduler.Konrad Rzeszutek Wilk2011-04-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If one runs a simple fio request with random read/write with a 20%/80% ratio, the numbers are incredibly bad when using the CFQ scheduler. IOmeter | | | | 64K, randrw | NOOP | CFQ | deadline | randrwmix=80 | | | | --------------+-------+------+----------+ blkback |103/27 |32/10 | 102/27 | --------------+-------+------+----------+ QEMU qdisk |103/27 |102/27| 102/27 | The problem as explained by Vivek Goyal was: ".. that difference is that sync vs async requests. In the case of a kernel thread submitting IO, [..] all the WRITES might be being considered as async and will go in a different queue. If you mix those with some READS, they are always sync and will go in differnet queue. In presence of sync queue, CFQ will idle and choke up WRITES in an attempt to improve latencies of READs. In case of AIO [note: this is what QEMU qdisk is doing] , [..] it is direct IO and both READS and WRITES will be considered SYNC and will go in a single queue and no choking of WRITES will take place." The solution is quite simple, tack on REQ_SYNC (which is what the WRITE_ODIRECT macro points to) and the numbers go back up. Suggested-by: Vivek Goyal <vgoyal@redhat.com Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
| * xen/blkback: Move the plugging/unplugging to a higher level.Konrad Rzeszutek Wilk2011-04-261-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | We used to the plug/unplug on the submit_bio. But that means if within a stream of WRITE, WRITE, WRITE,...,WRITE we have one READ, it could stall the pipeline (as the 'submio_bio' could trigger the unplug_fnc to be called and stall/sync when doing the READ). Instead we want to move the unplugging when the whole (or as a much as possible) ring buffer has been processed. This also eliminates us doing plug/unplug for each request. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
| * xen/blkback: Prefix exposed functions with xen_Konrad Rzeszutek Wilk2011-04-203-66/+68
| | | | | | | | | | | | | | | | | | And also shorten the name if it has blkback to blkbk. This results in the symbol table (if compiled in the kernel) to be much shorter, prettier, and also easier to search for. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
| * xen-blkback: Inline some of the functions that were moved from vbd/interface.cKonrad Rzeszutek Wilk2011-04-203-93/+65
| | | | | | | | | | | | Shuffling code around. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
| * xen-blkback: Remove from the copyright notice the address.Konrad Rzeszutek Wilk2011-04-201-3/+0
| | | | | | | | | | | | | | There is no need for it, as the address is updated constatly in the root of the Linux kernel. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
| * xen/blkback: Squash vbd.c,interface.c in blkback.c and xenbus.c respectivly.Konrad Rzeszutek Wilk2011-04-205-348/+287
| | | | | | | | | | | | | | | | | | | | Daniel Stodden suggested to eliminate vbd.c and interface.c, inlining the critical bits where they belong, respectively. Leaving only blkback.c for the data- and xenbus.c for the control path. Suggested-by: Daniel Stodden <daniel.stodden@citrix.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
| * xen/blkback: Move it from drivers/xen to drivers/blockKonrad Rzeszutek Wilk2011-04-1810-9/+9
| | | | | | | | | | | | .. and modify the Makefile and Kconfig files appropriately. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
| * block, xen/blkback: remove blk_[get|put]_queue calls.Konrad Rzeszutek Wilk2011-04-182-8/+0
| | | | | | | | | | | | | | | | They were used to check if the queue does not have QUEUE_FLAG_DEAD set. That is not necessary anymore as the 'submit_io' call ends up doing that for us. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
| * xen/blkback: Get the 'requeust_queue' properly.Konrad Rzeszutek Wilk2011-04-181-0/+3
| | | | | | | | | | | | | | | | | | | | | | After the commit 0faa8cca883bbc6a0919e3c89128672659b75820 (" xen/blkback: remove per-queue plugging") we forgot to retrieve the 'struct request_queue' from the block device. This puts the functionality back in and fixes a NULL pointer bug. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
| * xen/blkback: Move the check for misaligned I/O once more.Konrad Rzeszutek Wilk2011-04-181-6/+11
| | | | | | | | | | | | | | | | | | | | | | The commit 976222e05ea5a9959ccf880d7a24efbf79b3c6cf xen/blkback: Move the check for misaligned I/O higher. moved it a bit to high. The preq->vbdev was not set, so the check for misaligned I/O would cause a NULL pointer derefence. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
| * xen/blkback: Change fast_flush_area to xen_blkbk_unmap, and tweak ↵Konrad Rzeszutek Wilk2011-04-151-7/+7
| | | | | | | | | | | | | | | | | | | | xen_blk_map_seg. The previous name ('fast_flush_area') had nothing to do with what it does right now. Changing the names so that the code dealing with mapping pages in and out of the guest is called xen_blkbk_[map|unmap]. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
| * xen/blkback: Move the check for misaligned I/O higher.Konrad Rzeszutek Wilk2011-04-151-7/+7
| | | | | | | | | | | | | | | | | | | | | | We move it up higher to be in same loop that actually computes the sector number. This way, all of the code that deals with verifying that the request is correct is all done before we do any of the page mapping, I/O submission, etc. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
| * xen/blkback: Shuffle code around (vbd_translate moved higher).Konrad Rzeszutek Wilk2011-04-151-59/+70
| | | | | | | | | | | | | | | | We take out the chunk of code dealing with mapping to the guest of pages into the xen_blk_map_buf code. And we also move the vbd_translate to be done much earlier. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
| * xen/blkback: Cleanup move the code a bit around.Konrad Rzeszutek Wilk2011-04-151-50/+47
| | | | | | | | | | | | | | | | Moving it so that the code that 'fast_flush_area' code is close to the code that deals with it so that the reader won't lose focus. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
| * xen/blkback: Seperate the bio allocation and the bio submission.Konrad Rzeszutek Wilk2011-04-151-22/+23
| | | | | | | | | | | | | | | | | | We seperate the bio allocation (bio_alloc) from the bio submission so that the error paths are much easier, and also so that the bio submission can be done in one tight loop. It also makes the plug/unplug calls much much easier. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
| * xen/blkback: remove per-queue pluggingKonrad Rzeszutek Wilk2011-04-142-36/+9
| | | | | | | | | | | | | | | | commit 7eaceaccab5f40bbfda044629a6298616aeaed50 ("block: remove per-queue plugging") added two new interfaces to plug and unplug: blk_start_plug and blk_finish_plug. Lets use those. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
OpenPOWER on IntegriCloud