Re: [Qemu-devel] [PATCH] log: do not log if QEMU is daemonized but without -D

2016-03-01 Thread Dimitris Aragiorgis
Hi all, * Paolo Bonzini [2016-03-01 12:50:53 +0100]: > Commit 96c33a4 ("log: Redirect stderr to logfile if deamonized", > 2016-02-22) wanted to move stderr of a daemonized QEMU to the file > specified with -D. > > However, if -D was not passed, the patch had the side effect of not > redirecting

Re: [Qemu-devel] [PATCH] log: Redirect stderr to logfile if deamonized

2016-02-18 Thread Dimitris Aragiorgis
* Paolo Bonzini [2016-02-18 16:22:13 +0100]: > > > On 18/02/2016 12:38, Dimitris Aragiorgis wrote: > > In case of daemonize, use the logfile passed with the -D option in > > order to redirect stderr to it instead of /dev/null. > > > > Also remove some unused c

[Qemu-devel] [PATCH] log: Redirect stderr to logfile if deamonized

2016-02-18 Thread Dimitris Aragiorgis
In case of daemonize, use the logfile passed with the -D option in order to redirect stderr to it instead of /dev/null. Also remove some unused code in log.h. Signed-off-by: Dimitris Aragiorgis --- include/qemu/log.h |6 -- os-posix.c |6 +- util/log.c | 11

Re: [Qemu-devel] [PATCH] os-posix: Log to logfile in case of daemonize

2016-02-11 Thread Dimitris Aragiorgis
Hi, * Paolo Bonzini [2016-02-11 13:31:17 +0100]: > > > On 11/02/2016 13:12, Dimitris Aragiorgis wrote: > > Besides that, when one executes a daemon, shell redirection is > > hardly, if ever, used. More so if the daemon already has a logfile > > option. > > &

Re: [Qemu-devel] [PATCH] os-posix: Log to logfile in case of daemonize

2016-02-11 Thread Dimitris Aragiorgis
Hi, * Paolo Bonzini [2016-02-08 10:29:55 +0100]: > > > On 16/12/2015 17:56, Alex Pyrgiotis wrote: > > + > > +log = qemu_get_log_filename(); > > +if (log != NULL) { > > +TFR(fd = qemu_open(log, O_RDWR | O_APPEND | O_CREAT, 0640)); > > Here you are opening the same f

Re: [Qemu-devel] [PULL 10/13] log: move qemu-log.c into util/ directory

2016-02-03 Thread Dimitris Aragiorgis
Hi all, A while ago me and Alex [cc'ed] submitted a trivial patch related to logging [1]. Since this patch set here moves the qemu-log.c under util/, our patch will not apply any more. Should we rebase it and resend it against current master? Thanks a lot, dimara [1] https://lists.gnu.org/archiv

[Qemu-devel] [PATCH v5 1/5] block: Use bdrv_is_sg() everywhere

2015-06-23 Thread Dimitris Aragiorgis
Instead of checking bs->sg use bdrv_is_sg() consistently throughout the code. Signed-off-by: Dimitris Aragiorgis Reviewed-by: Paolo Bonzini Reviewed-by: Stefan Hajnoczi --- block.c |6 +++--- block/iscsi.c |2 +- block/raw-posix.c |4 ++-- 3 files changed

[Qemu-devel] [PATCH v5 0/5] Some fixes related to scsi-generic

2015-06-23 Thread Dimitris Aragiorgis
this is too much for now since it just returns the bs->sg flag (and is not an actual driver function). If you insist I'll change it in v3. Dimitris Aragiorgis (5): block: Use bdrv_is_sg() everywhere Fix migration in case of scsi-generic raw-posix: DPRINTF instead of DEBUG_BLOCK_PRINT raw-p

[Qemu-devel] [PATCH v5 5/5] raw-posix: Introduce hdev_is_sg()

2015-06-23 Thread Dimitris Aragiorgis
/dev/sg0) by ensuring that all of the following holds: - The specified file name corresponds to a character device - The device supports the SG_GET_VERSION_NUM ioctl - The device supports the SG_GET_SCSI_ID ioctl Signed-off-by: Dimitris Aragiorgis --- block/raw-p

[Qemu-devel] [PATCH v5 3/5] raw-posix: DPRINTF instead of DEBUG_BLOCK_PRINT

2015-06-23 Thread Dimitris Aragiorgis
Building the QEMU tools fails if we #define DEBUG_BLOCK inside block/raw-posix.c. Here instead of adding qemu-log.o in block-obj-y so that DEBUG_BLOCK_PRINT can be used, we substitute the latter with a simple DPRINTF() (that does not cause bit-rot). Signed-off-by: Dimitris Aragiorgis Reviewed-by

[Qemu-devel] [PATCH v5 2/5] Fix migration in case of scsi-generic

2015-06-23 Thread Dimitris Aragiorgis
-off-by: Dimitris Aragiorgis Reviewed-by: Stefan Hajnoczi --- block/io.c|3 ++- block/iscsi.c |4 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/block/io.c b/block/io.c index bb4f787..f45a3ad 100644 --- a/block/io.c +++ b/block/io.c @@ -2255,7 +2255,8 @@ int

[Qemu-devel] [PATCH v5 4/5] raw-posix: Use DPRINTF for DEBUG_FLOPPY

2015-06-23 Thread Dimitris Aragiorgis
Get rid of several #ifdef DEBUG_FLOPPY and substitute them with DPRINTF. Signed-off-by: Dimitris Aragiorgis Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi --- block/raw-posix.c | 22 +- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/block/raw

Re: [Qemu-devel] [PATCH v4 5/5] raw-posix: Introduce hdev_is_sg()

2015-06-22 Thread Dimitris Aragiorgis
7;s proposal: The code first stat()s the given filename to ensure it is a character device node, and then it issues the SG_GET_VERSION_NUM and SG_GET_SCSI_ID ioctl()s. Thanks, dimara * Stefan Hajnoczi [2015-06-19 13:33:02 +0100]: > On Wed, May 20, 2015 at 12:57:39PM +0300, Dimitris Aragio

Re: [Qemu-devel] [PATCH v4 0/5] Some fixes related to scsi-generic

2015-06-18 Thread Dimitris Aragiorgis
Hi, did you have the time to take a look at this? Is there anything pending from my side? Thanks, dimara * Dimitris Aragiorgis [2015-05-29 08:15:34 +0300]: > Hi, > > * Dimitris Aragiorgis [2015-05-20 12:57:34 +0300]: > > > Hi all, > > > > These four patches

Re: [Qemu-devel] [PATCH v4 0/5] Some fixes related to scsi-generic

2015-05-28 Thread Dimitris Aragiorgis
Hi, * Dimitris Aragiorgis [2015-05-20 12:57:34 +0300]: > Hi all, > > These four patches make slight changes to the way QEMU handles SCSI > generic devices to fix a number of small problems. > > I am sending them against the master branch, since I don't know if t

[Qemu-devel] [PATCH v4 5/5] raw-posix: Introduce hdev_is_sg()

2015-05-20 Thread Dimitris Aragiorgis
e path. Test for an SG device (e.g. /dev/sg0) by ensuring that all of the following holds: - The device supports the SG_GET_VERSION_NUM ioctl - The device supports the SG_GET_SCSI_ID ioctl - The specified file name corresponds to a character device Signed-off-by: Dimitris Aragiorgis --- bloc

[Qemu-devel] [PATCH v4 3/5] raw-posix: DPRINTF instead of DEBUG_BLOCK_PRINT

2015-05-20 Thread Dimitris Aragiorgis
Building the QEMU tools fails if we #define DEBUG_BLOCK inside block/raw-posix.c. Here instead of adding qemu-log.o in block-obj-y so that DEBUG_BLOCK_PRINT can be used, we substitute the latter with a simple DPRINTF() (that does not cause bit-rot). Signed-off-by: Dimitris Aragiorgis --- block

[Qemu-devel] [PATCH v4 2/5] Fix migration in case of scsi-generic

2015-05-20 Thread Dimitris Aragiorgis
-off-by: Dimitris Aragiorgis --- block/io.c|3 ++- block/iscsi.c |4 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/block/io.c b/block/io.c index 1ce62c4..922dc07 100644 --- a/block/io.c +++ b/block/io.c @@ -2231,7 +2231,8 @@ int coroutine_fn bdrv_co_flush

[Qemu-devel] [PATCH v4 0/5] Some fixes related to scsi-generic

2015-05-20 Thread Dimitris Aragiorgis
I chose DPRINTF instead. It would make sense to add a tracepoint for bdrv_is_sg() (just like most bdrv_* commands) but this is too much for now since it just returns the bs->sg flag (and is not an actual driver function). If you insist I'll change it in v3. Dimitris Aragiorgis (5): bloc

[Qemu-devel] [PATCH v4 1/5] block: Use bdrv_is_sg() everywhere

2015-05-20 Thread Dimitris Aragiorgis
Instead of checking bs->sg use bdrv_is_sg() consistently throughout the code. Signed-off-by: Dimitris Aragiorgis Reviewed-by: Paolo Bonzini --- block.c |6 +++--- block/iscsi.c |2 +- block/raw-posix.c |4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) d

[Qemu-devel] [PATCH v4 4/5] raw-posix: Use DPRINTF for DEBUG_FLOPPY

2015-05-20 Thread Dimitris Aragiorgis
Get rid of several #ifdef DEBUG_FLOPPY and substitute them with DPRINTF. Signed-off-by: Dimitris Aragiorgis --- block/raw-posix.c | 22 +- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/block/raw-posix.c b/block/raw-posix.c index 438bf0b..ace228f 100644

[Qemu-devel] [PATCH v3 5/5] raw-posix: Introduce hdev_is_sg()

2015-05-14 Thread Dimitris Aragiorgis
e path. Test for an SG device (e.g. /dev/sg0) by ensuring that all of the following holds: - The device supports the SG_GET_VERSION_NUM ioctl - The device supports the SG_GET_SCSI_ID ioctl - The specified file name corresponds to a character device Signed-off-by: Dimitris Aragiorgis --- bloc

[Qemu-devel] [PATCH v3 2/5] Fix migration in case of scsi-generic

2015-05-14 Thread Dimitris Aragiorgis
-off-by: Dimitris Aragiorgis --- block/io.c|3 ++- block/iscsi.c |4 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/block/io.c b/block/io.c index 1ce62c4..922dc07 100644 --- a/block/io.c +++ b/block/io.c @@ -2231,7 +2231,8 @@ int coroutine_fn bdrv_co_flush

[Qemu-devel] [PATCH v3 1/5] block: Use bdrv_is_sg() everywhere

2015-05-14 Thread Dimitris Aragiorgis
Instead of checking bs->sg use bdrv_is_sg() consistently throughout the code. Signed-off-by: Dimitris Aragiorgis Reviewed-by: Paolo Bonzini --- block.c |6 +++--- block/iscsi.c |2 +- block/raw-posix.c |4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) d

Re: [Qemu-devel] [PATCH v2 2/5] Fix migration in case of scsi-generic

2015-05-14 Thread Dimitris Aragiorgis
Hello Kevin, * Kevin Wolf [2015-05-11 12:12:23 +0200]: > Am 08.05.2015 um 19:47 hat Dimitris Aragiorgis geschrieben: > > During migration, QEMU uses fsync()/fdatasync() on the open file > > descriptor for read-write block devices to flush data just before > > stopping the

[Qemu-devel] [PATCH v3 3/5] raw-posix: DPRINTF instead of DEBUG_BLOCK_PRINT

2015-05-14 Thread Dimitris Aragiorgis
Building the QEMU tools fails if we #define DEBUG_BLOCK inside block/raw-posix.c. Here instead of adding qemu-log.o in block-obj-y so that DEBUG_BLOCK_PRINT can be used, we substitute the latter with a simple DPRINTF() (that does not cause bit-rot). Signed-off-by: Dimitris Aragiorgis --- block

[Qemu-devel] [PATCH v3 4/5] raw-posix: Use DPRINTF for DEBUG_FLOPPY

2015-05-14 Thread Dimitris Aragiorgis
Get rid of several #ifdef DEBUG_FLOPPY and substitute them with DPRINTF. Signed-off-by: Dimitris Aragiorgis --- block/raw-posix.c | 22 +- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/block/raw-posix.c b/block/raw-posix.c index ff7dc4d..82e522f 100644

[Qemu-devel] [PATCH v3 0/5] Some fixes related to scsi-generic

2015-05-14 Thread Dimitris Aragiorgis
flag (and is not an actual driver function). If you insist I'll change it in v3. Dimitris Aragiorgis (5): block: Use bdrv_is_sg() everywhere Fix migration in case of scsi-generic raw-posix: DPRINTF instead of DEBUG_BLOCK_PRINT raw-posix: Use DPRINTF for DEBUG_FLOPPY raw-posix: I

[Qemu-devel] [PATCH v2 5/5] raw-posix: Introduce hdev_is_sg()

2015-05-08 Thread Dimitris Aragiorgis
e path. Test for an SG device (e.g. /dev/sg0) by ensuring that all of the following holds: - The device supports the SG_GET_VERSION_NUM ioctl - The device supports the SG_GET_SCSI_ID ioctl - The specified file name corresponds to a character device Signed-off-by: Dimitris Aragiorgis --- bloc

[Qemu-devel] [PATCH v2 4/5] raw-posix: Use DPRINTF for DEBUG_FLOPPY

2015-05-08 Thread Dimitris Aragiorgis
Get rid of several #ifdef DEBUG_FLOPPY and substitute them with DPRINTF. Signed-off-by: Dimitris Aragiorgis --- block/raw-posix.c | 20 +--- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/block/raw-posix.c b/block/raw-posix.c index fbccca8..8a38d02 100644 --- a

[Qemu-devel] [PATCH v2 3/5] raw-posix: DPRINTF instead of DEBUG_BLOCK_PRINT

2015-05-08 Thread Dimitris Aragiorgis
Building the QEMU tools fails if we #define DEBUG_BLOCK inside block/raw-posix.c. Here instead of adding qemu-log.o in block-obj-y so that DEBUG_BLOCK_PRINT can be used, we substitute the latter with a simple DPRINTF(). Signed-off-by: Dimitris Aragiorgis --- block/raw-posix.c | 12

[Qemu-devel] [PATCH v2 1/5] block: Use bdrv_is_sg() everywhere

2015-05-08 Thread Dimitris Aragiorgis
Instead of checking bs->sg use bdrv_is_sg() consistently throughout the code. Signed-off-by: Dimitris Aragiorgis Reviewed-by: Paolo Bonzini --- block.c |6 +++--- block/iscsi.c |2 +- block/raw-posix.c |4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) d

[Qemu-devel] [PATCH v2 2/5] Fix migration in case of scsi-generic

2015-05-08 Thread Dimitris Aragiorgis
never reach). Signed-off-by: Dimitris Aragiorgis --- block/io.c|2 +- block/iscsi.c |4 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/block/io.c b/block/io.c index 1ce62c4..d248a4d 100644 --- a/block/io.c +++ b/block/io.c @@ -2231,7 +2231,7 @@ int coroutine_fn

[Qemu-devel] [PATCH v2 0/5] Some fixes related to scsi-generic

2015-05-08 Thread Dimitris Aragiorgis
s too much for now since it just returns the bs->sg flag (and is not an actual driver function). If you insist I'll change it in v3. Dimitris Aragiorgis (5): block: Use bdrv_is_sg() everywhere Fix migration in case of scsi-generic raw-posix: DPRINTF instead of DEBUG_BLOCK_PRINT r

[Qemu-devel] [PATCH 1/4] Fix migration in case of scsi-generic

2015-05-08 Thread Dimitris Aragiorgis
, since submitting SCSI commands directly via an SG character device (e.g. /dev/sg0) bypasses the page cache completely, anyway. Signed-off-by: Dimitris Aragiorgis --- block/io.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/io.c b/block/io.c index 1ce62c4..d248a4d

[Qemu-devel] [PATCH 3/4] raw-posix: Introduce hdev_is_sg()

2015-05-08 Thread Dimitris Aragiorgis
e path. Test for an SG device (e.g. /dev/sg0) by ensuring that all of the following holds: - The device supports the SG_GET_VERSION_NUM ioctl - The device supports the SG_GET_SCSI_ID ioctl - The specified file name corresponds to a character device Signed-off-by: Dimitris Aragiorgis --- bloc

[Qemu-devel] [PATCH 4/4] block: Include qemu-log.o in block-obj-y

2015-05-08 Thread Dimitris Aragiorgis
Building the QEMU tools fails if we #define DEBUG_BLOCK inside block/raw-posix.c. This happens because qemu-log.o is missing from block-obj-y, which causes the link to fail. Fix this. Signed-off-by: Dimitris Aragiorgis --- Makefile.objs |2 +- 1 file changed, 1 insertion(+), 1 deletion

[Qemu-devel] [PATCH 0/4] Some fixes related to scsi-generic

2015-05-08 Thread Dimitris Aragiorgis
Hi all, These four patches make slight changes to the way QEMU handles SCSI generic devices to fix a number of small problems. I am sending them against the master branch, since I don't know if they can be considered bugfixes. Thanks, dimara Dimitris Aragiorgis (4): Fix migration in ca

[Qemu-devel] [PATCH 2/4] block: Use bdrv_is_sg() everywhere

2015-05-08 Thread Dimitris Aragiorgis
Instead of checking bs->sg use bdrv_is_sg() consistently throughout the code. Signed-off-by: Dimitris Aragiorgis --- block.c |6 +++--- block/iscsi.c |2 +- block/raw-posix.c |4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/block.c b/bloc

[Qemu-devel] Strange monitor behavior related to hotplug commands

2014-01-24 Thread Dimitris Aragiorgis
Hi, After having heavily used device_add/netdev_add lately with QEMU 1.7, we encountered the following strange behavior: 1) Get network/PCI configuration for a VM # echo info network | socat STDIO UNIX-CONNECT:/path/to/monitor/socket QEMU 1.7.0 monitor - type 'help' for more informatio