1. 25 4月, 2013 16 次提交
  2. 11 4月, 2013 5 次提交
  3. 09 4月, 2013 2 次提交
    • A
      tcm_vhost: Initialize vq->last_used_idx when set endpoint · dfd5d569
      Asias He 提交于
      This patch fixes guest hang when booting seabios and guest.
      
        [    0.576238] scsi0 : Virtio SCSI HBA
        [    0.616754] virtio_scsi virtio1: request:id 0 is not a head!
      
      vq->last_used_idx is initialized only when /dev/vhost-scsi is
      opened or closed.
      
         vhost_scsi_open -> vhost_dev_init() -> vhost_vq_reset()
         vhost_scsi_release() -> vhost_dev_cleanup -> vhost_vq_reset()
      
      So, when guest talks to tcm_vhost after seabios does, vq->last_used_idx
      still contains the old valule for seabios. This confuses guest.
      
      Fix this by calling vhost_init_used() to init vq->last_used_idx when
      we set endpoint.
      Signed-off-by: NAsias He <asias@redhat.com>
      Acked-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      dfd5d569
    • A
      tcm_vhost: Use vq->private_data to indicate if the endpoint is setup · 4f7f46d3
      Asias He 提交于
      Currently, vs->vs_endpoint is used indicate if the endpoint is setup or
      not. It is set or cleared in vhost_scsi_set_endpoint() or
      vhost_scsi_clear_endpoint() under the vs->dev.mutex lock. However, when
      we check it in vhost_scsi_handle_vq(), we ignored the lock.
      
      Instead of using the vs->vs_endpoint and the vs->dev.mutex lock to
      indicate the status of the endpoint, we use per virtqueue
      vq->private_data to indicate it. In this way, we can only take the
      vq->mutex lock which is per queue and make the concurrent multiqueue
      process having less lock contention. Further, in the read side of
      vq->private_data, we can even do not take the lock if it is accessed in
      the vhost worker thread, because it is protected by "vhost rcu".
      
      (nab: Do s/VHOST_FEATURES/~VHOST_SCSI_FEATURES)
      Signed-off-by: NAsias He <asias@redhat.com>
      Acked-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      4f7f46d3
  4. 03 4月, 2013 1 次提交
  5. 29 3月, 2013 2 次提交
    • N
      target: Fix RESERVATION_CONFLICT status regression for iscsi-target special case · f85eda8d
      Nicholas Bellinger 提交于
      This patch fixes a regression introduced in v3.8-rc1 code where a failed
      target_check_reservation() check in target_setup_cmd_from_cdb() was causing
      an incorrect SAM_STAT_GOOD status to be returned during a WRITE operation
      performed by an unregistered / unreserved iscsi initiator port.
      
      This regression is only effecting iscsi-target due to a special case check
      for TCM_RESERVATION_CONFLICT within iscsi_target_erl1.c:iscsit_execute_cmd(),
      and was still correctly disallowing WRITE commands from backend submission
      for unregistered / unreserved initiator ports, while returning the incorrect
      SAM_STAT_GOOD status due to the missing SAM_STAT_RESERVATION_CONFLICT
      assignment.
      
      This regression was first introduced with:
      
      commit de103c93
      Author: Christoph Hellwig <hch@lst.de>
      Date:   Tue Nov 6 12:24:09 2012 -0800
      
          target: pass sense_reason as a return value
      
      Go ahead and re-add the missing SAM_STAT_RESERVATION_CONFLICT assignment
      during a target_check_reservation() failure, so that iscsi-target code
      sends the correct SCSI status.
      
      All other fabrics using target_submit_cmd_*() with a RESERVATION_CONFLICT
      call to transport_generic_request_failure() are not effected by this bug.
      Reported-by: NJeff Leung <jleung@curriegrad2004.ca>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      f85eda8d
    • N
      tcm_vhost: Avoid VIRTIO_RING_F_EVENT_IDX feature bit · 5dade710
      Nicholas Bellinger 提交于
      This patch adds a VHOST_SCSI_FEATURES mask minus VIRTIO_RING_F_EVENT_IDX
      so that vhost-scsi-pci userspace will strip this feature bit once
      GET_FEATURES reports it as being unsupported on the host.
      
      This is to avoid a bug where ->handle_kicks() are missed when EVENT_IDX
      is enabled by default in userspace code.
      
      (mst: Rename to VHOST_SCSI_FEATURES + add comment)
      Acked-by: NMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: NAsias He <asias@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      5dade710
  6. 20 3月, 2013 2 次提交
  7. 19 3月, 2013 5 次提交
  8. 18 3月, 2013 4 次提交
    • L
      Linux 3.9-rc3 · a937536b
      Linus Torvalds 提交于
      a937536b
    • D
      perf,x86: fix link failure for non-Intel configs · 6c4d3bc9
      David Rientjes 提交于
      Commit 1d9d8639 ("perf,x86: fix kernel crash with PEBS/BTS after
      suspend/resume") introduces a link failure since
      perf_restore_debug_store() is only defined for CONFIG_CPU_SUP_INTEL:
      
      	arch/x86/power/built-in.o: In function `restore_processor_state':
      	(.text+0x45c): undefined reference to `perf_restore_debug_store'
      
      Fix it by defining the dummy function appropriately.
      Signed-off-by: NDavid Rientjes <rientjes@google.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6c4d3bc9
    • L
      perf,x86: fix wrmsr_on_cpu() warning on suspend/resume · 2a6e06b2
      Linus Torvalds 提交于
      Commit 1d9d8639 ("perf,x86: fix kernel crash with PEBS/BTS after
      suspend/resume") fixed a crash when doing PEBS performance profiling
      after resuming, but in using init_debug_store_on_cpu() to restore the
      DS_AREA mtrr it also resulted in a new WARN_ON() triggering.
      
      init_debug_store_on_cpu() uses "wrmsr_on_cpu()", which in turn uses CPU
      cross-calls to do the MSR update.  Which is not really valid at the
      early resume stage, and the warning is quite reasonable.  Now, it all
      happens to _work_, for the simple reason that smp_call_function_single()
      ends up just doing the call directly on the CPU when the CPU number
      matches, but we really should just do the wrmsr() directly instead.
      
      This duplicates the wrmsr() logic, but hopefully we can just remove the
      wrmsr_on_cpu() version eventually.
      Reported-and-tested-by: NParag Warudkar <parag.lkml@gmail.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2a6e06b2
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs · 08637024
      Linus Torvalds 提交于
      Pull btrfs fixes from Chris Mason:
       "Eric's rcu barrier patch fixes a long standing problem with our
        unmount code hanging on to devices in workqueue helpers.  Liu Bo
        nailed down a difficult assertion for in-memory extent mappings."
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
        Btrfs: fix warning of free_extent_map
        Btrfs: fix warning when creating snapshots
        Btrfs: return as soon as possible when edquot happens
        Btrfs: return EIO if we have extent tree corruption
        btrfs: use rcu_barrier() to wait for bdev puts at unmount
        Btrfs: remove btrfs_try_spin_lock
        Btrfs: get better concurrency for snapshot-aware defrag work
      08637024
  9. 16 3月, 2013 3 次提交
    • L
      Btrfs: fix warning of free_extent_map · 3b277594
      Liu Bo 提交于
      Users report that an extent map's list is still linked when it's actually
      going to be freed from cache.
      
      The story is that
      
      a) when we're going to drop an extent map and may split this large one into
      smaller ems, and if this large one is flagged as EXTENT_FLAG_LOGGING which means
      that it's on the list to be logged, then the smaller ems split from it will also
      be flagged as EXTENT_FLAG_LOGGING, and this is _not_ expected.
      
      b) we'll keep ems from unlinking the list and freeing when they are flagged with
      EXTENT_FLAG_LOGGING, because the log code holds one reference.
      
      The end result is the warning, but the truth is that we set the flag
      EXTENT_FLAG_LOGGING only during fsync.
      
      So clear flag EXTENT_FLAG_LOGGING for extent maps split from a large one.
      Reported-by: NJohannes Hirte <johannes.hirte@fem.tu-ilmenau.de>
      Reported-by: NDarrick J. Wong <darrick.wong@oracle.com>
      Signed-off-by: NLiu Bo <bo.li.liu@oracle.com>
      Signed-off-by: NChris Mason <chris.mason@fusionio.com>
      3b277594
    • L
      Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild · e2043785
      Linus Torvalds 提交于
      Pull kbuild fix from Michal Marek:
       "One fix for for make headers_install/headers_check to not require make
        3.81.  The requirement has been accidentally introduced in 3.7."
      
      * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
        kbuild: fix make headers_check with make 3.80
      e2043785
    • L
      Merge tag 'for-3.9-rc3' of git://openrisc.net/jonas/linux · 23659587
      Linus Torvalds 提交于
      Pull OpenRISC bug fixes from Jonas Bonn:
      
       - The GPIO descriptor work has exposed how broken the non-GPIOLIB bits
         for OpenRISC were.  We now require GPIOLIB as this is the preferred
         way forward.
      
       - The system.h split introduced a bug in llist.h for arches using
         asm-generic/cmpxchg.h directly, which is currently only OpenRISC.
         The patch here moves two defines from asm-generic/atomic.h to
         asm-generic/cmpxchg.h to make things work as they should.
      
       - The VIRT_TO_BUS selector was added for OpenRISC, but OpenRISC does
         not have the virt_to_bus methods, so there's a patch to remove it
         again.
      
      * tag 'for-3.9-rc3' of git://openrisc.net/jonas/linux:
        openrisc: remove HAVE_VIRT_TO_BUS
        asm-generic: move cmpxchg*_local defs to cmpxchg.h
        openrisc: require gpiolib
      23659587