summaryrefslogtreecommitdiffstats
path: root/block/cow.c
Commit message (Collapse)AuthorAgeFilesLines
* cow: return errno instead of -1Juan Quintela2010-03-091-3/+2
| | | | | | | Remove not needed ret = 0 assignment. Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* block/cow.c: fix warnings with _FORTIFY_SOURCEKirill A. Shutemov2010-01-261-3/+16
| | | | | | | | | | | | | CC block/cow.o cc1: warnings being treated as errors block/cow.c: In function 'cow_create': block/cow.c:251: error: ignoring return value of 'write', declared with attribute warn_unused_result block/cow.c:253: error: ignoring return value of 'ftruncate', declared with attribute warn_unused_result make: *** [block/cow.o] Error 1 Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name> Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* block: use fdatasync instead of fsync if possibleChristoph Hellwig2009-09-111-1/+1
| | | | | | | | | | | | | | If we are flushing the caches for our image files we only care about the data (including the metadata required for accessing it) but not things like timestamp updates. So try to use fdatasync instead of fsync to implement the flush operations. Unfortunately many operating systems still do not support fdatasync, so we add a qemu_fdatasync wrapper that uses fdatasync if available as per the _POSIX_SYNCHRONIZED_IO feature macro or fsync otherwise. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qemu-img: Print available options with -o ?Kevin Wolf2009-06-061-2/+10
| | | | | | | This patch adds a small help text to each of the options in the block drivers which can be displayed by using qemu-img create -f fmt -o ? Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* Convert all block drivers to new bdrv_createKevin Wolf2009-05-221-5/+21
| | | | | | | | | | | | Now we can make use of the newly introduced option structures. Instead of having bdrv_create carry more and more parameters (which are format specific in most cases), just pass a option structure as defined by the driver itself. bdrv_create2() contains an emulation of the old interface to simplify the transition. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Move block drivers into their own directoryAnthony Liguori2009-05-141-0/+275
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
OpenPOWER on IntegriCloud