14 Nov, 2013

1 commit


13 Nov, 2013

1 commit


11 Sep, 2013

1 commit


28 Nov, 2012

1 commit


07 Nov, 2012

1 commit

  • Simplify the code a lot by killing the superflous struct se_subsystem_dev.
    Instead se_device is allocated early on by the backend driver, which allocates
    it as part of its own per-device structure, borrowing the scheme that is for
    example used for inode allocation.

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

    Christoph Hellwig
     

18 Sep, 2012

1 commit


16 Mar, 2012

2 commits

  • Get rid of a bunch of write-only variables. In a number of cases I
    suspect actual bugs to be present, so I left all of those for a second
    look.

    (nab: fix lio-core patch fuzz)

    Signed-off-by: Joern Engel
    Signed-off-by: Nicholas Bellinger

    Jörn Engel
     
  • Turns an order-8 allocation into slab-sized ones, thereby preventing
    allocation failures with memory fragmentation.

    This likely saves memory as well, as the slab allocator can pack objects
    more tightly than the buddy allocator.

    (nab: Fix lio-core patch fuzz)

    Signed-off-by: Joern Engel
    Signed-off-by: Nicholas Bellinger

    Jörn Engel
     

14 Dec, 2011

3 commits

  • A reader should spend an extra moment whenever noticing a cast,
    because either something special is going on that deserves extra
    attention or, as is all too often the case, the code is wrong.

    These casts, afaics, have all been useless. They cast a foo* to a
    foo*, cast a void* to the assigned type, cast a foo* to void*, before
    assigning it to a void* variable, etc.

    In a few cases I also removed an additional &...[0], which is equally
    useless.

    Lastly I added three FIXMEs where, to the best of my judgement, the
    code appears to have a bug. It would be good if someone could check
    these.

    Signed-off-by: Joern Engel
    Signed-off-by: Nicholas Bellinger

    Jörn Engel
     
  • 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
     
  • Create a new headers, drivers/target/target_core_internal.h that is supposed
    to hold all target_core-internal prototypes. Move all non-exported includes
    from include/target to it, and merge the smaller prototype-only includes
    inside drivers/target into it as well. Mark functions that were found to
    not be called outside their implementation file static.

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

    Christoph Hellwig
     

11 Oct, 2011

1 commit


22 Jul, 2011

1 commit

  • This patch contains the squashed version of a number of cleanups and
    minor fixes from Andy's initial series (round 1) for target core this
    past spring. The condensed log looks like:

    target: use errno values instead of returning -1 for everything
    target: Rename transport_calc_sg_num to transport_init_task_sg
    target: Fix leak in error path in transport_init_task_sg
    target/pscsi: Remove pscsi_get_sh() usage
    target: Make two runtime checks into WARN_ONs
    target: Remove hba queue depth and convert to spin_lock_irq usage
    target: dev->dev_status_queue_obj is unused
    target: Make struct se_queue_req.cmd type struct se_cmd *
    target: Remove __transport_get_qr_from_queue()
    target: Rename se_dev->g_se_dev_list to se_dev_node
    target: Remove struct se_global
    target: Simplify scsi mib index table code
    target: Make dev_queue_obj a member of se_device instead of a pointer
    target: remove extraneous returns at end of void functions
    target: Ensure transport_dump_vpd_ident_type returns null-terminated str
    target: Function pointers don't need to use '&' to be assigned
    target: Fix comment in __transport_execute_tasks()
    target: Misc style cleanups
    target: rename struct pr_reservation_template to pr_reservation
    target: Remove #defines that just perform indirection
    target: Inline transport_get_task_from_execute_queue()
    target: Minor header comment fixes

    Signed-off-by: Andy Grover
    Signed-off-by: Nicholas Bellinger

    Andy Grover
     

24 Mar, 2011

1 commit

  • This patch adds a target_core_mib.c statistics conversion for
    backend context struct se_subsystem_dev + struct se_device config_group
    based statistics in target_core_device.c using CONFIGFS_EATTR()
    based struct config_item_types from target_core_stat.c code.

    The conversion from backend /proc/scsi_target/mib/ context output to configfs
    default groups+attributes include scsi_dev, scsi_lu, and scsi_tgt_dev output
    from within individual:

    /sys/kernel/config/target/core/$HBA/DEV/

    The legacy procfs output now appear as individual configfs attributes under:

    *) $HBA/$DEV/statistics/scsi_dev:

    |-- indx
    |-- inst
    |-- ports
    `-- role

    *) $HBA/$DEV/statistics/scsi_lu:

    |-- creation_time
    |-- dev
    |-- dev_type
    |-- full_stat
    |-- hs_num_cmds
    |-- indx
    |-- inst
    |-- lu_name
    |-- lun
    |-- num_cmds
    |-- prod
    |-- read_mbytes
    |-- resets
    |-- rev
    |-- state_bit
    |-- status
    |-- vend
    `-- write_mbytes

    *) $HBA/$DEV/statistics/scsi_tgt_dev:

    |-- indx
    |-- inst
    |-- non_access_lus
    |-- num_lus
    |-- resets
    `-- status

    The conversion from backend /proc/scsi_target/mib/ context output to configfs
    default groups+attributes include scsi_port, scsi_tgt_port and scsi_transport
    output from within individual:

    /sys/kernel/config/target/fabric/$WWN/tpgt_$TPGT/lun/lun_$LUN_ID/statistics/

    The legacy procfs output now appear as individual configfs attributes under:

    *) fabric/$WWN/tpgt_$TPGT/lun/lun_$LUN_ID/statistics/scsi_port

    |-- busy_count
    |-- dev
    |-- indx
    |-- inst
    `-- role

    *) fabric/$WWN/tpgt_$TPGT/lun/lun_$LUN_ID/statistics/scsi_tgt_port

    |-- dev
    |-- hs_in_cmds
    |-- in_cmds
    |-- indx
    |-- inst
    |-- name
    |-- port_index
    |-- read_mbytes
    `-- write_mbytes

    *) fabric/$WWN/tpgt_$TPGT/lun/lun_$LUN_ID/statistics/scsi_transport

    |-- dev_name
    |-- device
    |-- indx
    `-- inst

    The conversion from backend /proc/scsi_target/mib/ context output to configfs
    default groups+attributes include scsi_att_intr_port and scsi_auth_intr output
    from within individual:

    /sys/kernel/config/target/fabric/$WWN/tpgt_$TPGT/acls/$INITIATOR_WWN/lun_$LUN_ID/statistics/

    The legacy procfs output now appear as individual configfs attributes under:

    *) acls/$INITIATOR_WWN/lun_$LUN_ID/statistics/scsi_att_intr_port

    |-- dev
    |-- indx
    |-- inst
    |-- port
    |-- port_auth_indx
    `-- port_ident

    *) acls/$INITIATOR_WWN/lun_$LUN_ID/statistics/scsi_auth_intr

    |-- att_count
    |-- creation_time
    |-- dev
    |-- dev_or_port
    |-- hs_num_cmds
    |-- indx
    |-- inst
    |-- intr_name
    |-- map_indx
    |-- num_cmds
    |-- port
    |-- read_mbytes
    |-- row_status
    `-- write_mbytes

    Also, this includes adding struct target_fabric_configfs_template->
    tfc_wwn_fabric_stats_cit and ->tfc_tpg_nacl_stat_cit respectively for
    use during target_core_fabric_configfs.c:target_fabric_setup_cits()

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

    Nicholas Bellinger