From: John Garry <john.g.garry@oracle.com>
To: Bart Van Assche <bvanassche@acm.org>,
"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org,
"James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Subject: Re: [PATCH v3 06/26] scsi_debug: Set .alloc_pseudo_sdev
Date: Fri, 5 Sep 2025 16:00:57 +0100 [thread overview]
Message-ID: <1cadbd04-21fa-464c-b5ab-1e00dfcdbe9c@oracle.com> (raw)
In-Reply-To: <521755f9-246c-4bcf-84a4-2541c830cad3@acm.org>
On 04/09/2025 20:44, Bart Van Assche wrote:
>> for scsi_debug, maybe we can add reserved command handling as part of
>> the driver abort handling, e.g. eh_abort_handler -> scsi_debug_abort
>> should send a reserved command to "abort" a scmd, and the reserved
>> command handler does the same as scsi_debug_abort currently does.
>
> Another possibility for getting rid of .alloc_pseudo_sdev is to allocate
> a pseudo SCSI device if either .nr_reserved_cmds
> or .queue_reserved_command has been set in the SCSI host template. A dummy
> .queue_reserved_command method could be defined as follows in the SCSI
> debug driver:
>
> +/*
> + * The only purpose of this function is to make the SCSI core allocate a
> + * pseudo SCSI device.
> + */
> +static int scsi_debug_queue_reserved_command(struct Scsi_Host *shost,
> + struct scsi_cmnd *scp)
> +{
> + WARN_ON_ONCE(true);
> + scp->result = DID_ERROR << 16;
> + scsi_done(scp);
> + return 0;
> +}
Sure, but it would be nice if this was not a stub, but rather actually
did some work, like "aborting" a task (as I mentioned above). Then
people like me who don't have UFS HW can actually test this
functionality. I do appreciate that it is more work to implement this.
Thanks,
John
next prev parent reply other threads:[~2025-09-05 15:01 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-27 0:06 [PATCH v3 00/26] Optimize the hot path in the UFS driver Bart Van Assche
2025-08-27 0:06 ` [PATCH v3 01/26] scsi: core: Support allocating reserved commands Bart Van Assche
2025-09-04 8:49 ` John Garry
2025-09-04 17:00 ` Bart Van Assche
2025-08-27 0:06 ` [PATCH v3 02/26] scsi: core: Support allocating a pseudo SCSI device Bart Van Assche
2025-09-04 8:59 ` John Garry
2025-09-04 9:29 ` John Garry
2025-09-04 18:05 ` Bart Van Assche
2025-09-05 15:02 ` John Garry
2025-08-27 0:06 ` [PATCH v3 03/26] scsi: core: Do not allocate a budget token for reserved commands Bart Van Assche
2025-09-04 9:41 ` John Garry
2025-09-04 18:17 ` Bart Van Assche
2025-09-05 15:17 ` John Garry
2025-09-05 16:36 ` Bart Van Assche
2025-08-27 0:06 ` [PATCH v3 04/26] scsi: core: Bypass the queue limit checks " Bart Van Assche
2025-09-04 9:49 ` John Garry
2025-09-04 19:25 ` Bart Van Assche
2025-09-05 15:07 ` John Garry
2025-08-27 0:06 ` [PATCH v3 05/26] scsi: core: Add scsi_{get,put}_internal_cmd() helpers Bart Van Assche
2025-09-04 9:56 ` John Garry
2025-09-04 19:41 ` Bart Van Assche
2025-09-05 15:05 ` John Garry
2025-09-05 16:37 ` Bart Van Assche
2025-08-27 0:06 ` [PATCH v3 06/26] scsi_debug: Set .alloc_pseudo_sdev Bart Van Assche
2025-09-04 10:02 ` John Garry
2025-09-04 19:44 ` Bart Van Assche
2025-09-05 15:00 ` John Garry [this message]
2025-08-27 0:06 ` [PATCH v3 07/26] ufs: core: Move an assignment Bart Van Assche
2025-08-27 0:06 ` [PATCH v3 08/26] ufs: core: Change the type of one ufshcd_add_cmd_upiu_trace() argument Bart Van Assche
2025-08-27 0:06 ` [PATCH v3 09/26] ufs: core: Only call ufshcd_add_command_trace() for SCSI commands Bart Van Assche
2025-08-27 0:06 ` [PATCH v3 10/26] ufs: core: Change the type of one ufshcd_add_command_trace() argument Bart Van Assche
2025-08-27 0:06 ` [PATCH v3 11/26] ufs: core: Change the type of one ufshcd_send_command() argument Bart Van Assche
2025-08-27 0:06 ` [PATCH v3 12/26] ufs: core: Only call ufshcd_should_inform_monitor() for SCSI commands Bart Van Assche
2025-08-27 0:06 ` [PATCH v3 13/26] ufs: core: Change the monitor function argument types Bart Van Assche
2025-08-27 0:06 ` [PATCH v3 14/26] ufs: core: Rework ufshcd_mcq_compl_pending_transfer() Bart Van Assche
2025-08-27 0:06 ` [PATCH v3 15/26] ufs: core: Rework ufshcd_eh_device_reset_handler() Bart Van Assche
2025-08-27 0:06 ` [PATCH v3 16/26] ufs: core: Allocate more commands for the SCSI host Bart Van Assche
2025-08-27 0:06 ` [PATCH v3 17/26] ufs: core: Allocate the SCSI host earlier Bart Van Assche
2025-08-27 0:06 ` [PATCH v3 18/26] ufs: core: Call ufshcd_init_lrb() later Bart Van Assche
2025-08-27 0:06 ` [PATCH v3 19/26] ufs: core: Use hba->reserved_slot Bart Van Assche
2025-08-27 0:06 ` [PATCH v3 20/26] ufs: core: Make the reserved slot a reserved request Bart Van Assche
2025-08-27 0:06 ` [PATCH v3 21/26] ufs: core: Do not clear driver-private command data Bart Van Assche
2025-08-27 0:06 ` [PATCH v3 22/26] ufs: core: Optimize the hot path Bart Van Assche
2025-08-27 0:06 ` [PATCH v3 23/26] ufs: core: Pass a SCSI pointer instead of an LRB pointer Bart Van Assche
2025-08-27 0:06 ` [PATCH v3 24/26] ufs: core: Remove the ufshcd_lrb task_tag member Bart Van Assche
2025-08-27 0:06 ` [PATCH v3 25/26] ufs: core: Make blk_mq_tagset_busy_iter() skip reserved requests Bart Van Assche
2025-08-27 0:06 ` [PATCH v3 26/26] ufs: core: Switch to scsi_get_internal_cmd() Bart Van Assche
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=1cadbd04-21fa-464c-b5ab-1e00dfcdbe9c@oracle.com \
--to=john.g.garry@oracle.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=bvanassche@acm.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).