summaryrefslogtreecommitdiffstats
path: root/drivers/block/xen-blkfront.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'linus' into x86/xenIngo Molnar2008-10-121-21/+55
|\ | | | | | | | | | | | | Conflicts: arch/x86/kernel/cpu/common.c arch/x86/kernel/process_64.c arch/x86/xen/enlighten.c
| * block: Expand Xen blkfront for > 16 xvdChris Lalancette2008-10-091-21/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until recently, the maximum number of xvd block devices you could attach to a Xen domU was 16. This limitation turned out to be problematic for some users, so it was expanded to handle a much larger number of disks. However, this requires a couple of changes in the way that blkfront scans for disks. This functionality is already present in the Xen linux-2.6.18-xen.hg tree; the attached patch adds this functionality to the mainline xen-blkfront implementation. I successfully tested it on a 2.6.25 tree, and build tested it on 2.6.27-rc3. Signed-off-by: Chris Lalancette <clalance@redhat.com> Acked-by: Jeremy Fitzhardinge <jeremy@goop.org> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* | xen: clean up domain mode predicatesJeremy Fitzhardinge2008-08-201-1/+1
|/ | | | | | | | | | | | | | There are four operating modes Xen code may find itself running in: - native - hvm domain - pv dom0 - pv domU Clean up predicates for testing for these states to make them more consistent. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Cc: Xen-devel <xen-devel@lists.xensource.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* xen-blkfront.c: make blkif_ioctl() staticAdrian Bunk2008-08-061-2/+2
| | | | | | | | This patch makes the needlessly global blkif_ioctl() static. Signed-off-by: Adrian Bunk <bunk@kernel.org> Acked-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* xen: Avoid allocations causing swap activity on the resume pathIan Campbell2008-07-031-2/+3
| | | | | | | | | | | | | | | | | | | | Avoid allocations causing swap activity on the resume path by preventing the allocations from doing IO and allowing them to access the emergency pools. These paths are used when a frontend device is trying to connect to its backend driver over Xenbus. These reconnections are triggered on demand by IO, so by definition there is already IO underway, and further IO would naturally deadlock. On resume, this path is triggered when the running system tries to continue using its devices. If it cannot then the resume will fail; to try to avoid this we let it dip into the emergency pools. [ linux-2.6.18-xen changesets e8b49cfbdac, fdb998e79aba ] Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* xen/blkfront: add __exit to module_exit() handlersJan Beulich2008-07-031-1/+1
| | | | | | Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* xen/blkfront: Make sure that the device is fully ready before allowing release.Wim Colgate2008-07-031-1/+1
| | | | | | | | [ linux-2.6.18-xen changeset c1c57fea77e9 ] Signed-off-by: Wim Colgate <wim@xensource.com> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* xen/blkfront: Add the CDROM_GET_CAPABILITY ioctl to blkfront.Christian Limpach2008-07-031-0/+36
| | | | | | | | | | | | | | Return 0 instead of -EINVAL if the blkfront device is a cdrom, i.e. had the VDISK_CDROM attribute. This allows udev's cdrom_id to correctly detect the device as a cdrom device. [ Add blkif_ioctl, and CDROMMULTISESSION ] [ linux-2.6.18-xen changeset d2bd9af846b5 ] Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* xen/blkfront: Make sure we don't use bounce buffers, we don't need them.Ian Campbell2008-07-031-0/+3
| | | | | | | | [ linux-2.6.18-xen changeset 667228bf8fc5 ] Signed-off-by: Ian Campbell <ian.campbell@xensource.com> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* xen: make blkif_getgeo staticHarvey Harrison2008-04-291-1/+1
| | | | | | | | | | | Introduced between 2.6.25-rc2 and -rc3 drivers/block/xen-blkfront.c:139:5: warning: symbol 'blkif_getgeo' was not declared. Should it be static? Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Cc: Jeremy Fitzhardinge <jeremy@goop.org> Cc: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* xen: Add compatibility aliases for frontend driversMark McLoughlin2008-04-241-0/+1
| | | | | | | | | | | | | Before getting merged, xen-blkfront was xenblk and xen-netfront was xennet. Temporarily adding compatibility module aliases eases upgrades from older versions by e.g. allowing mkinitrd to find the new version of the module. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* xen: Module autoprobing support for frontend driversMark McLoughlin2008-04-241-0/+1
| | | | | | | | | Add module aliases to support autoprobing modules for xen frontend devices. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* xen blkfront: Delay wait for block devices until after the disk is addedChristian Limpach2008-04-241-0/+11
| | | | | | | | | | | | | | | | | | | | | When the xen block frontend driver is built as a module the module load is only synchronous up to the point where the frontend and the backend become connected rather than when the disk is added. This means that there can be a race on boot between loading the module and loading the dm-* modules and doing the scan for LVM physical volumes (all in the initrd). In the failure case the disk is not present until after the scan for physical volumes is complete. Taken from: http://xenbits.xensource.com/linux-2.6.18-xen.hg?rev/11483a00c017 Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com> Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* xen/blkfront: use bdget_diskJeremy Fitzhardinge2008-04-241-2/+1
| | | | | | | | | | info->dev is never initialized to anything, so bdget(info->dev) is meaningless. Get rid of info->dev, and use bdget_disk on the gendisk. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Cc: Al Viro <viro@ZenIV.linux.org.uk> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* xen: Make xen-blkfront write its protocol ABI to xenstoreMarkus Armbruster2008-04-241-0/+7
| | | | | | | | | | | | | | | | | | Frontends are expected to write their protocol ABI to xenstore. Since the protocol ABI defaults to the backend's native ABI, things work fine without that as long as the frontend's native ABI is identical to the backend's native ABI. This is not the case for xen-blkfront running 32-on-64, because its ABI differs between 32 and 64 bit, and thus needs this fix. Based on http://xenbits.xensource.com/xen-unstable.hg?rev/c545932a18f3 and http://xenbits.xensource.com/xen-unstable.hg?rev/ffe52263b430 by Gerd Hoffmann <kraxel@suse.de> Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Jeremy Fitzhardinge <Jeremy.Fitzhardinge@citrix.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* xen: Implement getgeo for Xen virtual block device.Ian Campbell2008-02-211-0/+18
| | | | | | | | | | | | | The below implements the getgeo hook for Xen block devices. Extracted from the xen-unstable tree where it has been used for ages. It is useful to have because it allows things like grub2 (used by the Debian installer images) to work in a guest domain without having to sprinkle Xen specific hacks around the place. Signed-off-by: Ian Campbell <ijc@hellion.org.uk> Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* blk_end_request: changing xen-blkfront (take 4)Kiyoshi Ueda2008-01-281-6/+4
| | | | | | | | | | This patch converts xen-blkfront to use blk_end_request interfaces. Related 'uptodate' arguments are converted to 'error'. Cc: Jeremy Fitzhardinge <jeremy@xensource.com> Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com> Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* Fixup rq_for_each_segment() indentationJens Axboe2007-10-101-13/+12
| | | | | | Remove one level of nesting where appropriate. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* Introduce rq_for_each_segment replacing rq_for_each_bioNeilBrown2007-10-101-5/+2
| | | | | | | | | | | | | | | Every usage of rq_for_each_bio wraps a usage of bio_for_each_segment, so these can be combined into rq_for_each_segment. We define "struct req_iterator" to hold the 'bio' and 'index' that are needed for the double iteration. Signed-off-by: Neil Brown <neilb@suse.de> Various compile fixes by me... Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* [BLOCK] Get rid of request_queue_t typedefJens Axboe2007-07-241-2/+2
| | | | | | | | | Some of the code has been gradually transitioned to using the proper struct request_queue, but there's lots left. So do a full sweet of the kernel and get rid of this typedef and replace its uses with the proper type. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* xen: add virtual block device driver.Jeremy Fitzhardinge2007-07-181-0/+988
The block device frontend driver allows the kernel to access block devices exported exported by a virtual machine containing a physical block device driver. Signed-off-by: Ian Pratt <ian.pratt@xensource.com> Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk> Signed-off-by: Chris Wright <chrisw@sous-sol.org> Cc: Arjan van de Ven <arjan@infradead.org> Cc: Greg KH <greg@kroah.com> Cc: Jens Axboe <axboe@kernel.dk>
OpenPOWER on IntegriCloud