Linux-Fsdevel Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: dgilbert@interlog.com, Christoph Hellwig <hch@lst.de>,
Jens Axboe <axboe@kernel.dk>
Cc: Denis Efremov <efremov@linux.com>, Tim Waugh <tim@cyberelk.net>,
Michal Simek <michal.simek@xilinx.com>,
Borislav Petkov <bp@alien8.de>,
"David S. Miller" <davem@davemloft.net>,
Song Liu <song@kernel.org>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Finn Thain <fthain@telegraphics.com.au>,
Michael Schmitz <schmitzmic@gmail.com>,
linux-m68k@lists.linux-m68k.org, linux-block@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org,
linux-raid@vger.kernel.org, linux-scsi@vger.kernel.org,
linux-fsdevel@vger.kernel.org
Subject: Re: rework check_disk_change()
Date: Fri, 4 Sep 2020 11:23:04 +0200 [thread overview]
Message-ID: <29ec4708-3a8d-a4f2-5eea-a08908a8d093@suse.de> (raw)
In-Reply-To: <730eced4-c804-a78f-3d52-2a448dbd1b84@interlog.com>
On 9/2/20 5:38 PM, Douglas Gilbert wrote:
> 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?
>
We do; check scsi_io_completion_action() in drivers/scsi/scsi_lib.c
So I don't think you'd need to keep it in sg.c.
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer
prev parent reply other threads:[~2020-09-04 9:23 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-02 14:11 Christoph Hellwig
2020-09-02 14:12 ` [PATCH 01/19] block: add a bdev_check_media_change helper Christoph Hellwig
2020-09-02 15:17 ` Johannes Thumshirn
2020-09-02 14:12 ` [PATCH 02/19] amiflop: use bdev_check_media_change Christoph Hellwig
2020-09-02 15:19 ` Johannes Thumshirn
2020-09-02 14:12 ` [PATCH 03/19] ataflop: " Christoph Hellwig
2020-09-02 15:22 ` Johannes Thumshirn
2020-09-02 14:12 ` [PATCH 04/19] floppy: " Christoph Hellwig
2020-09-02 15:24 ` Johannes Thumshirn
2020-09-02 14:12 ` [PATCH 05/19] swim: " Christoph Hellwig
2020-09-02 15:30 ` Johannes Thumshirn
2020-09-02 15:31 ` Christoph Hellwig
2020-09-02 14:12 ` [PATCH 06/19] swim: simplify media change handling Christoph Hellwig
2020-09-02 15:33 ` Johannes Thumshirn
2020-09-02 14:12 ` [PATCH 07/19] swim3: use bdev_check_media_changed Christoph Hellwig
2020-09-02 15:41 ` Johannes Thumshirn
2020-09-02 14:12 ` [PATCH 08/19] xsysace: use bdev_check_media_change Christoph Hellwig
2020-09-02 15:41 ` Johannes Thumshirn
2020-09-02 14:12 ` [PATCH 09/19] xsysace: simplify media change handling Christoph Hellwig
2020-09-02 14:12 ` [PATCH 10/19] paride/pcd: use bdev_check_media_change Christoph Hellwig
2020-09-02 15:44 ` Johannes Thumshirn
2020-09-02 14:12 ` [PATCH 11/19] gdrom: " Christoph Hellwig
2020-09-02 15:44 ` Johannes Thumshirn
2020-09-02 22:00 ` antlists
2020-09-08 14:23 ` Christoph Hellwig
2020-09-02 14:12 ` [PATCH 12/19] ide-cd: use bdev_check_media_changed Christoph Hellwig
2020-09-02 15:47 ` Johannes Thumshirn
2020-09-02 14:12 ` [PATCH 13/19] ide-cd: remove idecd_revalidate_disk Christoph Hellwig
2020-09-02 15:48 ` Johannes Thumshirn
2020-09-02 14:12 ` [PATCH 14/19] ide-gd: stop using the disk events mechanism Christoph Hellwig
2020-09-02 14:12 ` [PATCH 15/19] md: use bdev_check_media_change Christoph Hellwig
2020-09-02 15:50 ` Johannes Thumshirn
2020-09-02 16:15 ` Sergei Shtylyov
2020-09-02 14:12 ` [PATCH 16/19] sd: " Christoph Hellwig
2020-09-02 15:51 ` Johannes Thumshirn
2020-09-02 16:19 ` Sergei Shtylyov
2020-09-02 14:12 ` [PATCH 17/19] sr: " Christoph Hellwig
2020-09-02 15:52 ` Johannes Thumshirn
2020-09-02 14:12 ` [PATCH 18/19] sr: simplify sr_block_revalidate_disk Christoph Hellwig
2020-09-02 15:53 ` Johannes Thumshirn
2020-09-02 14:12 ` [PATCH 19/19] block: remove check_disk_change Christoph Hellwig
2020-09-02 15:54 ` Johannes Thumshirn
2020-09-02 15:38 ` rework check_disk_change() Douglas Gilbert
2020-09-04 9:23 ` Hannes Reinecke [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=29ec4708-3a8d-a4f2-5eea-a08908a8d093@suse.de \
--to=hare@suse.de \
--cc=axboe@kernel.dk \
--cc=bp@alien8.de \
--cc=davem@davemloft.net \
--cc=dgilbert@interlog.com \
--cc=efremov@linux.com \
--cc=fthain@telegraphics.com.au \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=linux-raid@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=michal.simek@xilinx.com \
--cc=schmitzmic@gmail.com \
--cc=song@kernel.org \
--cc=tim@cyberelk.net \
--subject='Re: rework check_disk_change()' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).