History | View | Annotate | Download (24.7 kB)
rbd: hook up cache options
Writeback caching was added in Ceph 0.46, and writethrough will be in0.47. These are controlled by general config options, so there's noneed to check for librbd version.
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
rbd: add discard support
Change the write flag to an operation type in RBDAIOCB, and make thebuffer optional since discard doesn't use it.
Discard is first included in librbd 0.1.2 (which is in Ceph 0.46).If librbd is too old, leave out qemu_rbd_aio_discard entirely,...
aio: remove process_queue callback and qemu_aio_process_queue
Both unused after the previous patch.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
rbd: wire up snapshot removal and rollback functionality
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
prepare for future GPLv2+ relicensing
All files under GPLv2 will get GPLv2+ changes starting tomorrow.event_notifier.c and exec-obsolete.h were only ever touched by Red Hatemployees and can be relicensed now.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
block: qemu_aio_get does not return NULL
Initially done with the following semantic patch:
rule1 expression E;statement S;@@ E = qemu_aio_get (...);(- if (E == NULL) { ... } |- if (E) { <... S ...> })
rule1
which however missed occurrences in linux-aio.c and posix-aio-compat.c....
rbd: always set out parameter in qemu_rbd_snap_list
The caller expects psn_tab to be NULL when there are no snapshots oran error occurs. This results in calling g_free on an invalid address.
Reported-by: Oliver Francke <Oliver@filoo.de>Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>...
block: Rename bdrv_co_flush to bdrv_co_flush_to_disk
There are two different types of flush that you can do: Flushing one level upto the OS (i.e. writing data to the host page cache) or flushing it all the waydown to the disk. The existing functions flush to the disk, reflect this in the...
block: change flush to co_flush
Since coroutine operation is now mandatory, convert all bdrv_flushimplementations to coroutines. For qcow2, this means taking the lock.Other implementations are simpler and just forward bdrv_flush to theunderlying protocol, so they can avoid the lock....
rbd: allow escaping in config string
The config string is variously delimited by =, @, and /, depending on thefield. Allow these characters to be escaped by preceeding them with \.
Signed-off-by: Sage Weil <sage@newdream.net>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
rbd: ignore failures when reading from default conf location
If we are reading from the default config location, ignore any failures.It is perfectly legal for the user to specify exactly the options they needand to not rely on any config file.
Signed-off-by: Sage Weil <sage@newdream.net>...
rbd: update comment heading
Properly document the configuration string syntax and semantics. Remove(out of date) details about the librbd implementation.
rbd: call flush, if available
librbd recently added async writeback and flush support. If the newrbd_flush() call is available, call it.
rbd: clean up, fix style
No assignment in condition. Remove duplicate ret > 0 check.
Signed-off-by: Sage Weil <sage@newdream.net>Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
rbd: fix leak in qemu_rbd_open failure paths
Fix leak of s->snap in failure path. Simplify error paths for the wholefunction.
Reported-by: Stefan Hajnoczi <stefanha@gmail.com>Signed-off-by: Sage Weil <sage@newdream.net>Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>...
rbd: allow client id to be specified in config string
Allow the client id to be specified in the config string via 'id=' so thatusers can control who they authenticate as. Currently they are stuck withthe default ('admin'). This is necessary for anyone using authentication...
Use glib memory allocation and free functions
qemu_malloc/qemu_free no longer exist after this commit.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
block/rbd: Remove unused local variable
Variable 'snap' is assigned a value that is never used.Remove snap and the related code.
Cc: Christian Brunner <chb@muc.de>Cc: Josh Durgin <josh.durgin@dreamhost.com>Cc: Kevin Wolf <kwolf@redhat.com>Signed-off-by: Stefan Weil <weil@mail.berlios.de>...
rbd: allow configuration of rados from the rbd filename
The new format is rbd:pool/image[@snapshot][:option1=value1[:option2=value2...]]Each option is used to configure rados, and may be any Ceph option, or "conf".The "conf" option specifies a Ceph configuration file to read....
rbd: check return values when scheduling aio
If scheduling fails, the number of outstanding I/Os must be correct,or there will be a hang when waiting for everything to be flushed.
Reviewed-by: Christian Brunner <chb@muc.de>Reported-by: Stefan Hajnoczi <stefanha@gmail.com>...
rbd: Add bdrv_truncate implementation
Reviewed-by: Christian Brunner <chb@muc.de>Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
rbd: use the higher level librbd instead of just librados
librbd stacks on top of librados to provide accessto rbd images.
Using librbd simplifies the qemu code, and allowsqemu to use new versions of the rbd formatwith few (if any) changes.
Reviewed-by: Christian Brunner <chb@muc.de>...
ceph/rbd block driver for qemu-kvm
RBD is an block driver for the distributed file system Ceph(http://ceph.newdream.net/). This driver uses librados (which is partof the Ceph server) for direct access to the Ceph object store and isrunning entirely in userspace (Yehuda also wrote a driver for the...