Diff for /qemu/posix-aio-compat.c between versions 1.1.1.4 and 1.1.1.5

version 1.1.1.4, 2018/04/24 18:23:43 version 1.1.1.5, 2018/04/24 18:33:41
Line 24 Line 24
   
 #include "qemu-queue.h"  #include "qemu-queue.h"
 #include "osdep.h"  #include "osdep.h"
   #include "sysemu.h"
 #include "qemu-common.h"  #include "qemu-common.h"
   #include "trace.h"
 #include "block_int.h"  #include "block_int.h"
   
 #include "block/raw-posix-aio.h"  #include "block/raw-posix-aio.h"
Line 127  static ssize_t handle_aiocb_ioctl(struct Line 129  static ssize_t handle_aiocb_ioctl(struct
   
     /*      /*
      * This looks weird, but the aio code only consideres a request       * This looks weird, but the aio code only consideres a request
      * successfull if it has written the number full number of bytes.       * successful if it has written the number full number of bytes.
      *       *
      * Now we overload aio_nbytes as aio_ioctl_cmd for the ioctl command,       * Now we overload aio_nbytes as aio_ioctl_cmd for the ioctl command,
      * so in fact we return the ioctl command here to make posix_aio_read()       * so in fact we return the ioctl command here to make posix_aio_read()
Line 269  static ssize_t handle_aiocb_rw(struct qe Line 271  static ssize_t handle_aiocb_rw(struct qe
      * Ok, we have to do it the hard way, copy all segments into       * Ok, we have to do it the hard way, copy all segments into
      * a single aligned buffer.       * a single aligned buffer.
      */       */
     buf = qemu_memalign(512, aiocb->aio_nbytes);      buf = qemu_blockalign(aiocb->common.bs, aiocb->aio_nbytes);
     if (aiocb->aio_type & QEMU_AIO_WRITE) {      if (aiocb->aio_type & QEMU_AIO_WRITE) {
         char *p = buf;          char *p = buf;
         int i;          int i;
Line 583  BlockDriverAIOCB *paio_submit(BlockDrive Line 585  BlockDriverAIOCB *paio_submit(BlockDrive
     acb->next = posix_aio_state->first_aio;      acb->next = posix_aio_state->first_aio;
     posix_aio_state->first_aio = acb;      posix_aio_state->first_aio = acb;
   
       trace_paio_submit(acb, opaque, sector_num, nb_sectors, type);
     qemu_paio_submit(acb);      qemu_paio_submit(acb);
     return &acb->common;      return &acb->common;
 }  }

Removed from v.1.1.1.4  
changed lines
  Added in v.1.1.1.5


unix.superglobalmegacorp.com