aboutsummaryrefslogtreecommitdiffstats
path: root/tools/blktap2/drivers/block-remus.c
Commit message (Collapse)AuthorAgeFilesLines
* blktap2: Fix another uninitialised value errorIan Jackson2012-05-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | gcc -O1 -fno-omit-frame-pointer -m32 -march=i686 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wdeclaration-after-statement -D__XEN_TOOLS__ -MMD -MF .block-remus.o.d -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -fno-optimize-sibling-calls -mno-tls-direct-seg-refs -Werror -g -Wno-unused -fno-strict-aliasing -I../include -I../drivers -I/home/osstest/build.12828.build-i386/xen-unstable/tools/blktap2/drivers/../../../tools/libxc -I/home/osstest/build.12828.build-i386/xen-unstable/tools/blktap2/drivers/../../../tools/include -D_GNU_SOURCE -DUSE_NFS_LOCKS -c -o block-remus.o block-remus.c block-remus.c: In function 'ramdisk_flush': block-remus.c:508: error: 'buf' may be used uninitialized in this function make[5]: *** [block-remus.o] Error 1 This is because gcc can see that merge_requests doesn't always set *mergedbuf but gcc isn't able to prove that it always does so if merge_requests returns 0 and that in that case the value of ramdisk_flush::buf isn't used. This is too useful a warning to disable, despite the occasional false positive of this form. The conventional approach is to suppress the warning by explicitly initialising the variable to 0. This has just come to light because 25275:27d63b9f111a reenabled optimisation for this area of code, and gcc's data flow analysis (which is required to trigger the uninitialised variable warning) only occurs when optimisation is turned on. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: remus: blktap2/block-remus.c - potential write-after-write race fixShriram Rajagopalan2011-05-261-66/+125
| | | | | | | | | | | | | At the end of a checkpoint, when a new flush (of buffered disk writes) is merged with ongoing flush, we have to make sure that none of the new disk I/O requests overlap with ones in in progress. If it does, hold the request and dont issue I/O until the overlapping one finishes. If we allow the I/O to proceed, we might end up with two overlapping requests in the disk's queue and the disk may not offer any guarantee on which one is written first. Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* blktap2: Fix E/DPRINTF defs all around the driver/ subdir.Keir Fraser2010-06-081-1/+0
| | | | | | | This is just to avoid macro madness among subdirs sharing blktaplib.h. Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com> Signed-off-by: Jake Wires <jake.wires@citrix.com>
* blktap2: Fix tapdisk disktype issues.Keir Fraser2010-06-081-0/+1
| | | | | | | | | Stop coercing drivers/disktype code into the tool stack. Make both blktapctrl and tap-ctl transfer type/path pairs as "<type>:<path>" strings. Remove the message.disktype integer altogether. Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com> Signed-off-by: Jake Wires <jake.wires@citrix.com>
* blktap/fs-back: Build fixes for Fedora 13Keir Fraser2010-03-151-0/+1
| | | | | | | | | | | | | 1. Some files use stat, mkfifo, mkdir etc. without including sys/stat.h 2. Some programs link against libpthread without a -lpthread compile option. The compile used to work if this library happened to be used by one of the other libraries that was being linked against, but Fedora 13 has stopped allowing this. From: M A Young <m.a.young@durham.ac.uk> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Remus: increase failover timeout from 500ms to 1sKeir Fraser2010-02-121-5/+5
| | | | | | | | 500ms is aggressive enough to trigger split-brain under fairly ordinary workloads, particularly for HVM. The long-term fix is to integrate with a real HA monitor like linux HA. Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
* blktap2: Remove uninitialised variable rc from tdremus_close().Keir Fraser2009-11-171-2/+1
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* tools: Make build again on netbsdKeir Fraser2009-11-101-3/+7
| | | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* blktap2: add remus driverKeir Fraser2009-11-091-0/+1670
Blktap2 port of remus disk driver. Backwards compatable with blktap1 implementation. Signed-off-by: Ryan O'Connor <rjo@cs.ubc.ca> Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>