14 Jun, 2020

1 commit


21 Mar, 2020

1 commit

  • Changeset 58ad30cf91f0 ("docs: fix reference to core-api/namespaces.rst")
    enabled a new feature at Sphinx: it will now generate index for each
    document title, plus to each chapter inside it.

    There's a drawback, though: one document cannot have two sections
    with the same name anymore.

    A followup patch will change the logic of autosectionlabel to
    avoid most creating references for every single section title,
    but still we need to be able to reference the chapters inside
    a document.

    There are a few places where there are two chapters with the
    same name. This patch renames one of the chapters, in order to
    avoid symbol conflict within the same document.

    PS.: as I don't speach Chinese, I had some help from a friend
    (Wen Liu) at the Chinese translation for "publishing patches"
    for this document:

    Documentation/translations/zh_CN/process/5.Posting.rst

    Fixes: 58ad30cf91f0 ("docs: fix reference to core-api/namespaces.rst")
    Signed-off-by: Mauro Carvalho Chehab
    Link: https://lore.kernel.org/r/2bffb91e4a63d41bf5fae1c23e1e8b3bba0b8806.1584716446.git.mchehab+huawei@kernel.org
    Signed-off-by: Jonathan Corbet

    Mauro Carvalho Chehab
     

15 Jul, 2019

1 commit

  • The contents of those directories were orphaned at the documentation
    body.

    While those directories could likely be moved to be inside some guide,
    I'm opting to just adding their indexes to the main one, removing the
    :orphan: and adding the SPDX header.

    For the drivers, the rationale is that the documentation contains
    a mix of Kernelspace, uAPI and admin-guide. So, better to keep them on
    separate directories, as we've be doing with similar subsystem-specific
    docs that were not split yet.

    For the others, well... I'm too lazy to do the move. Also, it
    seems to make sense to keep at least some of those at the main
    dir (like kbuild, for example). In any case, a latter patch
    could do the move.

    Signed-off-by: Mauro Carvalho Chehab
    Acked-by: Bartlomiej Zolnierkiewicz

    Mauro Carvalho Chehab
     

15 Jun, 2019

1 commit

  • Convert the TCM docs to ReST format and add them to the
    bookset.

    This has a mix of userspace-faced and Kernelspace faced
    docs. Still, it sounds a better candidate to be added at
    the kernel API set of docs.

    The conversion is actually:
    - add blank lines and identation in order to identify paragraphs;
    - fix tables markups;
    - add some lists markups;
    - mark literal blocks;
    - adjust title markups.

    At its new index.rst, let's add a :orphan: while this is not linked to
    the main index.rst file, in order to avoid build warnings.

    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Jonathan Corbet

    Mauro Carvalho Chehab
     

05 Feb, 2019

1 commit

  • Due to the patch that makes TMF handling synchronous the
    write_pending_status() callback function is no longer called. Hence remove
    it.

    Acked-by: Felipe Balbi
    Reviewed-by: Sagi Grimberg
    Reviewed-by: Andy Grover
    Reviewed-by: Christoph Hellwig
    Reviewed-by: Hannes Reinecke
    Reviewed-by: Bryant G. Ly
    Cc: Nicholas Bellinger
    Cc: Mike Christie
    Cc: Himanshu Madhani
    Cc: Quinn Tran
    Cc: Saurav Kashyap
    Cc: Michael S. Tsirkin
    Cc: Juergen Gross
    Signed-off-by: Bart Van Assche
    Signed-off-by: Martin K. Petersen

    Bart Van Assche
     

02 May, 2017

1 commit


10 May, 2016

2 commits

  • Signed-off-by: Christoph Hellwig
    Signed-off-by: Nicholas Bellinger

    Christoph Hellwig
     
  • Turns out the template and thus many drivers got the return value wrong:
    0 means the fabrics driver needs to put a session reference, which no
    driver except for the iSCSI target drivers did. Fortunately none of these
    drivers supports explicit Node ACLs, so the bug was harmless.

    Even without that only qla2xxx and iscsi every did real work in
    shutdown_session, so get rid of the boilerplate code in all other
    drivers.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Nicholas Bellinger

    Christoph Hellwig
     

11 Mar, 2016

1 commit


14 Oct, 2015

1 commit

  • This also allows to remove the target-specific old configfs macros, and
    gets rid of the target_core_fabric_configfs.h header which only had one
    function declaration left that could be moved to a better place.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Nicholas Bellinger
    Acked-by: Nicholas Bellinger
    Signed-off-by: Nicholas Bellinger

    Christoph Hellwig
     

25 Jul, 2015

1 commit


05 Jul, 2015

1 commit

  • Pull SCSI target updates from Nicholas Bellinger:
    "It's been a busy development cycle for target-core in a number of
    different areas.

    The fabric API usage for se_node_acl allocation is now within
    target-core code, dropping the external API callers for all fabric
    drivers tree-wide.

    There is a new conversion to RCU hlists for se_node_acl and
    se_portal_group LUN mappings, that turns fast-past LUN lookup into a
    completely lockless code-path. It also removes the original
    hard-coded limitation of 256 LUNs per fabric endpoint.

    The configfs attributes for backends can now be shared between core
    and driver code, allowing existing drivers to use common code while
    still allowing flexibility for new backend provided attributes.

    The highlights include:

    - Merge sbc_verify_dif_* into common code (sagi)
    - Remove iscsi-target support for obsolete IFMarker/OFMarker
    (Christophe Vu-Brugier)
    - Add bidi support in target/user backend (ilias + vangelis + agover)
    - Move se_node_acl allocation into target-core code (hch)
    - Add crc_t10dif_update common helper (akinobu + mkp)
    - Handle target-core odd SGL mapping for data transfer memory
    (akinobu)
    - Move transport ID handling into target-core (hch)
    - Move task tag into struct se_cmd + support 64-bit tags (bart)
    - Convert se_node_acl->device_list[] to RCU hlist (nab + hch +
    paulmck)
    - Convert se_portal_group->tpg_lun_list[] to RCU hlist (nab + hch +
    paulmck)
    - Simplify target backend driver registration (hch)
    - Consolidate + simplify target backend attribute implementations
    (hch + nab)
    - Subsume se_port + t10_alua_tg_pt_gp_member into se_lun (hch)
    - Drop lun_sep_lock for se_lun->lun_se_dev RCU usage (hch + nab)
    - Drop unnecessary core_tpg_register TFO parameter (nab)
    - Use 64-bit LUNs tree-wide (hannes)
    - Drop left-over TARGET_MAX_LUNS_PER_TRANSPORT limit (hannes)"

    * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (76 commits)
    target: Bump core version to v5.0
    target: remove target_core_configfs.h
    target: remove unused TARGET_CORE_CONFIG_ROOT define
    target: consolidate version defines
    target: implement WRITE_SAME with UNMAP bit using ->execute_unmap
    target: simplify UNMAP handling
    target: replace se_cmd->execute_rw with a protocol_data field
    target/user: Fix inconsistent kmap_atomic/kunmap_atomic
    target: Send UA when changing LUN inventory
    target: Send UA upon LUN RESET tmr completion
    target: Send UA on ALUA target port group change
    target: Convert se_lun->lun_deve_lock to normal spinlock
    target: use 'se_dev_entry' when allocating UAs
    target: Remove 'ua_nacl' pointer from se_ua structure
    target_core_alua: Correct UA handling when switching states
    xen-scsiback: Fix compile warning for 64-bit LUN
    target: Remove TARGET_MAX_LUNS_PER_TRANSPORT
    target: use 64-bit LUNs
    target: Drop duplicate + unused se_dev_check_wce
    target: Drop unnecessary core_tpg_register TFO parameter
    ...

    Linus Torvalds
     

24 Jun, 2015

1 commit

  • Pull SCSI updates from James Bottomley:
    "This is the usual grab bag of driver updates (lpfc, hpsa,
    megaraid_sas, cxgbi, be2iscsi) plus an assortment of minor updates.

    There is also one new driver: the Cisco snic. The advansys driver has
    been rewritten to get rid of the warning about converting it to the
    DMA API, the tape statistics patch got in and finally, there's a
    resuffle of SCSI header files to separate more cleanly initiator from
    target mode (and better share the common definitions)"

    * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (156 commits)
    snic: driver for Cisco SCSI HBA
    qla2xxx: Fix indentation
    qla2xxx: Comment out unreachable code
    fusion: remove dead MTRR code
    advansys: fix compilation errors and warnings when CONFIG_PCI is not set
    mptsas: fix depth param in scsi_track_queue_full
    megaraid: fix irq setup process regression
    lpfc: Update version to 10.7.0.0 for upstream patch set.
    lpfc: Fix to drop PLOGIs from fabric node till LOGO processing completes
    lpfc: Fix scsi task management error message.
    lpfc: Fix cq_id masking problem.
    lpfc: Fix scsi prep dma buf error.
    lpfc: Add support for using block multi-queue
    lpfc: Devices are not discovered during takeaway/giveback testing
    lpfc: Fix vport deletion failure.
    lpfc: Check for active portpeerbeacon.
    lpfc: Update driver version for upstream patch set 10.6.0.1.
    lpfc: Change buffer pool empty message to miscellaneous category
    lpfc: Fix incorrect log message reported for empty FCF record.
    lpfc: Fix rport leak.
    ...

    Linus Torvalds
     

02 Jun, 2015

1 commit

  • Only include SCSI initiator header files in target code that needs
    these header files, namely the SCSI pass-through code and the tcm_loop
    driver. Change SCSI_SENSE_BUFFERSIZE into TRANSPORT_SENSE_BUFFER in
    target code because the former is intended for initiator code and the
    latter for target code. With this patch the only initiator include
    directives in target code that remain are as follows:

    $ git grep -nHE 'include .scsi/(scsi.h|scsi_host.h|scsi_device.h|scsi_cmnd.h)' drivers/target drivers/infiniband/ulp/{isert,srpt} drivers/usb/gadget/legacy/tcm_*.[ch] drivers/{vhost,xen} include/{target,trace/events/target.h}
    drivers/target/loopback/tcm_loop.c:29:#include
    drivers/target/loopback/tcm_loop.c:31:#include
    drivers/target/loopback/tcm_loop.c:32:#include
    drivers/target/loopback/tcm_loop.c:33:#include
    drivers/target/target_core_pscsi.c:39:#include
    drivers/target/target_core_pscsi.c:40:#include
    drivers/xen/xen-scsiback.c:52:#include /* SG_ALL */

    Signed-off-by: Bart Van Assche
    Reviewed-by: Christoph Hellwig
    Signed-off-by: James Bottomley

    Bart Van Assche
     

31 May, 2015

11 commits


03 May, 2015

1 commit

  • TCMU requires more work to correctly handle both user handlers that want
    all SCSI commands (pass_level=0) for a se_device, and also handlers that
    just want I/O commands and let the others be emulated by the kernel
    (pass_level=1). Only support the latter for now.

    For full passthrough, we will need to support a second se_subsystem_api
    template, due to configfs attributes being different between the two modes.
    Thus pass_level is extraneous, and we can remove it.

    The ABI break for TCMU v2 is already applied for this release, so it's
    best to do this now to avoid another ABI break in the future.

    Signed-off-by: Andy Grover
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Nicholas Bellinger

    Andy Grover
     

20 Apr, 2015

1 commit

  • The initial version of TCMU (in 3.18) does not properly handle
    bidirectional SCSI commands -- those with both an in and out buffer. In
    looking to fix this it also became clear that TCMU's support for adding
    new types of entries (opcodes) to the command ring was broken. We need
    to fix this now, so that future issues can be handled properly by adding
    new opcodes.

    We make the most of this ABI break by enabling bidi cmd handling within
    TCMP_OP_CMD opcode. Add an iov_bidi_cnt field to tcmu_cmd_entry.req.
    This enables TCMU to describe bidi commands, but further kernel work is
    needed for full bidi support.

    Enlarge tcmu_cmd_entry_hdr by 32 bits by pulling in cmd_id and __pad1. Turn
    __pad1 into two 8 bit flags fields, for kernel-set and userspace-set flags,
    "kflags" and "uflags" respectively.

    Update version fields so userspace can tell the interface is changed.

    Update tcmu-design.txt with details of how new stuff works:
    - Specify an additional requirement for userspace to set UNKNOWN_OP
    (bit 0) in hdr.uflags for unknown/unhandled opcodes.
    - Define how Data-In and Data-Out fields are described in req.iov[]

    Changed in v2:
    - Change name of SKIPPED bit to UNKNOWN bit
    - PAD op does not set the bit any more
    - Change len_op helper functions to take just len_op, not the whole struct
    - Change version to 2 in missed spots, and use defines
    - Add 16 unused bytes to cmd_entry.req, in case additional SAM cmd
    parameters need to be included
    - Add iov_dif_cnt field to specify buffers used for DIF info in iov[]
    - Rearrange fields to naturally align cdb_off
    - Handle if userspace sets UNKNOWN_OP by indicating failure of the cmd
    - Wrap some overly long UPDATE_HEAD lines

    (Add missing req.iov_bidi_cnt + req.iov_dif_cnt zeroing - Ilias)

    Signed-off-by: Andy Grover
    Reviewed-by: Ilias Tsitsimpis
    Signed-off-by: Nicholas Bellinger

    Andy Grover
     

16 Apr, 2015

1 commit


15 Apr, 2015

1 commit

  • Instead of calling target_fabric_configfs_init() +
    target_fabric_configfs_register() / target_fabric_configfs_deregister()
    target_fabric_configfs_free() from every target driver, rewrite the API
    so that we have simple register/unregister functions that operate on
    a const operations vector.

    This patch also fixes a memory leak in several target drivers. Several
    target drivers namely called target_fabric_configfs_deregister()
    without calling target_fabric_configfs_free().

    A large part of this patch is based on earlier changes from
    Bart Van Assche .

    (v2: Add a new TF_CIT_SETUP_DRV macro so that the core configfs code
    can declare attributes as either core only or for drivers)

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Nicholas Bellinger

    Christoph Hellwig
     

07 Jan, 2015

1 commit


03 Oct, 2014

1 commit


17 Oct, 2013

1 commit


20 Aug, 2013

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
     

10 Feb, 2012

1 commit


14 Dec, 2011

3 commits

  • This includes:
    - remove on _ in "__NAMELEN" in $fabric _make_tport
    - target_fabric_configfs_init() returns an error pointer and not NULL
    anymore. Consider that.
    - replace (!(var_name)) with (!var_name). The extra () are not required
    - remove #ifdef MODULE. If the code is builtin it needs an init function
    or the code is useless
    - put exit/clean functions into __exit

    Signed-off-by: Sebastian Andrzej Siewior
    Signed-off-by: Nicholas Bellinger

    Sebastian Andrzej Siewior
     
  • This patch fixes TFO->release_cmd() and removes legacy pack_lun() usage
    and new_cmd_failure when generating new TCM fabric skeleton from the
    tcm_mod_builder.py script.

    Reported-by: Stefan Bergstrand
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger
     
  • This reorganized the headers under include/target into:

    - target_core_base.h stays as is with all target-wide data stuctures and defines
    - target_core_backend.h contains the whole interface to I/O backends
    - target_core_fabric.h contains the whole interface to fabric modules

    Except for those only the various configfs macro headers stay around.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Nicholas Bellinger

    Christoph Hellwig
     

24 Mar, 2011

1 commit

  • This patch adds the missing core_tpg_del_initiator_node_acl() call required
    by fabric modules for struct se_node_acl->acl_group context shutdown via

    target_core_fabric_configfs.c:target_fabric_nacl_base_release() ->

    struct target_core_fabric_ops->fabric_drop_nodeacl()

    for tcm_mod_builder.py generated $FABRIC_MOD_configfs.c skeleton code.

    Signed-off-by: Fubo Chen
    Signed-off-by: Nicholas A. Bellinger
    Signed-off-by: James Bottomley

    Fubo Chen