summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* xen/blkback: Fix checkpatch warnings in blkback.cKonrad Rzeszutek Wilk2011-04-141-34/+47
| | | | Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
* xen/blkback: Fix checkpatch warnings of xenbus.cKonrad Rzeszutek Wilk2011-04-141-9/+12
| | | | Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
* xen/blkback: Fix interface.c checkpatch warnings .. exceptKonrad Rzeszutek Wilk2011-04-141-4/+5
| | | | | | | | | | | + sring_x86_64 = (struct blkif_x86_64_sring *)blkif->blk_ring_area->addr; WARNING: line over 80 characters + BACK_RING_INIT(&blkif->blk_rings.x86_64, sring_x86_64, PAGE_SIZE); as breaking them up really does not help that much. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
* xen/blkback: Fix checkpatch warnings in vbd.cKonrad Rzeszutek Wilk2011-04-141-5/+6
| | | | Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
* xen/blkback: blkif->struct blkif_stKonrad Rzeszutek Wilk2011-04-145-37/+38
| | | | | | | checkpatch.pl suggested that we don't use the typdef in common.h and this triggered this avalanche of patches. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
* xen/blkback: Add some comments.Konrad Rzeszutek Wilk2011-04-145-24/+71
| | | | Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
* xen/blkback: Fix the WRITE_BARRIERTom Goetz2011-04-141-4/+6
| | | | | | | | The WRITE_BARRIER was missing the REQ_WRITE option. This was causing the blktap to die. Signed-off-by: Tom Goetz <tom.goetz@virtualcomputer.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
* xen/blkback: Use kzalloc's, and GFP_KERNEL for data structures.Konrad Rzeszutek Wilk2011-04-141-8/+9
| | | | | | | | | | | | | | | | | | | The patch titled:"xen/blkback: Use 'vzalloc' for page arrays and pre-allocate pages." allocates the structures and its member variables using the 'vzalloc'. Daniel Stodden pointed out that vzalloc is good when we use big number of pages - while these are at the max two pages. We can do this using kzalloc. Also the GFP_HIGHMEM does not work properly with Xen, so take that out. We will have to revisit this when a "get_empty_pages_and_pagevec" type API shows up to leverage that. BugLink: http://mid.gmane.org/1299898639.11681.227.camel@agari.van.xensource.com CC: Daniel Stodden <daniel.stodden@citrix.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
* xen/blkback: Utilize the M2P override mechanism for GNTMAP_host_mapKonrad Rzeszutek Wilk2011-04-141-4/+19
| | | | | | | | | | | Instead of doing copy grants lets do mapping grants using the M2P(and P2M) override mechanism. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Conflicts: drivers/xen/blkback/blkback.c
* xen/blkback: Use 'vzalloc' for page arrays and pre-allocate pages.Konrad Rzeszutek Wilk2011-04-141-7/+16
| | | | | | | | | | | | | | | | | | | Previously we would allocate the array for page using 'kmalloc' which we can as easily do with 'vzalloc'. The pre-allocation of pages was done a bit differently in the past - it used to be that the balloon driver would export "alloc_empty_pages_and_pagevec" which would have in one function created an array, allocated the pages, balloned the pages out (so the memory behind those pages would be non-present), and provide us those pages. This was OK as those pages were shared between other guest and the only thing we needed was to "swizzel" the MFN of those pages to point to the other guest MFN. We can still "swizzel" the MFNs using the M2P (and P2M) override API calls, but for the sake of simplicity we are dropping the balloon API calls. We can return to those later on. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
* xen/blkback: Union the blkif_request request specific fieldsKonrad Rzeszutek Wilk2011-04-142-11/+11
| | | | | | | | | | | | | Following in the steps of patch: "xen: Union the blkif_request request specific fields" this patch changes the blkback. Per the original patch: "Prepare for extending the block device ring to allow request specific fields, by moving the request specific fields for reads, writes and barrier requests to a union member." Cc: Owen Smith <owen.smith@citrix.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
* xen/blkback: Move global/static variables into struct xen_blkbk.Konrad Rzeszutek Wilk2011-04-141-34/+48
| | | | | | | | | Bundle the lot of discrete variables into a single structure. This is based on what was done in the xen-netback driver: xen: netback: Move global/static variables into struct xen_netbk. (094944631cc5a9d6e623302c987f78117c0bf7ac) Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
* xen/blkback: simplify address translationsJan Beulich2011-04-141-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Cherry-pick and modified from 69d64727c42eecd47fdf82c15a54474d21a4012a ("blkback/blktap2: simplify address translations"): "There are quite a number of places where e.g. page->va->page translations happen. Besides yielding smaller code (source and binary), a second goal is to make it easier to determine where virtual addresses of pages allocated through alloc_empty_pages_and_pagevec() are really used (in turn in order to determine whether using highmem pages would be possible there)." The second goal is not the purpose of this patch - it is just to make it easier to read the code. linux-2.6-pvops: * Stripped drivers/xen/gntdev/* * Stripped drivers/xen/netback/* [v2: Stripped blktap off] Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
* xen/blkback: Update to use blkdev_get_by_dev instead of open_by_devnum.Konrad Rzeszutek Wilk2011-04-141-2/+2
| | | | | The API for opening a block device has changed since 2.6.32. The correct function to open a device is blkdev_get_by_dev.
* xen/blkback: Replace WRITE_BARRIER with (REQ_FLUSH | REQ_FUA)Konrad Rzeszutek Wilk2011-04-141-4/+4
| | | | TODO: Double check xen-blkfront.c
* blkback: Fix CVE-2010-3699Keir Fraser2011-04-141-0/+6
| | | | | | | | | | | | | | | | | | | | A guest can cause the backend driver to leak a kernel thread. Such leaked threads hold references to the device, whichmakes the device impossible to tear down. If shut down, the guest remains a zombie domain, the xenwatch process hangs, and most xm commands will stop working. This patch tries to do the following for blkback: - identify/extract idempotent teardown operations, - add/move the invocation of said teardown operation right before we're about to allocate new resources in the Connected states. [ linux-2.6.18-xen.hg 59f097ef181b ] Signed-off-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Keir Fraser <keir@xen.org> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
* xen/blkback: Print additional information when a vbd is resized.K. Y. Srinivasan2011-04-141-0/+2
| | | | | Signed-off-by: K. Y. Srinivasan <ksrinivasan@novell.com> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
* xen/blkback: Flush blkback data when connecting.Chris Lalancette2011-04-141-0/+7
| | | | | | | | | | | First cut at flushing blkback data when first connecting blkback. This should avoid the pygrub issues we are experiencing in (RedHat bugzilla) 466681. [ 2.6.18-xen.hg commit 63b4d7f56688 ] Signed-off-by: Chris Lalancette <clalance@redhat.com> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
* xen/blkback: add accessor for xenbus backend deviceJeremy Fitzhardinge2011-04-143-1/+8
| | | | | | Since backend_info is hidden away now. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
* xen/blkback: Propagate changed size of VBDsK. Y. Srinivasan2011-04-143-0/+48
| | | | | | | | | Support dynamic resizing of virtual block devices. This patch supports both file backed block devices as well as physical devices that can be dynamically resized on the host side. Signed-off-by: K. Y. Srinivasan <ksrinivasan@novell.com> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
* xen/blkback: use drv_get/set_drvdata rather than directly accessing driver_data.Jeremy Fitzhardinge2011-04-141-5/+5
| | | | | | Direct driver_data access is obsolete and will disappear. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
OpenPOWER on IntegriCloud