lkml.org 
[lkml]   [2020]   [Sep]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: rework check_disk_change()
    From
    Date
    On 2020-09-02 10:11 a.m., Christoph Hellwig wrote:
    > Hi Jens,
    >
    > this series replaced the not very nice check_disk_change() function with
    > a new bdev_media_changed that avoids having the ->revalidate_disk call
    > at its end. As a result ->revalidate_disk can be removed from a lot of
    > drivers.
    >

    For over 20 years the sg driver has been carrying this snippet that hangs
    off the completion callback:

    if (driver_stat & DRIVER_SENSE) {
    struct scsi_sense_hdr ssh;

    if (scsi_normalize_sense(sbp, sense_len, &ssh)) {
    if (!scsi_sense_is_deferred(&ssh)) {
    if (ssh.sense_key == UNIT_ATTENTION) {
    if (sdp->device->removable)
    sdp->device->changed = 1;
    }
    }
    }
    }

    Is it needed? The unit attention (UA) may not be associated with the
    device changing. Shouldn't the SCSI mid-level monitor UAs if they
    impact the state of a scsi_device object?

    Doug Gilbert

    \
     
     \ /
      Last update: 2020-09-02 17:39    [W:4.268 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site