27 Feb, 2013

1 commit

  • Pull scsi target updates from Nicholas Bellinger:
    "The highlights in this series include:

    - Improve sg_table lookup scalability in RAMDISK_MCP (martin)

    - Add device attribute to expose config name for INQUIRY model (tregaron)

    - Convert tcm_vhost to use lock-less list for cmd completion (asias)

    - Add tcm_vhost support for multiple target's per endpoint (asias)

    - Add tcm_vhost support for multiple queues per vhost (asias)

    - Add missing mapped_lun bounds checking during make_mappedlun setup
    in generic fabric configfs code (jan engelhardt + nab)

    - Enforce individual iscsi-target network portal export once per
    TargetName endpoint (grover + nab)

    - Add WRITE_SAME w/ UNMAP=0 emulation to FILEIO backend (nab)

    Things have been mostly quiet this round, with majority of the work
    being done on the iser-target WIP driver + associated iscsi-target
    refactoring patches currently in flight for v3.10 code.

    At this point there is one patch series left outstanding from Asias to
    add support for UNMAP + WRITE_SAME w/ UNMAP=1 to FILEIO awaiting
    feedback from hch & Co, that will likely be included in a post
    v3.9-rc1 PULL request if there are no objections.

    Also, there is a regression bug recently reported off-list that seems
    to be effecting v3.5 and v3.6 kernels with MSFT iSCSI initiators that
    is still being tracked down. No word if this effects >= v3.7 just
    yet, but if so there will likely another PULL request coming your
    way.."

    * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (26 commits)
    target: Rename spc_get_write_same_sectors -> sbc_get_write_same_sectors
    target/file: Add WRITE_SAME w/ UNMAP=0 emulation support
    iscsi-target: Enforce individual network portal export once per TargetName
    iscsi-target: Refactor iscsit_get_np sockaddr matching into iscsit_check_np_match
    target: Add missing mapped_lun bounds checking during make_mappedlun setup
    target: Fix lookup of dynamic NodeACLs during cached demo-mode operation
    target: Fix parameter list length checking in MODE SELECT
    target: Fix error checking for UNMAP commands
    target: Fix sense data for out-of-bounds IO operations
    target_core_rd: break out unterminated loop during copy
    tcm_vhost: Multi-queue support
    tcm_vhost: Multi-target support
    target: Add device attribute to expose config_item_name for INQUIRY model
    target: don't truncate the fail intr address
    target: don't always say "ipv6" as address type
    target/iblock: Use backend REQ_FLUSH hint for WriteCacheEnabled status
    iscsi-target: make some temporary buffers larger
    tcm_vhost: Optimize gup in vhost_scsi_map_to_sgl
    tcm_vhost: Use iov_num_pages to calculate sgl_count
    tcm_vhost: Introduce iov_num_pages
    ...

    Linus Torvalds
     

22 Feb, 2013

1 commit

  • Pull driver core patches from Greg Kroah-Hartman:
    "Here is the big driver core merge for 3.9-rc1

    There are two major series here, both of which touch lots of drivers
    all over the kernel, and will cause you some merge conflicts:

    - add a new function called devm_ioremap_resource() to properly be
    able to check return values.

    - remove CONFIG_EXPERIMENTAL

    Other than those patches, there's not much here, some minor fixes and
    updates"

    Fix up trivial conflicts

    * tag 'driver-core-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (221 commits)
    base: memory: fix soft/hard_offline_page permissions
    drivercore: Fix ordering between deferred_probe and exiting initcalls
    backlight: fix class_find_device() arguments
    TTY: mark tty_get_device call with the proper const values
    driver-core: constify data for class_find_device()
    firmware: Ignore abort check when no user-helper is used
    firmware: Reduce ifdef CONFIG_FW_LOADER_USER_HELPER
    firmware: Make user-mode helper optional
    firmware: Refactoring for splitting user-mode helper code
    Driver core: treat unregistered bus_types as having no devices
    watchdog: Convert to devm_ioremap_resource()
    thermal: Convert to devm_ioremap_resource()
    spi: Convert to devm_ioremap_resource()
    power: Convert to devm_ioremap_resource()
    mtd: Convert to devm_ioremap_resource()
    mmc: Convert to devm_ioremap_resource()
    mfd: Convert to devm_ioremap_resource()
    media: Convert to devm_ioremap_resource()
    iommu: Convert to devm_ioremap_resource()
    drm: Convert to devm_ioremap_resource()
    ...

    Linus Torvalds
     

14 Feb, 2013

6 commits

  • This adds virtio-scsi multi-queue support to tcm_vhost. In order to use
    multi-queue, guest side multi-queue support is need. It can
    be found here:

    https://lkml.org/lkml/2012/12/18/166

    Currently, only one thread is created by vhost core code for each
    vhost_scsi instance. Even if there are multi-queues, all the handling of
    guest kick (vhost_scsi_handle_kick) are processed in one thread. This is
    not optimal. Luckily, most of the work is offloaded to the tcm_vhost
    workqueue.

    Some initial perf numbers:
    1 queue, 4 targets, 1 lun per target
    4K request size, 50% randread + 50% randwrite: 127K/127k IOPS

    4 queues, 4 targets, 1 lun per target
    4K request size, 50% randread + 50% randwrite: 181K/181k IOPS

    Signed-off-by: Asias He
    Signed-off-by: Nicholas Bellinger

    Asias He
     
  • In order to take advantages of Paolo's multi-queue virito-scsi, we need
    multi-target support in tcm_vhost first. Otherwise all the requests go
    to one queue and other queues are idle.

    This patch makes:

    1. All the targets under the wwpn is seen and can be used by guest.
    2. No need to pass the tpgt number in struct vhost_scsi_target to
    tcm_vhost.ko. Only wwpn is needed.
    3. We can always pass max_target = 255 to guest now, since we abort the
    request who's target id does not exist.

    Changes in v2:
    - Handle non-contiguous tpgt

    Changes in v3:
    - Simplfy lock in vhost_scsi_set_endpoint
    - Return -EEXIST when does not match

    Signed-off-by: Asias He
    Signed-off-by: Nicholas Bellinger

    Asias He
     
  • We can get all the pages in one time instead of calling
    gup N times.

    Signed-off-by: Asias He
    Signed-off-by: Nicholas Bellinger

    Asias He
     
  • Signed-off-by: Asias He
    Signed-off-by: Nicholas Bellinger

    Asias He
     
  • Add a helper to calculate the number of pages needed for a iov entry.

    (nab: Drop unnecessary inline)

    Signed-off-by: Asias He
    Signed-off-by: Nicholas Bellinger

    Asias He
     
  • This drops the cmd completion list spin lock and makes the cmd
    completion queue lock-less.

    Signed-off-by: Asias He
    Signed-off-by: Nicholas Bellinger

    Asias He
     

09 Feb, 2013

1 commit

  • Pull networking fixes from David Miller:

    1) Revert iwlwifi reclaimed packet tracking, it causes problems for a
    bunch of folks. From Emmanuel Grumbach.

    2) Work limiting code in brcmsmac wifi driver can clear tx status
    without processing the event. From Arend van Spriel.

    3) rtlwifi USB driver processes wrong SKB, fix from Larry Finger.

    4) l2tp tunnel delete can race with close, fix from Tom Parkin.

    5) pktgen_add_device() failures are not checked at all, fix from Cong
    Wang.

    6) Fix unintentional removal of carrier off from tun_detach(),
    otherwise we confuse userspace, from Michael S. Tsirkin.

    7) Don't leak socket reference counts and ubufs in vhost-net driver,
    from Jason Wang.

    8) vmxnet3 driver gets it's initial carrier state wrong, fix from Neil
    Horman.

    9) Protect against USB networking devices which spam the host with 0
    length frames, from Bjørn Mork.

    10) Prevent neighbour overflows in ipv6 for locally destined routes,
    from Marcelo Ricardo. This is the best short-term fix for this, a
    longer term fix has been implemented in net-next.

    11) L2TP uses ipv4 datagram routines in it's ipv6 code, whoops. This
    mistake is largely because the ipv6 functions don't even have some
    kind of prefix in their names to suggest they are ipv6 specific.
    From Tom Parkin.

    12) Check SYN packet drops properly in tcp_rcv_fastopen_synack(), from
    Yuchung Cheng.

    13) Fix races and TX skb freeing bugs in via-rhine's NAPI support, from
    Francois Romieu and your's truly.

    14) Fix infinite loops and divides by zero in TCP congestion window
    handling, from Eric Dumazet, Neal Cardwell, and Ilpo Järvinen.

    15) AF_PACKET tx ring handling can leak kernel memory to userspace, fix
    from Phil Sutter.

    16) Fix error handling in ipv6 GRE tunnel transmit, from Tommi Rantala.

    17) Protect XEN netback driver against hostile frontend putting garbage
    into the rings, don't leak pages in TX GOP checking, and add proper
    resource releasing in error path of xen_netbk_get_requests(). From
    Ian Campbell.

    18) SCTP authentication keys should be cleared out and released with
    kzfree(), from Daniel Borkmann.

    19) L2TP is a bit too clever trying to maintain skb->truesize, and ends
    up corrupting socket memory accounting to the point where packet
    sending is halted indefinitely. Just remove the adjustments
    entirely, they aren't really needed. From Eric Dumazet.

    20) ATM Iphase driver uses a data type with the same name as the S390
    headers, rename to fix the build. From Heiko Carstens.

    21) Fix a typo in copying the inner network header offset from one SKB
    to another, from Pravin B Shelar.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (56 commits)
    net: sctp: sctp_endpoint_free: zero out secret key data
    net: sctp: sctp_setsockopt_auth_key: use kzfree instead of kfree
    atm/iphase: rename fregt_t -> ffreg_t
    net: usb: fix regression from FLAG_NOARP code
    l2tp: dont play with skb->truesize
    net: sctp: sctp_auth_key_put: use kzfree instead of kfree
    netback: correct netbk_tx_err to handle wrap around.
    xen/netback: free already allocated memory on failure in xen_netbk_get_requests
    xen/netback: don't leak pages on failure in xen_netbk_tx_check_gop.
    xen/netback: shutdown the ring if it contains garbage.
    net: qmi_wwan: add more Huawei devices, including E320
    net: cdc_ncm: add another Huawei vendor specific device
    ipv6/ip6_gre: fix error case handling in ip6gre_tunnel_xmit()
    tcp: fix for zero packets_in_flight was too broad
    brcmsmac: rework of mac80211 .flush() callback operation
    ssb: unregister gpios before unloading ssb
    bcma: unregister gpios before unloading bcma
    rtlwifi: Fix scheduling while atomic bug
    net: usbnet: fix tx_dropped statistics
    tcp: ipv6: Update MIB counters for drops
    ...

    Linus Torvalds
     

01 Feb, 2013

1 commit


30 Jan, 2013

2 commits

  • Currently, the polling errors were ignored, which can lead following issues:

    - vhost remove itself unconditionally from waitqueue when stopping the poll,
    this may crash the kernel since the previous attempt of starting may fail to
    add itself to the waitqueue
    - userspace may think the backend were successfully set even when the polling
    failed.

    Solve this by:

    - check poll->wqh before trying to remove from waitqueue
    - report polling errors in vhost_poll_start(), tx_poll_start(), the return value
    will be checked and returned when userspace want to set the backend

    After this fix, there still could be a polling failure after backend is set, it
    will addressed by the next patch.

    Signed-off-by: Jason Wang
    Acked-by: Michael S. Tsirkin
    Signed-off-by: David S. Miller

    Jason Wang
     
  • Currently, when vhost_init_used() fails the sock refcnt and ubufs were
    leaked. Correct this by calling vhost_init_used() before assign ubufs and
    restore the oldsock when it fails.

    Signed-off-by: Jason Wang
    Signed-off-by: David S. Miller

    Jason Wang
     

22 Jan, 2013

1 commit

  • The CONFIG_EXPERIMENTAL config item has not carried much meaning for a
    while now and is almost always enabled by default. As agreed during the
    Linux kernel summit, remove it from any "depends on" lines in Kconfigs.

    Acked-by: Michael S. Tsirkin
    Signed-off-by: Kees Cook
    Signed-off-by: Greg Kroah-Hartman

    Kees Cook
     

16 Dec, 2012

1 commit

  • Pull target updates from Nicholas Bellinger:
    "It has been a very busy development cycle this time around in target
    land, with the highlights including:

    - Kill struct se_subsystem_dev, in favor of direct se_device usage
    (hch)
    - Simplify reservations code by combining SPC-3 + SCSI-2 support for
    virtual backends only (hch)
    - Simplify ALUA code for virtual only backends, and remove left over
    abstractions (hch)
    - Pass sense_reason_t as return value for I/O submission path (hch)
    - Refactor MODE_SENSE emulation to allow for easier addition of new
    mode pages. (roland)
    - Add emulation of MODE_SELECT (roland)
    - Fix bug in handling of ExpStatSN wrap-around (steve)
    - Fix bug in TMR ABORT_TASK lookup in qla2xxx target (steve)
    - Add WRITE_SAME w/ UNMAP=0 support for IBLOCK backends (nab)
    - Convert ib_srpt to use modern target_submit_cmd caller + drop
    legacy ioctx->kref usage (nab)
    - Convert ib_srpt to use modern target_submit_tmr caller (nab)
    - Add link_magic for fabric allow_link destination target_items for
    symlinks within target_core_fabric_configfs.c code (nab)
    - Allocate pointers in instead of full structs for
    config_group->default_groups (sebastian)
    - Fix 32-bit highmem breakage for FILEIO (sebastian)

    All told, hch was able to shave off another ~1K LOC by killing the
    se_subsystem_dev abstraction, along with a number of PR + ALUA
    simplifications. Also, a nice patch by Roland is the refactoring of
    MODE_SENSE handling, along with the addition of initial MODE_SELECT
    emulation support for virtual backends.

    Sebastian found a long-standing issue wrt to allocation of full
    config_group instead of pointers for config_group->default_group[]
    setup in a number of areas, which ends up saving memory with big
    configurations. He also managed to fix another long-standing BUG wrt
    to broken 32-bit highmem support within the FILEIO backend driver.

    Thank you again to everyone who contributed this round!"

    * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (50 commits)
    target/iscsi_target: Add NodeACL tags for initiator group support
    target/tcm_fc: fix the lockdep warning due to inconsistent lock state
    sbp-target: fix error path in sbp_make_tpg()
    sbp-target: use simple assignment in tgt_agent_rw_agent_state()
    iscsi-target: use kstrdup() for iscsi_param
    target/file: merge fd_do_readv() and fd_do_writev()
    target/file: Fix 32-bit highmem breakage for SGL -> iovec mapping
    target: Add link_magic for fabric allow_link destination target_items
    ib_srpt: Convert TMR path to target_submit_tmr
    ib_srpt: Convert I/O path to target_submit_cmd + drop legacy ioctx->kref
    target: Make spc_get_write_same_sectors return sector_t
    target/configfs: use kmalloc() instead of kzalloc() for default groups
    target/configfs: allocate only 6 slots for dev_cg->default_groups
    target/configfs: allocate pointers instead of full struct for default_groups
    target: update error handling for sbc_setup_write_same()
    iscsit: use GFP_ATOMIC under spin lock
    iscsi_target: Remove redundant null check before kfree
    target/iblock: Forward declare bio helpers
    target: Clean up flow in transport_check_aborted_status()
    target: Clean up logic in transport_put_cmd()
    ...

    Linus Torvalds
     

14 Dec, 2012

1 commit

  • Pull trivial branch from Jiri Kosina:
    "Usual stuff -- comment/printk typo fixes, documentation updates, dead
    code elimination."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits)
    HOWTO: fix double words typo
    x86 mtrr: fix comment typo in mtrr_bp_init
    propagate name change to comments in kernel source
    doc: Update the name of profiling based on sysfs
    treewide: Fix typos in various drivers
    treewide: Fix typos in various Kconfig
    wireless: mwifiex: Fix typo in wireless/mwifiex driver
    messages: i2o: Fix typo in messages/i2o
    scripts/kernel-doc: check that non-void fcts describe their return value
    Kernel-doc: Convention: Use a "Return" section to describe return values
    radeon: Fix typo and copy/paste error in comments
    doc: Remove unnecessary declarations from Documentation/accounting/getdelays.c
    various: Fix spelling of "asynchronous" in comments.
    Fix misspellings of "whether" in comments.
    eisa: Fix spelling of "asynchronous".
    various: Fix spelling of "registered" in comments.
    doc: fix quite a few typos within Documentation
    target: iscsi: fix comment typos in target/iscsi drivers
    treewide: fix typo of "suport" in various comments and Kconfig
    treewide: fix typo of "suppport" in various comments
    ...

    Linus Torvalds
     

06 Dec, 2012

5 commits

  • The variable se_sess is initialized but never used
    otherwise, so remove the unused variable.

    dpatch engine is used to auto generate this patch.
    (https://github.com/weiyj/dpatch)

    Signed-off-by: Wei Yongjun
    Signed-off-by: Michael S. Tsirkin

    Wei Yongjun
     
  • Zero copy TX has been around for a while now.
    We seem to be down to eliminating theoretical bugs
    and performance tuning at this point:
    it's probably time to enable it by default so that
    most users get the benefit.

    Keep the flag around meanwhile so users can experiment
    with disabling this if they experience regressions.
    I expect that we will remove it in the future.

    Signed-off-by: Michael S. Tsirkin

    Michael S. Tsirkin
     
  • For short packets zerocopy mode adds overhead
    of managing heads which isn't necessary: we
    could simly update used ring directly
    same as with zerocopy disabled.

    Things seem to run a bit faster if we detect
    and bypass head management when zcopy isn't used.

    Signed-off-by: Michael S. Tsirkin

    Michael S. Tsirkin
     
  • When memory map changes, we need to flush outstanding
    DMAs as they might in theory reference old memory addresses.
    To do this simply stop initiating new DMAs
    and wait for ubufs ref count to drop to 0.
    Afterwards reset the count back to 1.

    Signed-off-by: Michael S. Tsirkin

    Michael S. Tsirkin
     
  • vring changes already do a flush internally where appropriate, so we do
    not need a second flush.

    It's currently not very expensive but a follow-up patch makes flush more
    heavy-weight, so remove the extra flush here to avoid regressing
    performance if call or kick fds are changed on data path.

    Signed-off-by: Michael S. Tsirkin

    Michael S. Tsirkin
     

04 Dec, 2012

1 commit

  • These packet counters are used to drive the zercopy
    selection heuristic so nothing too bad happens if they are off a bit -
    and they are also reset once in a while.
    But it's cleaner to clear them when backend is set so that
    we start in a known state.

    Signed-off-by: Michael S. Tsirkin
    Signed-off-by: David S. Miller

    Michael S. Tsirkin
     

30 Nov, 2012

1 commit


29 Nov, 2012

1 commit


20 Nov, 2012

1 commit


19 Nov, 2012

1 commit


11 Nov, 2012

1 commit


07 Nov, 2012

1 commit

  • Pass the sense reason as an explicit return value from the I/O submission
    path instead of storing it in struct se_cmd and using negative return
    values. This cleans up a lot of the code pathes, and with the sparse
    annotations for the new sense_reason_t type allows for much better
    error checking.

    (nab: Convert spc_emulate_modesense + spc_emulate_modeselect to use
    sense_reason_t with Roland's MODE SELECT changes)

    Signed-off-by: Christoph Hellwig
    Cc: Roland Dreier
    Signed-off-by: Nicholas Bellinger

    Christoph Hellwig
     

03 Nov, 2012

6 commits

  • It seems that to avoid deadlocks it is enough to poll vq before
    we are going to use the last buffer. This is faster than
    c70aa540c7a9f67add11ad3161096fb95233aa2e.

    Signed-off-by: Michael S. Tsirkin
    Signed-off-by: David S. Miller

    Michael S. Tsirkin
     
  • Even when vhost-net is in zero-copy transmit mode,
    net core might still decide to copy the skb later
    which is somewhat slower than a copy in user
    context: data copy overhead is added to the cost of
    page pin/unpin. The result is that enabling tx zero copy
    option leads to higher CPU utilization for guest to guest
    and guest to host traffic.

    To fix this, suppress zero copy tx after a given number of
    packets triggered late data copy. Re-enable periodically
    to detect workload changes.

    Signed-off-by: Michael S. Tsirkin
    Signed-off-by: David S. Miller

    Michael S. Tsirkin
     
  • Zerocopy handling code is vhost-net specific.
    Move it from vhost.c/vhost.h out to net.c

    Signed-off-by: Michael S. Tsirkin
    Signed-off-by: David S. Miller

    Michael S. Tsirkin
     
  • This will be used to disable zerocopy when error rate
    is high.

    Signed-off-by: Michael S. Tsirkin
    Signed-off-by: David S. Miller

    Michael S. Tsirkin
     
  • Better document macros for DMA tracking. Add an
    explicit one for DMA in progress instead of
    relying on user supplying len != 1.

    Signed-off-by: Michael S. Tsirkin
    Signed-off-by: David S. Miller

    Michael S. Tsirkin
     
  • Even if skb is marked for zero copy, net core might still decide
    to copy it later which is somewhat slower than a copy in user context:
    besides copying the data we need to pin/unpin the pages.

    Add a parameter reporting such cases through zero copy callback:
    if this happens a lot, device can take this into account
    and switch to copying in user context.

    This patch updates all users but ignores the passed value for now:
    it will be used by follow-up patches.

    Signed-off-by: Michael S. Tsirkin
    Signed-off-by: David S. Miller

    Michael S. Tsirkin
     

25 Oct, 2012

1 commit


10 Oct, 2012

1 commit

  • Pull scsi target updates from Nicholas Bellinger:
    "Things have been calm for the most part with no new fabric drivers in
    flight for v3.7 (we're up to eight now !), so this update is primarily
    focused on addressing a few long-standing items within target-core and
    iscsi-target fabric code.

    The highlights include:

    - target: Simplify fabric sense data length handling (roland)
    - qla2xxx: Fix endianness of task management response code (roland)
    - target: fix truncation of mode data, support zero allocation length
    (paolo)
    - target: Properly support zero-length commands in normal processing
    path (paolo)
    - iscsi-target: Correctly set 0xffffffff field within ISCSI_OP_REJECT
    PDU (ronnie + nab)
    - iscsi-target: Add explicit set of cache_dynamic_acls=1 for TPG
    demo-mode (ronnie + nab)
    - target/file: Re-enable optional fd_buffered_io=1 operation (nab +
    hch)
    - iscsi-target: Add MaxXmitDataSegmenthLength forr target ->
    initiator MDRSL declaration (nab)
    - target: Add target_submit_cmd_map_sgls for SGL fabric memory
    passthrough (nab + hch)
    - tcm_loop: Convert I/O path to use target_submit_cmd_map_sgls (hch +
    nab)
    - tcm_vhost: Convert I/O path to use target_submit_cmd_map_sgls (nab
    + hch)

    The last series for adding a new target_submit_cmd_map_sgls() fabric
    caller (as requested by hch) that accepts pre-allocated SGL memory
    (using existing logic), along with converting tcm_loop + tcm_vhost has
    only been in -next for the last days, but has gotten enough review
    +testing and is clear enough a mechanical change that I think it's
    reasonable to merge for -rc1 code.

    Thanks again to everyone who contributed this round! Extra special
    thanks to Roland (PureStorage) for tracking down the qla2xxx target
    TMR response code endian issue, and to Paolo (Redhat) for resolving
    the long standing zero-length CDB issues within target-core between
    virtual and pSCSI backends."

    * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (44 commits)
    iscsi-target: Bump defaults for nopin_timeout + nopin_response_timeout values
    iscsit: proper endianess conversions
    iscsit: use the itt_t abstract type
    iscsit: add missing endianess conversion in iscsit_check_inaddr_any
    iscsit: remove incorrect unlock in iscsit_build_sendtargets_resp
    iscsit: mark various functions static
    target/iscsi: precedence bug in iscsit_set_dataout_sequence_values()
    target/usb-gadget: strlen() doesn't count the terminator
    target/usb-gadget: remove duplicate initialization
    tcm_vhost: Convert I/O path to use target_submit_cmd_map_sgls
    target: Add control CDB READ payload zero work-around
    tcm_loop: Convert I/O path to use target_submit_cmd_map_sgls
    target: Add target_submit_cmd_map_sgls for SGL fabric memory passthrough
    iscsi-target: Add explicit set of cache_dynamic_acls=1 for TPG demo-mode
    iscsi-target: Change iscsi_target_seq_pdu_list.c to honor MaxXmitDataSegmentLength
    iscsi-target: Add MaxXmitDataSegmentLength connection recovery check
    iscsi-target: Convert incoming PDU payload checks to MaxXmitDataSegmentLength
    iscsi-target: Enable MaxXmitDataSegmentLength operation in login path
    iscsi-target: Add base MaxXmitDataSegmentLength code
    target/file: Re-enable optional fd_buffered_io=1 operation
    ...

    Linus Torvalds
     

03 Oct, 2012

1 commit

  • This patch converts tcm_vhost to use target_submit_cmd_map_sgls() for
    I/O submission and mapping of pre-allocated SGL memory from incoming
    virtio-scsi SGL memory -> se_cmd descriptors.

    This includes removing the original open-coded fabric uses of target
    core callers to support transport_generic_map_mem_to_cmd() between
    target_setup_cmd_from_cdb() and transport_handle_cdb_direct() logic.

    It also includes adding a handful of new tcm_vhost_cmnd member +
    assignments in vhost_scsi_allocate_cmd() used from cmwq process
    context I/O submission within tcm_vhost_submission_work()

    (v2: Use renamed target_submit_cmd_map_sgls)

    Reported-by: Christoph Hellwig
    Cc: Christoph Hellwig
    Acked-by: Michael S. Tsirkin
    Cc: Paolo Bonzini
    Cc: Stefan Hajnoczi
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger
     

27 Sep, 2012

1 commit


18 Sep, 2012

2 commits

  • Every fabric driver has to supply a se_tfo->set_fabric_sense_len()
    method, just so iSCSI can return an offset of 2. However, every fabric
    driver is already allocating a sense buffer and passing it into the
    target core, either via transport_init_se_cmd() or target_submit_cmd().

    So instead of having iSCSI pass the start of its sense buffer into the
    core and then later tell the core to skip the first 2 bytes, it seems
    easier for iSCSI just to do the offset of 2 when it passes the sense
    buffer into the core. Then we can drop the se_tfo->set_fabric_sense_len()
    everywhere, and just add a couple of lines of code to iSCSI to set the
    sense data length to the beginning of the buffer right before it sends
    it over the network.

    (nab: Remove .set_fabric_sense_len usage from tcm_qla2xxx_npiv_ops +
    change transport_get_sense_buffer to follow v3.6-rc6 code w/o
    ->set_fabric_sense_len usage)

    Signed-off-by: Roland Dreier
    Signed-off-by: Nicholas Bellinger

    Roland Dreier
     
  • There are no callers of se_tfo->get_fabric_sense_len(), so we should
    stop having every fabric driver implement it.

    Signed-off-by: Roland Dreier
    Signed-off-by: Nicholas Bellinger

    Roland Dreier
     

21 Aug, 2012

1 commit

  • Here TRANSPORT_IQN_LEN is 224, which is a multiple of 4.
    Since vhost_tpgt is 2 bytes and abi_version is 4, the total size would
    be 230. But gcc needs struct size be aligned to first field size, which
    is 4 bytes, so it pads the structure by extra 2 bytes to the total of
    232.

    This padding is very undesirable in an ABI:
    - it can not be initialized easily
    - it can not be checked easily
    - it can leak information between kernel and userspace

    Simplest solution is probably just to make the padding
    explicit.

    (v2: Add check for zero'ed backend->reserved field for VHOST_SCSI_SET_ENDPOINT
    and VHOST_SCSI_CLEAR_ENDPOINT ops as requested by MST)

    Reported-by: Michael S. Tsirkin
    Signed-off-by: Michael S. Tsirkin
    Signed-off-by: Nicholas Bellinger

    Michael S. Tsirkin