1. 01 12月, 2016 1 次提交
    • A
      fs: configfs: don't return anything from drop_link · e16769d4
      Andrzej Pietrasiewicz 提交于
      Documentation/filesystems/configfs/configfs.txt says:
      
      "When unlink(2) is called on the symbolic link, the source item is
      notified via the ->drop_link() method.  Like the ->drop_item() method,
      this is a void function and cannot return failure."
      
      The ->drop_item() is indeed a void function, the ->drop_link() is
      actually not. This, together with the fact that the value of ->drop_link()
      is silently ignored suggests, that it is the ->drop_link() return
      type that should be corrected and changed to void.
      
      This patch changes drop_link() signature and all its users.
      Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com>
      [hch: reverted reformatting of some code]
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      e16769d4
  2. 31 3月, 2016 3 次提交
  3. 11 3月, 2016 1 次提交
  4. 06 3月, 2016 1 次提交
  5. 14 10月, 2015 1 次提交
  6. 31 7月, 2015 1 次提交
  7. 23 6月, 2015 1 次提交
  8. 16 6月, 2015 2 次提交
  9. 01 6月, 2015 3 次提交
    • C
      target: Subsume se_port + t10_alua_tg_pt_gp_member into se_lun · adf653f9
      Christoph Hellwig 提交于
      This patch eliminates all se_port + t10_alua_tg_pt_gp_member usage,
      and converts current users to direct se_lun pointer dereference.
      
      This includes the removal of core_export_port(), core_release_port()
      core_dev_export() and core_dev_unexport().  Along with conversion
      of special case se_lun pointer dereference within PR ALL_TG_PT=1
      and ALUA access state transition UNIT_ATTENTION handling.
      
      Also, update core_enable_device_list_for_node() to reference the
      new per se_lun->lun_deve_list when creating a new entry, or
      replacing an existing one via RCU.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NHannes Reinecke <hare@suse.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      adf653f9
    • N
      target: Convert se_portal_group->tpg_lun_list[] to RCU hlist · 6bb82612
      Nicholas Bellinger 提交于
      This patch converts the fixed size se_portal_group->tpg_lun_list[]
      to use modern RCU with hlist_head in order to support an arbitary
      number of se_lun ports per target endpoint.
      
      It includes dropping core_tpg_alloc_lun() from core_dev_add_lun(),
      and calling it directly from target_fabric_make_lun() to allocate
      a new se_lun.  And add a new target_fabric_port_release() configfs
      item callback to invoke kfree_rcu() to release memory during
      se_lun->lun_group shutdown.
      
      Also now that se_node_acl->lun_entry_hlist is using RCU, convert
      existing tpg_lun_lock to struct mutex so core_tpg_add_node_to_devs()
      can perform RCU updater logic without releasing ->tpg_lun_mutex.
      
      Also, drop core_tpg_clear_object_luns() and it's single consumer
      in iscsi-target, which is duplicating TPG LUN shutdown logic and
      is current code results in a NOP.
      
      Finally, sbp-target and xen-scsiback fabric driver conversions are
      included, which are required due to the non-standard way they use
      ->tpg_lun_hlist.
      Reviewed-by: NHannes Reinecke <hare@suse.de>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Chris Boot <bootc@bootc.net>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      6bb82612
    • N
      target: Convert se_node_acl->device_list[] to RCU hlist · 29a05dee
      Nicholas Bellinger 提交于
      This patch converts se_node_acl->device_list[] table for mappedluns
      to modern RCU hlist_head usage in order to support an arbitrary number
      of node_acl lun mappings.
      
      It converts transport_lookup_*_lun() fast-path code to use RCU read path
      primitives when looking up se_dev_entry.  It adds a new hlist_head at
      se_node_acl->lun_entry_hlist for this purpose.
      
      For transport_lookup_cmd_lun() code, it works with existing per-cpu
      se_lun->lun_ref when associating se_cmd with se_lun + se_device.
      Also, go ahead and update core_create_device_list_for_node() +
      core_free_device_list_for_node() to use ->lun_entry_hlist.
      
      It also converts se_dev_entry->pr_ref_count access to use modern
      struct kref counting, and updates core_disable_device_list_for_node()
      to kref_put() and block on se_deve->pr_comp waiting for outstanding PR
      special-case PR references to drop, then invoke kfree_rcu() to wait
      for the RCU grace period to complete before releasing memory.
      
      So now that se_node_acl->lun_entry_hlist fast path access uses RCU
      protected pointers, go ahead and convert remaining non-fast path
      RCU updater code using ->lun_entry_lock to struct mutex to allow
      callers to block while walking se_node_acl->lun_entry_hlist.
      
      Finally drop the left-over core_clear_initiator_node_from_tpg() that
      originally cleared lun_access during se_node_acl shutdown, as post
      RCU conversion it now becomes duplicated logic.
      Reviewed-by: NHannes Reinecke <hare@suse.de>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      29a05dee
  10. 31 5月, 2015 4 次提交
  11. 15 4月, 2015 1 次提交
    • C
      target: simplify the target template registration API · 9ac8928e
      Christoph Hellwig 提交于
      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 <bart.vanassche@sandisk.com>.
      
      (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: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      9ac8928e
  12. 02 10月, 2014 1 次提交
  13. 18 9月, 2014 2 次提交
  14. 16 9月, 2014 1 次提交
  15. 17 12月, 2013 2 次提交
  16. 17 10月, 2013 1 次提交
  17. 11 9月, 2013 1 次提交
  18. 13 8月, 2013 1 次提交
  19. 04 7月, 2013 1 次提交
  20. 19 2月, 2013 2 次提交
    • N
      target: Add missing mapped_lun bounds checking during make_mappedlun setup · fbbf8555
      Nicholas Bellinger 提交于
      This patch adds missing bounds checking for the configfs provided
      mapped_lun value during target_fabric_make_mappedlun() setup ahead
      of se_lun_acl initialization.
      
      This addresses a potential OOPs when using a mapped_lun value that
      exceeds the hardcoded TRANSPORT_MAX_LUNS_PER_TPG-1 value within
      se_node_acl->device_list[].
      Reported-by: NJan Engelhardt <jengelh@inai.de>
      Cc: Jan Engelhardt <jengelh@inai.de>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      fbbf8555
    • N
      target: Fix lookup of dynamic NodeACLs during cached demo-mode operation · fcf29481
      Nicholas Bellinger 提交于
      This patch fixes a bug in core_tpg_check_initiator_node_acl() ->
      core_tpg_get_initiator_node_acl() where a dynamically created
      se_node_acl generated during session login would be skipped during
      subsequent lookup due to the '!acl->dynamic_node_acl' check, causing
      a new se_node_acl to be created with a duplicate ->initiatorname.
      
      This would occur when a fabric endpoint was configured with
      TFO->tpg_check_demo_mode()=1 + TPF->tpg_check_demo_mode_cache()=1
      preventing the release of an existing se_node_acl during se_session
      shutdown.
      
      Also, drop the unnecessary usage of core_tpg_get_initiator_node_acl()
      within core_dev_init_initiator_node_lun_acl() that originally
      required the extra '!acl->dynamic_node_acl' check, and just pass
      the configfs provided se_node_acl pointer instead.
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      fcf29481
  21. 01 2月, 2013 1 次提交
  22. 05 12月, 2012 1 次提交
  23. 28 11月, 2012 3 次提交
  24. 07 11月, 2012 1 次提交
  25. 18 9月, 2012 1 次提交
  26. 17 7月, 2012 1 次提交
  27. 16 3月, 2012 1 次提交