1. 21 9月, 2017 34 次提交
  2. 20 9月, 2017 6 次提交
    • J
      9pfs: check the size of transport buffer before marshaling · 772a7369
      Jan Dakinevich 提交于
      v9fs_do_readdir_with_stat() should check for a maximum buffer size
      before an attempt to marshal gathered data. Otherwise, buffers assumed
      as misconfigured and the transport would be broken.
      
      The patch brings v9fs_do_readdir_with_stat() in conformity with
      v9fs_do_readdir() behavior.
      Signed-off-by: NJan Dakinevich <jan.dakinevich@gmail.com>
      [groug, regression caused my commit 8d37de41 # 2.10]
      Signed-off-by: NGreg Kurz <groug@kaod.org>
      772a7369
    • J
      9pfs: fix name_to_path assertion in v9fs_complete_rename() · 4d8bc733
      Jan Dakinevich 提交于
      The third parameter of v9fs_co_name_to_path() must not contain `/'
      character.
      
      The issue is most likely related to 9p2000.u protocol only.
      Signed-off-by: NJan Dakinevich <jan.dakinevich@gmail.com>
      [groug, regression caused by commit f57f5878 # 2.10]
      Signed-off-by: NGreg Kurz <groug@kaod.org>
      4d8bc733
    • J
      9pfs: fix readdir() for 9p2000.u · 6069537f
      Jan Dakinevich 提交于
      If the client is using 9p2000.u, the following occurs:
      
      $ cd ${virtfs_shared_dir}
      $ mkdir -p a/b/c
      $ ls a/b
      ls: cannot access 'a/b/a': No such file or directory
      ls: cannot access 'a/b/b': No such file or directory
      a  b  c
      
      instead of the expected:
      
      $ ls a/b
      c
      
      This is a regression introduced by commit f57f5878;
      local_name_to_path() now resolves ".." and "." in paths,
      and v9fs_do_readdir_with_stat()->stat_to_v9stat() then
      copies the basename of the resulting path to the response.
      With the example above, this means that "." and ".." are
      turned into "b" and "a" respectively...
      
      stat_to_v9stat() currently assumes it is passed a full
      canonicalized path and uses it to do two different things:
      1) to pass it to v9fs_co_readlink() in case the file is a symbolic
         link
      2) to set the name field of the V9fsStat structure to the basename
         part of the given path
      
      It only has two users: v9fs_stat() and v9fs_do_readdir_with_stat().
      
      v9fs_stat() really needs 1) and 2) to be performed since it starts
      with the full canonicalized path stored in the fid. It is different
      for v9fs_do_readdir_with_stat() though because the name we want to
      put into the V9fsStat structure is the d_name field of the dirent
      actually (ie, we want to keep the "." and ".." special names). So,
      we only need 1) in this case.
      
      This patch hence adds a basename argument to stat_to_v9stat(), to
      be used to set the name field of the V9fsStat structure, and moves
      the basename logic to v9fs_stat().
      Signed-off-by: NJan Dakinevich <jan.dakinevich@gmail.com>
      (groug, renamed old name argument to path and updated changelog)
      Signed-off-by: NGreg Kurz <groug@kaod.org>
      6069537f
    • E
      MAINTAINERS: Update git URLs for my trees · e3d038b8
      Eduardo Habkost 提交于
      List the branches where I queue patches for Machine Core, NUMA,
      Memory Backends, and X86.  Update the NUMA section to list the
      "machine-next" branch instead of "numa".
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <20170901153928.17058-1-ehabkost@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      e3d038b8
    • E
      hw/acpi-build: Fix SRAT memory building in case of node 0 without RAM · 4926403c
      Eduardo Habkost 提交于
      Currently, Using the fisrt node without memory on the machine makes
      QEMU unhappy. With this example command line:
        ... \
        -m 1024M,slots=4,maxmem=32G \
        -numa node,nodeid=0 \
        -numa node,mem=1024M,nodeid=1 \
        -numa node,nodeid=2 \
        -numa node,nodeid=3 \
      Guest reports "No NUMA configuration found" and the NUMA topology is
      wrong.
      
      This is because when QEMU builds ACPI SRAT, it regards node 0 as the
      default node to deal with the memory hole(640K-1M). this means the
      node0 must have some memory(>1M), but, actually it can have no
      memory.
      
      Fix this problem by cut out the 640K hole in the same way the PCI
      4G hole does.
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: NDou Liyang <douly.fnst@cn.fujitsu.com>
      Message-Id: <1504231805-30957-2-git-send-email-douly.fnst@cn.fujitsu.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      4926403c
    • D
      NUMA: Replace MAX_NODES with nb_numa_nodes in for loop · f51878ba
      Dou Liyang 提交于
      In QEMU, the number of the NUMA nodes is determined by parse_numa_opts().
      Then, QEMU uses it for iteration, for example:
        for (i = 0; i < nb_numa_nodes; i++)
      
      However, in memory_region_allocate_system_memory(), it uses MAX_NODES
      not nb_numa_nodes.
      
      So, replace MAX_NODES with nb_numa_nodes to keep code consistency and
      reduce the loop times.
      Signed-off-by: NDou Liyang <douly.fnst@cn.fujitsu.com>
      Message-Id: <1503387936-3483-1-git-send-email-douly.fnst@cn.fujitsu.com>
      Reviewed-by: NIgor Mammedov <imammedo@redhat.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      f51878ba