[{"id":1759845,"web_url":"http://patchwork.ozlabs.org/comment/1759845/","msgid":"<cb291f47-2fb5-8d97-ff89-c8ccaded345c@amsat.org>","list_archive_url":null,"date":"2017-08-30T03:14:47","subject":"Re: [Qemu-devel] [PATCH v2 5/9] IDE: replace DEBUG_AIO with trace\n\tevents","submitter":{"id":70924,"url":"http://patchwork.ozlabs.org/api/people/70924/","name":"Philippe Mathieu-Daudé","email":"f4bug@amsat.org"},"content":"Hi John,\n\nOn 08/29/2017 05:49 PM, John Snow wrote:\n> Signed-off-by: John Snow <jsnow@redhat.com>\n> ---\n>   hw/ide/atapi.c            |  5 +----\n>   hw/ide/core.c             | 17 ++++++++++-------\n>   hw/ide/trace-events       |  3 +++\n>   include/hw/ide/internal.h |  6 ++++--\n>   4 files changed, 18 insertions(+), 13 deletions(-)\n> \n> diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c\n> index 37fa699..b8fc51e 100644\n> --- a/hw/ide/atapi.c\n> +++ b/hw/ide/atapi.c\n> @@ -416,10 +416,7 @@ static void ide_atapi_cmd_read_dma_cb(void *opaque, int ret)\n>           s->io_buffer_size = n * 2048;\n>           data_offset = 0;\n>       }\n> -#ifdef DEBUG_AIO\n> -    printf(\"aio_read_cd: lba=%u n=%d\\n\", s->lba, n);\n> -#endif\n> -\n> +    trace_ide_atapi_cmd_read_dma_cb_aio(s, s->lba, n);\n>       s->bus->dma->iov.iov_base = (void *)(s->io_buffer + data_offset);\n>       s->bus->dma->iov.iov_len = n * ATAPI_SECTOR_SIZE;\n>       qemu_iovec_init_external(&s->bus->dma->qiov, &s->bus->dma->iov, 1);\n> diff --git a/hw/ide/core.c b/hw/ide/core.c\n> index 82a19b1..a1c90e9 100644\n> --- a/hw/ide/core.c\n> +++ b/hw/ide/core.c\n> @@ -58,6 +58,13 @@ static const int smart_attributes[][12] = {\n>       { 190,  0x03, 0x00, 0x45, 0x45, 0x1f, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x32},\n>   };\n>   \n> +const char *IDE_DMA_CMD_lookup[IDE_DMA__COUNT] = {\n> +    [IDE_DMA_READ] = \"DMA READ\",\n> +    [IDE_DMA_WRITE] = \"DMA WRITE\",\n> +    [IDE_DMA_TRIM] = \"DMA TRIM\",\n> +    [IDE_DMA_ATAPI] = \"DMA ATAPI\"\n> +};\n> +\n>   static void ide_dummy_transfer_stop(IDEState *s);\n>   \n>   static void padstr(char *str, const char *src, int len)\n> @@ -860,10 +867,8 @@ static void ide_dma_cb(void *opaque, int ret)\n>           goto eot;\n>       }\n>   \n> -#ifdef DEBUG_AIO\n> -    printf(\"ide_dma_cb: sector_num=%\" PRId64 \" n=%d, cmd_cmd=%d\\n\",\n> -           sector_num, n, s->dma_cmd);\n> -#endif\n> +    trace_ide_dma_cb(s, sector_num, n,\n> +                     IDE_DMA_CMD_lookup[s->dma_cmd]);\n>   \n>       if ((s->dma_cmd == IDE_DMA_READ || s->dma_cmd == IDE_DMA_WRITE) &&\n>           !ide_sect_range_ok(s, sector_num, n)) {\n> @@ -2391,9 +2396,7 @@ void ide_bus_reset(IDEBus *bus)\n>   \n>       /* pending async DMA */\n>       if (bus->dma->aiocb) {\n> -#ifdef DEBUG_AIO\n> -        printf(\"aio_cancel\\n\");\n> -#endif\n> +        trace_ide_bus_reset_aio();\n>           blk_aio_cancel(bus->dma->aiocb);\n>           bus->dma->aiocb = NULL;\n>       }\n> diff --git a/hw/ide/trace-events b/hw/ide/trace-events\n> index 8c79a6c..cc8949c 100644\n> --- a/hw/ide/trace-events\n> +++ b/hw/ide/trace-events\n> @@ -18,6 +18,8 @@ ide_cancel_dma_sync_remaining(void) \"draining all remaining requests\"\n>   ide_sector_read(int64_t sector_num, int nsectors) \"sector=%\"PRId64\" nsectors=%d\"\n>   ide_sector_write(int64_t sector_num, int nsectors) \"sector=%\"PRId64\" nsectors=%d\"\n>   ide_reset(void *s) \"IDEstate %p\"\n> +ide_bus_reset_aio(void) \"aio_cancel\"\n> +ide_dma_cb(void *s, int64_t sector_num, int n, const char *dma) \"IDEState %p; sector_num=%\"PRId64\" n=%d cmd=%s\"\n>   \n>   # BMDMA HBAs:\n>   \n> @@ -51,5 +53,6 @@ ide_atapi_cmd_reply_end_new(void *s, int status) \"IDEState: %p; new transfer sta\n>   ide_atapi_cmd_check_status(void *s) \"IDEState: %p\"\n>   ide_atapi_cmd_read(void *s, const char *method, int lba, int nb_sectors) \"IDEState: %p; read %s: LBA=%d nb_sectors=%d\"\n>   ide_atapi_cmd(void *s, uint8_t cmd) \"IDEState: %p; cmd: 0x%02x\"\n> +ide_atapi_cmd_read_dma_cb_aio(void *s, int lba, int n) \"IDEState: %p; aio read: lba=%d n=%d\"\n>   # Warning: Verbose\n>   ide_atapi_cmd_packet(void *s, uint16_t limit, const char *packet) \"IDEState: %p; limit=0x%x packet: %s\"\n> diff --git a/include/hw/ide/internal.h b/include/hw/ide/internal.h\n> index 74efe8a..db9fde0 100644\n> --- a/include/hw/ide/internal.h\n> +++ b/include/hw/ide/internal.h\n> @@ -14,7 +14,6 @@\n>   #include \"block/scsi.h\"\n>   \n>   /* debug IDE devices */\n> -//#define DEBUG_AIO\n>   #define USE_DMA_CDROM\n>   \n>   typedef struct IDEBus IDEBus;\n> @@ -333,12 +332,15 @@ struct unreported_events {\n>   };\n>   \n>   enum ide_dma_cmd {\n> -    IDE_DMA_READ,\n> +    IDE_DMA_READ = 0,\n>       IDE_DMA_WRITE,\n>       IDE_DMA_TRIM,\n>       IDE_DMA_ATAPI,\n> +    IDE_DMA__COUNT\n>   };\n>   \n> +extern const char *IDE_DMA_CMD_lookup[IDE_DMA__COUNT];\n\nI recommend you to avoid this declaring extern const array with size, I \nremember some compilers (old GCC?) ignoring array size in extern. Eric \nwill correct me!\n\nIt is much safer to use a getter:\n\nconst char *IDE_DMA_CMD_lookup(enum ide_dma_cmd cmd)\n{\n     static const char *IDE_DMA_CMD_name[IDE_DMA__COUNT] = {\n         [IDE_DMA_READ] = \"DMA READ\",\n         [IDE_DMA_WRITE] = \"DMA WRITE\",\n         [IDE_DMA_TRIM] = \"DMA TRIM\",\n         [IDE_DMA_ATAPI] = \"DMA ATAPI\"\n     };\n\n     return IDE_DMA_CMD_name[cmd];\n};\n\nIf you agree:\nReviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>\n\n> +\n>   #define ide_cmd_is_read(s) \\\n>   \t((s)->dma_cmd == IDE_DMA_READ)\n>   \n>","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"fAyw022Z\"; dkim-atps=neutral"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xhs5x6Qdyz9s81\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 30 Aug 2017 13:52:37 +1000 (AEST)","from localhost ([::1]:47984 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dmu3P-0005lE-K8\n\tfor incoming@patchwork.ozlabs.org; Tue, 29 Aug 2017 23:52:35 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:40774)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <philippe.mathieu.daude@gmail.com>)\n\tid 1dmu11-00043W-5u\n\tfor qemu-devel@nongnu.org; Tue, 29 Aug 2017 23:50:08 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <philippe.mathieu.daude@gmail.com>)\n\tid 1dmu0x-0001gL-7w\n\tfor qemu-devel@nongnu.org; Tue, 29 Aug 2017 23:50:07 -0400","from mail-qk0-x241.google.com ([2607:f8b0:400d:c09::241]:33627)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <philippe.mathieu.daude@gmail.com>)\n\tid 1dmu0x-0001fz-1w; Tue, 29 Aug 2017 23:50:03 -0400","by mail-qk0-x241.google.com with SMTP id k126so1087084qkb.0;\n\tTue, 29 Aug 2017 20:50:02 -0700 (PDT)","from [192.168.43.33] ([170.51.33.248])\n\tby smtp.gmail.com with ESMTPSA id\n\t47sm3041962qtw.28.2017.08.29.20.49.59\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tTue, 29 Aug 2017 20:50:01 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=sender:subject:to:cc:references:from:message-id:date:user-agent\n\t:mime-version:in-reply-to:content-language:content-transfer-encoding; \n\tbh=xSuRIz5NtlqywQFnQKMxmEe3BA2T2VkfiaV7mPU+SfY=;\n\tb=fAyw022ZZlczao1uj1dANlxuidTWwFNndZax9rb3V2ZlkUPyjYwmNp0MwmlpX2x9AA\n\t+TvcGWEcPuJh9TShGO94Be+v3lGDv/N8bDrxf7I0vwjdUtty/j5STwA6gA9TFReBKySk\n\tJXWZtVtVTBvCRcC4LvylleBecOkQA9jiG7SM1kgBuedZV+k3+AXOnhSX59/FYypCG2Tz\n\tDyhpPDP+xJoa3VBvgFg8Qcu6iWTX3CscE5A9ewwXyrJh5HZEjh9giXlc1ZVnGYxUB5v9\n\tpuPEo+8Y5jRWyeR9Gs9VcdhTQfHTT/tne6qa2b91mVWReaI5zGnY6Ud8sbzg3MH1ApIO\n\t6rxg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:sender:subject:to:cc:references:from:message-id\n\t:date:user-agent:mime-version:in-reply-to:content-language\n\t:content-transfer-encoding;\n\tbh=xSuRIz5NtlqywQFnQKMxmEe3BA2T2VkfiaV7mPU+SfY=;\n\tb=Gny0shO3PoNPftpw1CfPh/bAnToLL56bfCjVQIfr6ZFi8qDNCjyAkaTnvSCsbWnB8u\n\t1jAP4nb2WyGydfYhgOitWWidrUrERWZ08EHWMj3E1KKC+3FiTjAfgcPX80MbCqoxJXxy\n\tYIcBoUcnTNUYjM7PrzW+JgtHeL8a2cP8/Hq5oKPkjQgvg9auJ6oz0uvHeDjZD4kEFFr0\n\tdfq/ASuLOOSuGSLVdJENqHtkMQAiUfRi2x5OtqU63/vMqGwb2GDUx7psxI07WNq3qG2P\n\txOqgfCqDMuE9uQ9AAO7gSxcAd/KGft7JETovQJ6EurqRIRmobr/YXCVteCScnDqbdhwJ\n\tf0wg==","X-Gm-Message-State":"AHYfb5heKJ4NDEYW9HlBXQVf7KOL/wFeZ5TkmULpEvhWAw6lvKTjeYyX\n\tBKHszu8NVZE0FH/UEpzmKQ==","X-Received":"by 10.55.2.6 with SMTP id 6mr8087704qkc.310.1504065002246;\n\tTue, 29 Aug 2017 20:50:02 -0700 (PDT)","To":"John Snow <jsnow@redhat.com>, qemu-block@nongnu.org","References":"<20170829204934.9039-1-jsnow@redhat.com>\n\t<20170829204934.9039-6-jsnow@redhat.com>","From":"=?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <f4bug@amsat.org>","Message-ID":"<cb291f47-2fb5-8d97-ff89-c8ccaded345c@amsat.org>","Date":"Wed, 30 Aug 2017 00:14:47 -0300","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<20170829204934.9039-6-jsnow@redhat.com>","Content-Type":"text/plain; charset=utf-8; format=flowed","Content-Language":"en-US","Content-Transfer-Encoding":"8bit","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"2607:f8b0:400d:c09::241","Subject":"Re: [Qemu-devel] [PATCH v2 5/9] IDE: replace DEBUG_AIO with trace\n\tevents","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"qemu-devel@nongnu.org","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1760572,"web_url":"http://patchwork.ozlabs.org/comment/1760572/","msgid":"<4564eeb6-dfcb-0cb0-bf4f-3bce117314ee@redhat.com>","list_archive_url":null,"date":"2017-08-30T23:25:20","subject":"Re: [Qemu-devel] [PATCH v2 5/9] IDE: replace DEBUG_AIO with trace\n\tevents","submitter":{"id":64343,"url":"http://patchwork.ozlabs.org/api/people/64343/","name":"John Snow","email":"jsnow@redhat.com"},"content":"CCing Laszlo Ersek literally just for laughs, as he is the most\nentertaining language lawyer I know of.\n\nLaszlo, please feel free to ignore this if you don't care :P\n\nOn 08/29/2017 11:14 PM, Philippe Mathieu-Daudé wrote:\n> Hi John,\n> \n> On 08/29/2017 05:49 PM, John Snow wrote:\n>> Signed-off-by: John Snow <jsnow@redhat.com>\n>> ---\n>>   hw/ide/atapi.c            |  5 +----\n>>   hw/ide/core.c             | 17 ++++++++++-------\n>>   hw/ide/trace-events       |  3 +++\n>>   include/hw/ide/internal.h |  6 ++++--\n>>   4 files changed, 18 insertions(+), 13 deletions(-)\n>>\n>> diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c\n>> index 37fa699..b8fc51e 100644\n>> --- a/hw/ide/atapi.c\n>> +++ b/hw/ide/atapi.c\n>> @@ -416,10 +416,7 @@ static void ide_atapi_cmd_read_dma_cb(void\n>> *opaque, int ret)\n>>           s->io_buffer_size = n * 2048;\n>>           data_offset = 0;\n>>       }\n>> -#ifdef DEBUG_AIO\n>> -    printf(\"aio_read_cd: lba=%u n=%d\\n\", s->lba, n);\n>> -#endif\n>> -\n>> +    trace_ide_atapi_cmd_read_dma_cb_aio(s, s->lba, n);\n>>       s->bus->dma->iov.iov_base = (void *)(s->io_buffer + data_offset);\n>>       s->bus->dma->iov.iov_len = n * ATAPI_SECTOR_SIZE;\n>>       qemu_iovec_init_external(&s->bus->dma->qiov, &s->bus->dma->iov, 1);\n>> diff --git a/hw/ide/core.c b/hw/ide/core.c\n>> index 82a19b1..a1c90e9 100644\n>> --- a/hw/ide/core.c\n>> +++ b/hw/ide/core.c\n>> @@ -58,6 +58,13 @@ static const int smart_attributes[][12] = {\n>>       { 190,  0x03, 0x00, 0x45, 0x45, 0x1f, 0x00, 0x1f, 0x1f, 0x00,\n>> 0x00, 0x32},\n>>   };\n>>   +const char *IDE_DMA_CMD_lookup[IDE_DMA__COUNT] = {\n>> +    [IDE_DMA_READ] = \"DMA READ\",\n>> +    [IDE_DMA_WRITE] = \"DMA WRITE\",\n>> +    [IDE_DMA_TRIM] = \"DMA TRIM\",\n>> +    [IDE_DMA_ATAPI] = \"DMA ATAPI\"\n>> +};\n>> +\n>>   static void ide_dummy_transfer_stop(IDEState *s);\n>>     static void padstr(char *str, const char *src, int len)\n>> @@ -860,10 +867,8 @@ static void ide_dma_cb(void *opaque, int ret)\n>>           goto eot;\n>>       }\n>>   -#ifdef DEBUG_AIO\n>> -    printf(\"ide_dma_cb: sector_num=%\" PRId64 \" n=%d, cmd_cmd=%d\\n\",\n>> -           sector_num, n, s->dma_cmd);\n>> -#endif\n>> +    trace_ide_dma_cb(s, sector_num, n,\n>> +                     IDE_DMA_CMD_lookup[s->dma_cmd]);\n>>         if ((s->dma_cmd == IDE_DMA_READ || s->dma_cmd ==\n>> IDE_DMA_WRITE) &&\n>>           !ide_sect_range_ok(s, sector_num, n)) {\n>> @@ -2391,9 +2396,7 @@ void ide_bus_reset(IDEBus *bus)\n>>         /* pending async DMA */\n>>       if (bus->dma->aiocb) {\n>> -#ifdef DEBUG_AIO\n>> -        printf(\"aio_cancel\\n\");\n>> -#endif\n>> +        trace_ide_bus_reset_aio();\n>>           blk_aio_cancel(bus->dma->aiocb);\n>>           bus->dma->aiocb = NULL;\n>>       }\n>> diff --git a/hw/ide/trace-events b/hw/ide/trace-events\n>> index 8c79a6c..cc8949c 100644\n>> --- a/hw/ide/trace-events\n>> +++ b/hw/ide/trace-events\n>> @@ -18,6 +18,8 @@ ide_cancel_dma_sync_remaining(void) \"draining all\n>> remaining requests\"\n>>   ide_sector_read(int64_t sector_num, int nsectors) \"sector=%\"PRId64\"\n>> nsectors=%d\"\n>>   ide_sector_write(int64_t sector_num, int nsectors) \"sector=%\"PRId64\"\n>> nsectors=%d\"\n>>   ide_reset(void *s) \"IDEstate %p\"\n>> +ide_bus_reset_aio(void) \"aio_cancel\"\n>> +ide_dma_cb(void *s, int64_t sector_num, int n, const char *dma)\n>> \"IDEState %p; sector_num=%\"PRId64\" n=%d cmd=%s\"\n>>     # BMDMA HBAs:\n>>   @@ -51,5 +53,6 @@ ide_atapi_cmd_reply_end_new(void *s, int status)\n>> \"IDEState: %p; new transfer sta\n>>   ide_atapi_cmd_check_status(void *s) \"IDEState: %p\"\n>>   ide_atapi_cmd_read(void *s, const char *method, int lba, int\n>> nb_sectors) \"IDEState: %p; read %s: LBA=%d nb_sectors=%d\"\n>>   ide_atapi_cmd(void *s, uint8_t cmd) \"IDEState: %p; cmd: 0x%02x\"\n>> +ide_atapi_cmd_read_dma_cb_aio(void *s, int lba, int n) \"IDEState: %p;\n>> aio read: lba=%d n=%d\"\n>>   # Warning: Verbose\n>>   ide_atapi_cmd_packet(void *s, uint16_t limit, const char *packet)\n>> \"IDEState: %p; limit=0x%x packet: %s\"\n>> diff --git a/include/hw/ide/internal.h b/include/hw/ide/internal.h\n>> index 74efe8a..db9fde0 100644\n>> --- a/include/hw/ide/internal.h\n>> +++ b/include/hw/ide/internal.h\n>> @@ -14,7 +14,6 @@\n>>   #include \"block/scsi.h\"\n>>     /* debug IDE devices */\n>> -//#define DEBUG_AIO\n>>   #define USE_DMA_CDROM\n>>     typedef struct IDEBus IDEBus;\n>> @@ -333,12 +332,15 @@ struct unreported_events {\n>>   };\n>>     enum ide_dma_cmd {\n>> -    IDE_DMA_READ,\n>> +    IDE_DMA_READ = 0,\n>>       IDE_DMA_WRITE,\n>>       IDE_DMA_TRIM,\n>>       IDE_DMA_ATAPI,\n>> +    IDE_DMA__COUNT\n>>   };\n>>   +extern const char *IDE_DMA_CMD_lookup[IDE_DMA__COUNT];\n> \n> I recommend you to avoid this declaring extern const array with size, I\n> remember some compilers (old GCC?) ignoring array size in extern. Eric\n> will correct me!\n> \n> It is much safer to use a getter:\n> \n\nWell, whether or not the compiler ignores it, you're right that it's\nsafer to use a getter. I don't think the width being declared HURTS any\ncompiler though, does it?\n\n> const char *IDE_DMA_CMD_lookup(enum ide_dma_cmd cmd)\n> {\n>     static const char *IDE_DMA_CMD_name[IDE_DMA__COUNT] = {\n>         [IDE_DMA_READ] = \"DMA READ\",\n>         [IDE_DMA_WRITE] = \"DMA WRITE\",\n>         [IDE_DMA_TRIM] = \"DMA TRIM\",\n>         [IDE_DMA_ATAPI] = \"DMA ATAPI\"\n>     };\n> \n>     return IDE_DMA_CMD_name[cmd];\n> };\n> \n\nWhy is this safer...?\n\nHere's my opinion of enums:\n\njhuston@probe ~/s/scratch> cat enum.c\nenum foo {\n    FOO_A = 0,\n    FOO_B\n};\n\nint fn(enum foo in)\n{\n    switch (in) {\n    case FOO_A:\n    case FOO_B:\n        return 0;\n    default:\n        return 1;\n    }\n}\n\nint main(int argc, char *argv[])\n{\n    return fn(2);\n}\n\n\njhuston@probe ~/s/scratch> gcc -ansi -Wall -pedantic -o enum enum.c\njhuston@probe ~/s/scratch> ./enum\njhuston@probe ~/s/scratch> echo $status\n1\n\n\nNo warnings, no messages, it just happily takes a value outside the\ndomain and in this case it doesn't explode because I caught it, but,\ntake a look:\n\njhuston@probe ~/s/scratch> cat enum.c\n#include <stdio.h>\n\nenum foo {\n    FOO_A = 0,\n    FOO_B,\n    FOO__COUNT\n};\n\nconst char *table[FOO__COUNT] = {\"FOO_A\", \"FOO_B\"};\n\nint fn(enum foo in)\n{\n    fprintf(stderr, \"%s\\n\", table[in]);\n    switch (in) {\n    case FOO_A:\n    case FOO_B:\n        return 0;\n    default:\n        return 1;\n    }\n}\n\nint main(int argc, char *argv[])\n{\n    return fn(2);\n}\n\nSimilar program, let's compile it:\n\njhuston@probe ~/s/scratch> gcc -ansi -Wall -pedantic -o enum enum.c\njhuston@probe ~/s/scratch> ./enum\n� �\n\n\nAh, dang.\n\nThis is why I prefer to have my assertions and don't trust enums to be\nchecked rigorously.\n\nFor anyone playing along at home, yes, if you specify at least -O1 here\nit will catch it:\n\njhuston@probe ~/s/scratch> gcc -ansi -Wall -pedantic -O3 -o enum enum.c\nenum.c: In function ‘main’:\nenum.c:13:5: warning: array subscript is above array bounds [-Warray-bounds]\n     fprintf(stderr, \"%s\\n\", table[in]);\n     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nOh no, what the hell is clang up to, though?\n\njhuston@probe ~/s/scratch> clang -ansi -Wall -pedantic -O3 -o enum enum.c\njhuston@probe ~/s/scratch>\n\n\nOh no...\n\nhttp://i.imgur.com/uRvorq3.jpg\n\n> If you agree:\n> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>\n> \n\nSomewhat. I will write a getter that does bounds checking. It _is_ safer\nthat way, though I don't think we'll ever run into a situation where it\nwould come up.\n\n>> +\n>>   #define ide_cmd_is_read(s) \\\n>>       ((s)->dma_cmd == IDE_DMA_READ)\n>>  \n>","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx03.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx03.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=jsnow@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xjM8X3x09z9s7f\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 31 Aug 2017 09:26:35 +1000 (AEST)","from localhost ([::1]:53205 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dnCNU-0001Th-Pw\n\tfor incoming@patchwork.ozlabs.org; Wed, 30 Aug 2017 19:26:32 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:42348)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <jsnow@redhat.com>) id 1dnCMV-00018Y-1O\n\tfor qemu-devel@nongnu.org; Wed, 30 Aug 2017 19:25:35 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <jsnow@redhat.com>) id 1dnCMT-0003sZ-DD\n\tfor qemu-devel@nongnu.org; Wed, 30 Aug 2017 19:25:31 -0400","from mx1.redhat.com ([209.132.183.28]:48632)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <jsnow@redhat.com>)\n\tid 1dnCMM-0003qV-Tm; Wed, 30 Aug 2017 19:25:23 -0400","from smtp.corp.redhat.com\n\t(int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id B72287E433;\n\tWed, 30 Aug 2017 23:25:21 +0000 (UTC)","from [10.18.17.130] (dhcp-17-130.bos.redhat.com [10.18.17.130])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id CFFF3176D4;\n\tWed, 30 Aug 2017 23:25:20 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com B72287E433","To":"=?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <f4bug@amsat.org>,\n\tqemu-block@nongnu.org","References":"<20170829204934.9039-1-jsnow@redhat.com>\n\t<20170829204934.9039-6-jsnow@redhat.com>\n\t<cb291f47-2fb5-8d97-ff89-c8ccaded345c@amsat.org>","From":"John Snow <jsnow@redhat.com>","Message-ID":"<4564eeb6-dfcb-0cb0-bf4f-3bce117314ee@redhat.com>","Date":"Wed, 30 Aug 2017 19:25:20 -0400","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<cb291f47-2fb5-8d97-ff89-c8ccaded345c@amsat.org>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.15","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.27]);\n\tWed, 30 Aug 2017 23:25:21 +0000 (UTC)","Content-Transfer-Encoding":"quoted-printable","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [PATCH v2 5/9] IDE: replace DEBUG_AIO with trace\n\tevents","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Laszlo Ersek <lersek@redhat.com>, qemu-devel@nongnu.org","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1761157,"web_url":"http://patchwork.ozlabs.org/comment/1761157/","msgid":"<8deb650a-3176-4a32-4814-b819f04325f9@redhat.com>","list_archive_url":null,"date":"2017-08-31T16:19:01","subject":"Re: [Qemu-devel] [PATCH v2 5/9] IDE: replace DEBUG_AIO with trace\n\tevents","submitter":{"id":9243,"url":"http://patchwork.ozlabs.org/api/people/9243/","name":"Laszlo Ersek","email":"lersek@redhat.com"},"content":"On 08/31/17 01:25, John Snow wrote:\n> CCing Laszlo Ersek literally just for laughs, as he is the most\n> entertaining language lawyer I know of.\n> \n> Laszlo, please feel free to ignore this if you don't care :P\n> \n> On 08/29/2017 11:14 PM, Philippe Mathieu-Daudé wrote:\n>> Hi John,\n>>\n>> On 08/29/2017 05:49 PM, John Snow wrote:\n>>> Signed-off-by: John Snow <jsnow@redhat.com>\n>>> ---\n>>>   hw/ide/atapi.c            |  5 +----\n>>>   hw/ide/core.c             | 17 ++++++++++-------\n>>>   hw/ide/trace-events       |  3 +++\n>>>   include/hw/ide/internal.h |  6 ++++--\n>>>   4 files changed, 18 insertions(+), 13 deletions(-)\n>>>\n>>> diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c\n>>> index 37fa699..b8fc51e 100644\n>>> --- a/hw/ide/atapi.c\n>>> +++ b/hw/ide/atapi.c\n>>> @@ -416,10 +416,7 @@ static void ide_atapi_cmd_read_dma_cb(void\n>>> *opaque, int ret)\n>>>           s->io_buffer_size = n * 2048;\n>>>           data_offset = 0;\n>>>       }\n>>> -#ifdef DEBUG_AIO\n>>> -    printf(\"aio_read_cd: lba=%u n=%d\\n\", s->lba, n);\n>>> -#endif\n>>> -\n>>> +    trace_ide_atapi_cmd_read_dma_cb_aio(s, s->lba, n);\n>>>       s->bus->dma->iov.iov_base = (void *)(s->io_buffer + data_offset);\n>>>       s->bus->dma->iov.iov_len = n * ATAPI_SECTOR_SIZE;\n>>>       qemu_iovec_init_external(&s->bus->dma->qiov, &s->bus->dma->iov, 1);\n>>> diff --git a/hw/ide/core.c b/hw/ide/core.c\n>>> index 82a19b1..a1c90e9 100644\n>>> --- a/hw/ide/core.c\n>>> +++ b/hw/ide/core.c\n>>> @@ -58,6 +58,13 @@ static const int smart_attributes[][12] = {\n>>>       { 190,  0x03, 0x00, 0x45, 0x45, 0x1f, 0x00, 0x1f, 0x1f, 0x00,\n>>> 0x00, 0x32},\n>>>   };\n>>>   +const char *IDE_DMA_CMD_lookup[IDE_DMA__COUNT] = {\n>>> +    [IDE_DMA_READ] = \"DMA READ\",\n>>> +    [IDE_DMA_WRITE] = \"DMA WRITE\",\n>>> +    [IDE_DMA_TRIM] = \"DMA TRIM\",\n>>> +    [IDE_DMA_ATAPI] = \"DMA ATAPI\"\n>>> +};\n>>> +\n>>>   static void ide_dummy_transfer_stop(IDEState *s);\n>>>     static void padstr(char *str, const char *src, int len)\n>>> @@ -860,10 +867,8 @@ static void ide_dma_cb(void *opaque, int ret)\n>>>           goto eot;\n>>>       }\n>>>   -#ifdef DEBUG_AIO\n>>> -    printf(\"ide_dma_cb: sector_num=%\" PRId64 \" n=%d, cmd_cmd=%d\\n\",\n>>> -           sector_num, n, s->dma_cmd);\n>>> -#endif\n>>> +    trace_ide_dma_cb(s, sector_num, n,\n>>> +                     IDE_DMA_CMD_lookup[s->dma_cmd]);\n>>>         if ((s->dma_cmd == IDE_DMA_READ || s->dma_cmd ==\n>>> IDE_DMA_WRITE) &&\n>>>           !ide_sect_range_ok(s, sector_num, n)) {\n>>> @@ -2391,9 +2396,7 @@ void ide_bus_reset(IDEBus *bus)\n>>>         /* pending async DMA */\n>>>       if (bus->dma->aiocb) {\n>>> -#ifdef DEBUG_AIO\n>>> -        printf(\"aio_cancel\\n\");\n>>> -#endif\n>>> +        trace_ide_bus_reset_aio();\n>>>           blk_aio_cancel(bus->dma->aiocb);\n>>>           bus->dma->aiocb = NULL;\n>>>       }\n>>> diff --git a/hw/ide/trace-events b/hw/ide/trace-events\n>>> index 8c79a6c..cc8949c 100644\n>>> --- a/hw/ide/trace-events\n>>> +++ b/hw/ide/trace-events\n>>> @@ -18,6 +18,8 @@ ide_cancel_dma_sync_remaining(void) \"draining all\n>>> remaining requests\"\n>>>   ide_sector_read(int64_t sector_num, int nsectors) \"sector=%\"PRId64\"\n>>> nsectors=%d\"\n>>>   ide_sector_write(int64_t sector_num, int nsectors) \"sector=%\"PRId64\"\n>>> nsectors=%d\"\n>>>   ide_reset(void *s) \"IDEstate %p\"\n>>> +ide_bus_reset_aio(void) \"aio_cancel\"\n>>> +ide_dma_cb(void *s, int64_t sector_num, int n, const char *dma)\n>>> \"IDEState %p; sector_num=%\"PRId64\" n=%d cmd=%s\"\n>>>     # BMDMA HBAs:\n>>>   @@ -51,5 +53,6 @@ ide_atapi_cmd_reply_end_new(void *s, int status)\n>>> \"IDEState: %p; new transfer sta\n>>>   ide_atapi_cmd_check_status(void *s) \"IDEState: %p\"\n>>>   ide_atapi_cmd_read(void *s, const char *method, int lba, int\n>>> nb_sectors) \"IDEState: %p; read %s: LBA=%d nb_sectors=%d\"\n>>>   ide_atapi_cmd(void *s, uint8_t cmd) \"IDEState: %p; cmd: 0x%02x\"\n>>> +ide_atapi_cmd_read_dma_cb_aio(void *s, int lba, int n) \"IDEState: %p;\n>>> aio read: lba=%d n=%d\"\n>>>   # Warning: Verbose\n>>>   ide_atapi_cmd_packet(void *s, uint16_t limit, const char *packet)\n>>> \"IDEState: %p; limit=0x%x packet: %s\"\n>>> diff --git a/include/hw/ide/internal.h b/include/hw/ide/internal.h\n>>> index 74efe8a..db9fde0 100644\n>>> --- a/include/hw/ide/internal.h\n>>> +++ b/include/hw/ide/internal.h\n>>> @@ -14,7 +14,6 @@\n>>>   #include \"block/scsi.h\"\n>>>     /* debug IDE devices */\n>>> -//#define DEBUG_AIO\n>>>   #define USE_DMA_CDROM\n>>>     typedef struct IDEBus IDEBus;\n>>> @@ -333,12 +332,15 @@ struct unreported_events {\n>>>   };\n>>>     enum ide_dma_cmd {\n>>> -    IDE_DMA_READ,\n>>> +    IDE_DMA_READ = 0,\n>>>       IDE_DMA_WRITE,\n>>>       IDE_DMA_TRIM,\n>>>       IDE_DMA_ATAPI,\n>>> +    IDE_DMA__COUNT\n>>>   };\n>>>   +extern const char *IDE_DMA_CMD_lookup[IDE_DMA__COUNT];\n>>\n>> I recommend you to avoid this declaring extern const array with size, I\n>> remember some compilers (old GCC?) ignoring array size in extern. Eric\n>> will correct me!\n>>\n>> It is much safer to use a getter:\n>>\n> \n> Well, whether or not the compiler ignores it, you're right that it's\n> safer to use a getter. I don't think the width being declared HURTS any\n> compiler though, does it?\n\nIf, in the above declaration, you say\n\nextern const char *IDE_DMA_CMD_lookup[];\n\nthen the \"IDE_DMA_CMD_lookup\" will have \"incomplete array type\". In a\ntranslation unit that includes this declaration, but doesn't actually\n*define* the array (thereby completing its type), you can e.g. subscript\nthe array like this:\n\n  IDE_CMD_DMA_lookup[IDE_DMA_WRITE]\n\nbut you cannot do anything with it that would require it to have a\ncomplete type, such as:\n\n  sizeof IDE_CMD_DMA_lookup\n\n\nIf you declare the array as quoted above, then the type will be complete\nfor all translation units that include the declaration, not just for the\none that defines the array.\n\nWhich one I'd recommend depends on the use case. If it's OK to expose\nthe size of the array to all consumers (or the IDE_DMA__COUNT\nenumeration constant), then I'd go with the complete type in the\ndeclaration. It communicates the intent.\n\nAnd no, the compiler is not required to catch your out-of-bounds access\nin either case; but that's not the point. The point is that the human\nthat looks at the declaration will know how to bounds-check the access.\n\nIf you write a getter function, then either declaration will work just\nfine, but in that case, you don't even need the array. Just add a switch\nstatement to your getter, and return the addresses of open-coded string\nliterals.\n\n> \n>> const char *IDE_DMA_CMD_lookup(enum ide_dma_cmd cmd)\n>> {\n>>     static const char *IDE_DMA_CMD_name[IDE_DMA__COUNT] = {\n>>         [IDE_DMA_READ] = \"DMA READ\",\n>>         [IDE_DMA_WRITE] = \"DMA WRITE\",\n>>         [IDE_DMA_TRIM] = \"DMA TRIM\",\n>>         [IDE_DMA_ATAPI] = \"DMA ATAPI\"\n>>     };\n>>\n>>     return IDE_DMA_CMD_name[cmd];\n>> };\n>>\n> \n> Why is this safer...?\n> \n> Here's my opinion of enums:\n> \n> jhuston@probe ~/s/scratch> cat enum.c\n> enum foo {\n>     FOO_A = 0,\n>     FOO_B\n> };\n> \n> int fn(enum foo in)\n> {\n>     switch (in) {\n>     case FOO_A:\n>     case FOO_B:\n>         return 0;\n>     default:\n>         return 1;\n>     }\n> }\n> \n> int main(int argc, char *argv[])\n> {\n>     return fn(2);\n> }\n> \n> \n> jhuston@probe ~/s/scratch> gcc -ansi -Wall -pedantic -o enum enum.c\n> jhuston@probe ~/s/scratch> ./enum\n> jhuston@probe ~/s/scratch> echo $status\n> 1\n> \n> \n> No warnings, no messages, it just happily takes a value outside the\n> domain and in this case it doesn't explode because I caught it, but,\n> take a look:\n> \n> jhuston@probe ~/s/scratch> cat enum.c\n> #include <stdio.h>\n> \n> enum foo {\n>     FOO_A = 0,\n>     FOO_B,\n>     FOO__COUNT\n> };\n> \n> const char *table[FOO__COUNT] = {\"FOO_A\", \"FOO_B\"};\n> \n> int fn(enum foo in)\n> {\n>     fprintf(stderr, \"%s\\n\", table[in]);\n>     switch (in) {\n>     case FOO_A:\n>     case FOO_B:\n>         return 0;\n>     default:\n>         return 1;\n>     }\n> }\n> \n> int main(int argc, char *argv[])\n> {\n>     return fn(2);\n> }\n> \n> Similar program, let's compile it:\n> \n> jhuston@probe ~/s/scratch> gcc -ansi -Wall -pedantic -o enum enum.c\n> jhuston@probe ~/s/scratch> ./enum\n> � �\n> \n> \n> Ah, dang.\n> \n> This is why I prefer to have my assertions and don't trust enums to be\n> checked rigorously.\n> \n> For anyone playing along at home, yes, if you specify at least -O1 here\n> it will catch it:\n> \n> jhuston@probe ~/s/scratch> gcc -ansi -Wall -pedantic -O3 -o enum enum.c\n> enum.c: In function ‘main’:\n> enum.c:13:5: warning: array subscript is above array bounds [-Warray-bounds]\n>      fprintf(stderr, \"%s\\n\", table[in]);\n>      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n> \n> Oh no, what the hell is clang up to, though?\n> \n> jhuston@probe ~/s/scratch> clang -ansi -Wall -pedantic -O3 -o enum enum.c\n> jhuston@probe ~/s/scratch>\n> \n> \n> Oh no...\n> \n> http://i.imgur.com/uRvorq3.jpg\n\nI wouldn't like to quote all the standardese related to enums. My point\nhere is that the compiler might choose \"signed char\", for example, for\nrepresenting the \"enum foo\" type. Let's say the range of \"signed char\"\nis -128..127 inclusive.\n\nNow assume you pass value 128 (of type \"int\") to a function that takes\n\"enum foo\", such as your fn(). The argument is converted as in an\nassignment, and the following applies:\n\n  6.3 Conversions\n  6.3.1 Arithmetic operands\n  6.3.1.1 Boolean, characters, and integers\n    1 [...]\n       - The rank of any enumerated type shall equal the rank of the\n         compatible integer type (see 6.7.2.2).\n    [...]\n  6.3.1.3 Signed and unsigned integers\n    [...]\n    3 Otherwise, the new type is signed and the value cannot be\n      represented in it; either the result is implementation-defined or\n      an implementation-defined signal is raised.\n\nDependent on what the docs for your C language implementation say, you\ncould get total garbage in fn(), or you could get a signal before your\ncode in fn() is reached.\n\nIOW, if you cannot guarantee *before* the function call that the value\nyou pass to fn() -- or convert to \"enum foo\" otherwise -- will nicely\nfit in \"enum foo\"'s represenative integer type, then catching it in fn()\nis too late.\n\nI suggest assigning to \"enum foo\" only\n- another \"enum foo\" object,\n- a matching enumeration constant (which has type \"int\", but will fit of\n  course),\n- any integer value that has been range-checked explicitly.\n\nThe last point does encourage that your getter function should take,\nsay, \"unsigned int\" rather than \"enum foo\"; it handles incorrect calls\nmore portably.\n\n... I'm unsure if this wall of text is relevant *at all* here, but I've\nhad to live up to past entertainment! ;)\n\nLaszlo\n\n> \n>> If you agree:\n>> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>\n>>\n> \n> Somewhat. I will write a getter that does bounds checking. It _is_ safer\n> that way, though I don't think we'll ever run into a situation where it\n> would come up.\n> \n>>> +\n>>>   #define ide_cmd_is_read(s) \\\n>>>       ((s)->dma_cmd == IDE_DMA_READ)\n>>>  \n>>\n>","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=208.118.235.17; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx09.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx09.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=lersek@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [208.118.235.17])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xjndp0RkKz9sMN\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  1 Sep 2017 02:19:58 +1000 (AEST)","from localhost ([::1]:56626 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dnSCB-00053n-Ve\n\tfor incoming@patchwork.ozlabs.org; Thu, 31 Aug 2017 12:19:56 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:48841)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <lersek@redhat.com>) id 1dnSBZ-00050T-HS\n\tfor qemu-devel@nongnu.org; Thu, 31 Aug 2017 12:19:20 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <lersek@redhat.com>) id 1dnSBV-0008Ge-P0\n\tfor qemu-devel@nongnu.org; Thu, 31 Aug 2017 12:19:17 -0400","from mx1.redhat.com ([209.132.183.28]:17195)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <lersek@redhat.com>)\n\tid 1dnSBP-0008Fh-Gg; Thu, 31 Aug 2017 12:19:07 -0400","from smtp.corp.redhat.com\n\t(int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 9EB894E33B;\n\tThu, 31 Aug 2017 16:19:06 +0000 (UTC)","from lacos-laptop-7.usersys.redhat.com (ovpn-116-89.phx2.redhat.com\n\t[10.3.116.89])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 0C5D5A8437;\n\tThu, 31 Aug 2017 16:19:02 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 9EB894E33B","To":"John Snow <jsnow@redhat.com>, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?=\n\t<f4bug@amsat.org>, qemu-block@nongnu.org","References":"<20170829204934.9039-1-jsnow@redhat.com>\n\t<20170829204934.9039-6-jsnow@redhat.com>\n\t<cb291f47-2fb5-8d97-ff89-c8ccaded345c@amsat.org>\n\t<4564eeb6-dfcb-0cb0-bf4f-3bce117314ee@redhat.com>","From":"Laszlo Ersek <lersek@redhat.com>","Message-ID":"<8deb650a-3176-4a32-4814-b819f04325f9@redhat.com>","Date":"Thu, 31 Aug 2017 18:19:01 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<4564eeb6-dfcb-0cb0-bf4f-3bce117314ee@redhat.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.12","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.38]);\n\tThu, 31 Aug 2017 16:19:06 +0000 (UTC)","Content-Transfer-Encoding":"quoted-printable","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [PATCH v2 5/9] IDE: replace DEBUG_AIO with trace\n\tevents","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"qemu-devel@nongnu.org","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}}]