1. 09 9月, 2010 1 次提交
    • S
      [V4] virtio-9p: readdir implementation for 9p2000.L · c18e2f94
      Sripathi Kodi 提交于
      This patch implements the server part of readdir() implementation for
      9p2000.L
      
          SYNOPSIS
      
          size[4] Treaddir tag[2] fid[4] offset[8] count[4]
          size[4] Rreaddir tag[2] count[4] data[count]
      
          DESCRIPTION
      
          The readdir request asks the server to read the directory specified by 'fid'
          at an offset specified by 'offset' and return as many dirent structures as
          possible that fit into count bytes. Each dirent structure is laid out as
          follows.
      
                  qid.type[1]
                    the type of the file (directory, etc.), represented as a bit
                    vector corresponding to the high 8 bits of the file's mode
                    word.
      
                  qid.vers[4]
                    version number for given path
      
                  qid.path[8]
                    the file server's unique identification for the file
      
                  offset[8]
                    offset into the next dirent.
      
                  type[1]
                    type of this directory entry.
      
                  name[256]
                    name of this directory entry.
      Signed-off-by: NSripathi Kodi <sripathik@in.ibm.com>
      Reviewed-by: NM. Mohan Kumar <mohan@in.ibm.com>
      Signed-off-by: NVenkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
      c18e2f94
  2. 13 7月, 2010 1 次提交
    • S
      virtio-9p: Avoid SEGV when log file couldn't be opened · a03c54f1
      Sripathi Kodi 提交于
      While running in debug mode if 9P server is unable to open the log file
      it results in a SEGV deep down in glibc:
      
      Program received signal SIGSEGV, Segmentation fault.
      0x008fca8c in fwrite () from /lib/libc.so.6
      (gdb) bt
      #0  0x008fca8c in fwrite () from /lib/libc.so.6
      #1  0x081eb87e in pprint_pdu (pdu=0x89a52e1c)
          at /data/sripathi/code/qemu/new/qemu-next-upstream/hw/virtio-9p-debug.c:380
      #2  0x0806dad8 in submit_pdu (s=0x897dc008, pdu=0x89a52e1c)
          at /data/sripathi/code/qemu/new/qemu-next-upstream/hw/virtio-9p.c:3092
      #3  0x0806dc63 in handle_9p_output (vdev=0x897dc008, vq=0x86d8218)
          at /data/sripathi/code/qemu/new/qemu-next-upstream/hw/virtio-9p.c:3122
      #4  0x081ac728 in virtio_queue_notify (vdev=0x897dc008, n=0)
          at /data/sripathi/code/qemu/new/qemu-next-upstream/hw/virtio.c:563
      #5  0x08063876 in virtio_ioport_write (opaque=0x86d7b98, addr=16, val=0)
          at /data/sripathi/code/qemu/new/qemu-next-upstream/hw/virtio-pci.c:222
      #6  0x08063e26 in virtio_pci_config_writew (opaque=0x86d7b98, addr=16, val=0)
          at /data/sripathi/code/qemu/new/qemu-next-upstream/hw/virtio-pci.c:357
      #7  0x080c881a in ioport_write (index=1, address=49296, data=0) at ioport.c:80
      #8  0x080c8d4c in cpu_outw (addr=49296, val=0) at ioport.c:204
      #9  0x08073010 in kvm_handle_io (port=49296, data=0xab393000, direction=1, size=2, count=1)
          at /data/sripathi/code/qemu/new/qemu-next-upstream/kvm-all.c:735
      ...
      ...
      
      This is ugly and misleading. The following patch adds a BUG_ON to catch this
      error. With this patch we get an abort message like the following, which makes
      it easier to analyze:
      
      f12-kvm login: qemu: /data/sripathi/code/qemu/new/qemu-next-upstream/hw/virtio-9p-debug.c:353: pprint_pdu: Assertion `!(!llogfile)' failed.
      Signed-off-by: NSripathi Kodi <sripathik@in.ibm.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      a03c54f1
  3. 23 6月, 2010 1 次提交
  4. 04 5月, 2010 1 次提交