31 May, 2019

1 commit

  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version this program is distributed in the
    hope that it will be useful but without any warranty without even
    the implied warranty of merchantability or fitness for a particular
    purpose see the gnu general public license for more details you
    should have received a copy of the gnu general public license along
    with this program if not write to the free software foundation inc
    59 temple place suite 330 boston ma 02111 1307 usa

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

    has been chosen to replace the boilerplate/reference in 1334 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Richard Fontana
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190527070033.113240726@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

10 Nov, 2018

1 commit


24 Feb, 2016

2 commits

  • If a device needs to be rescanned the device_handler might need
    to be rechecked, too.
    So add a 'rescan' callback to the device handler and call it
    upon scsi_rescan_device(). The rescan callback will be invoked
    from the Unit Attention handling of ASC/ASCQ 3F 03
    (INQUIRY DATA HAS CHANGED).

    Reviewed-by: Bart Van Assche
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Hannes Reinecke
    Signed-off-by: Martin K. Petersen

    Hannes Reinecke
     
  • The port group needs to be a separate structure as several
    LUNs might belong to the same group.

    Reviewed-by: Christoph Hellwig
    Reviewed-by: Ewan Milne
    Signed-off-by: Hannes Reinecke
    Signed-off-by: Martin K. Petersen

    Hannes Reinecke
     

29 Aug, 2015

4 commits

  • Add a ->handler and a ->handler_data field to struct scsi_device and kill
    this indirection. Also move struct scsi_device_handler to scsi_dh.h so that
    changes to it don't require rebuilding every SCSI LLDD.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Martin K. Petersen
    Reviewed-by: Hannes Reinecke
    Signed-off-by: James Bottomley

    Christoph Hellwig
     
  • Stop building scsi_dh as a separate module and integrate it fully into the
    core SCSI code with explicit callouts at bus scan time. For now the
    callouts are placed at the same point as the old bus notifiers were called,
    but in the future we will be able to look at ALUA INQUIRY data earlier on.

    Note that this also means that the device handler modules need to be loaded
    by the time we scan the bus. The next patches will add support for
    autoloading device handlers at bus scan time to make sure they are always
    loaded if they are enabled in the kernel config.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Martin K. Petersen
    Reviewed-by: Hannes Reinecke
    Acked-by: Mike Snitzer
    Signed-off-by: James Bottomley

    Christoph Hellwig
     
  • This way we can reused the same code any attachment method, not just those
    requested from dm-mpath.

    [jejb: fixup checkpatch error]
    Signed-off-by: Christoph Hellwig
    Reviewed-by: Martin K. Petersen
    Reviewed-by: Hannes Reinecke
    Acked-by: Mike Snitzer
    Signed-off-by: James Bottomley

    Christoph Hellwig
     
  • While allowing dm-mpath to attach device handlers is a functionality we need
    for backwards compatibility reason there is no reason to reference count
    them and detach them if dm-mpath stops using the device for some reason.

    If the device handler works for the given device it can just stay attached,
    and we can take the retain_hw_handler codepath.

    Signed-off-by: Christoph Hellwig
    Acked-by: Mike Snitzer
    Acked-by: Hannes Reinecke
    Signed-off-by: James Bottomley

    Christoph Hellwig
     

20 Jul, 2012

1 commit

  • Introduce scsi_dh_attached_handler_name() to retrieve the name of the
    scsi_dh that is attached to the scsi_device associated with the provided
    request queue. Returns NULL if a scsi_dh is not attached.

    Also, fix scsi_dh_{attach,detach} function header comments to document
    @q rather than @sdev.

    Signed-off-by: Mike Snitzer
    Tested-by: Babu Moger
    Reviewed-by: Chandra Seetharaman
    Acked-by: Hannes Reinecke
    Signed-off-by: James Bottomley

    Mike Snitzer
     

05 Dec, 2009

1 commit


23 Aug, 2009

1 commit

  • When we moved the device handler functionality from dm layer to SCSI layer
    we dropped the parameter functionality.

    This path adds an interface to scsi dh layer to set device handler
    parameters.

    Basically, multipath layer need to create a string with all the parameters
    and call scsi_dh_set_params() after it called scsi_dh_attach() on a
    device.

    If a device handler provides such an interface it will handle the parameters
    as it expects them.

    Reported-by: Eddie Williams
    Signed-off-by: Chandra Seetharaman
    Tested-by: Eddie Williams
    Signed-off-by: James Bottomley
    Signed-off-by: James Bottomley

    Chandra Seetharaman
     

27 Jul, 2008

2 commits

  • multipath keeps a separate device table which may be
    more current than the built-in one.
    So we should make sure to always call ->attach whenever
    a multipath map with hardware handler is instantiated.
    And we should call ->detach on removal, too.

    [sekharan: update as per comments from agk]
    Signed-off-by: Hannes Reinecke
    Signed-off-by: Chandra Seetharaman
    Signed-off-by: James Bottomley

    Hannes Reinecke
     
  • This patch converts the EMC device handler to use a proper
    state machine. We now also parse the extended INQUIRY
    information to determine if long trespass commands are
    supported. And we're now using the long trespass command
    correctly. And finally there's now an check at init time
    to refuse to attach to devices not supporting EMC-specific
    VPD pages.

    Signed-off-by: Hannes Reinecke
    Signed-off-by: Chandra Seetharaman
    Signed-off-by: James Bottomley

    Hannes Reinecke
     

15 Jul, 2008

1 commit

  • Do not automatically "select" SCSI_DH for dm-multipath. If SCSI_DH
    doesn't exist,just do not allow hardware handlers to be used.

    Handle SCSI_DH being a module also. Make sure it doesn't allow DM_MULTIPATH
    to be compiled in when SCSI_DH is a module.

    [jejb: added comment for Kconfig syntax]
    Signed-off-by: Chandra Seetharaman
    Reported-by: Randy Dunlap
    Reported-by: Andrew Morton
    Signed-off-by: James Bottomley

    Chandra Seetharaman
     

05 Jun, 2008

1 commit

  • Some of the storage devices (that can be accessed through multiple paths),
    do need some special handling for
    1. Activating the passive path of the storage access.
    2. Decode and handle the special sense codes returned by the devices.
    3. Handle the I/Os being sent to the passive path, especially
    during the device probe time.
    when accessed through multiple paths.

    As of today this special device handling is done at the dm-multipath
    layer using dm-handlers. That works well for (1); for (2) to be handled
    at dm layer, scsi sense information need to be exported from SCSI to dm-layer,
    which is not very attractive; (3) cannot be done at all at the dm layer.

    Device handler has been moved to SCSI mainly to handle (2) and (3) properly.

    Signed-off-by: Chandra Seetharaman
    Signed-off-by: Mike Anderson
    Signed-off-by: Mike Christie
    Signed-off-by: James Bottomley

    Chandra Seetharaman