From: Boaz Harrosh <bharrosh@panasas.com>
To: Matthew Dharm <mdharm-scsi@one-eyed-alien.net>
Cc: James Bottomley <James.Bottomley@SteelEye.com>,
FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>,
linux-scsi <linux-scsi@vger.kernel.org>,
Alan Stern <stern@rowland.harvard.edu>,
Greg Kroah-Hartman <gregkh@suse.de>,
Russell King <rmk@arm.linux.org.uk>,
Christoph Hellwig <hch@infradead.org>,
Randy Dunlap <rdunlap@xenotime.net>
Subject: Re: [PATCH ver2 2/5] scsi_error: Refactoring scsi_error to facilitate in synchronous REQUEST_SENSE
Date: Tue, 11 Sep 2007 11:00:31 +0300 [thread overview]
Message-ID: <46E64B1F.9040306@panasas.com> (raw)
In-Reply-To: <20070910211549.GA14439@one-eyed-alien.net>
On Tue, Sep 11 2007 at 0:15 +0300, Matthew Dharm <mdharm-scsi@one-eyed-alien.net> wrote:
> On Mon, Sep 10, 2007 at 10:35:25PM +0300, Boaz Harrosh wrote:
>> diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
>> index 20a72aa..a02400c 100644
>> --- a/drivers/scsi/scsi_error.c
>> +++ b/drivers/scsi/scsi_error.c
>> @@ -590,42 +590,23 @@ static void scsi_abort_eh_cmnd(struct scsi_cmnd *scmd)
>> }
>>
>> /**
>> - * scsi_send_eh_cmnd - submit a scsi command as part of error recory
>> + * scsi_eh_prep_cmnd - Save a scsi command info as part of error recory
>> * @scmd: SCSI command structure to hijack
>> - * @cmnd: CDB to send
>> + * @ses: structure to save restore information
>> + * @cmnd: CDB to send. Can be NULL if no new cmnd is needed
>> * @cmnd_size: size in bytes of @cmnd
>> - * @timeout: timeout for this request
>> - * @copy_sense: request sense data if set to 1
>> + * @copy_sense: size of sense data to copy. or 0
>> *
>> - * This function is used to send a scsi command down to a target device
>> - * as part of the error recovery process. If @copy_sense is 0 the command
>> - * sent must be one that does not transfer any data. If @copy_sense is 1
>> - * the command must be REQUEST_SENSE and this functions copies out the
>> - * sense buffer it got into @scmd->sense_buffer.
>> - *
>> - * Return value:
>> - * SUCCESS or FAILED or NEEDS_RETRY
>> + * This function is used to save a scsi command information before re-execution
>> + * as part of an error recovery process. If @copy_sense is 0 the command
>> + * given must be one that does not transfer any data. If @copy_sense != 0
>> + * the command should be NULL and this functions sets up the cmnd and
>> + * command buffers to be read into @scmd->sense_buffer.
>> **/
>> -static int scsi_send_eh_cmnd(struct scsi_cmnd *scmd, unsigned char *cmnd,
>> - int cmnd_size, int timeout, unsigned copy_sense)
>> +void scsi_eh_prep_cmnd(struct scsi_cmnd *scmd, struct scsi_eh_save *ses,
>> + unsigned char *cmnd, int cmnd_size, unsigned copy_sense)
>
> I'm not terribly keen on the naming of copy_sense, tho I see what you're
> trying to do. A better name and better comments about what it means when
> != 0 would fix this.
>
> Matt
>
When you're right you're right. This is what happens when you try to
write comprehensible comments at 22:45 ;)
I will send first two patches as replays to the original patches
Thanks
next prev parent reply other threads:[~2007-09-11 8:01 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-10 19:13 [patchset ver2 0/5] Refactoring scsi_error to facilitate in synchronous REQUEST_SENSE Boaz Harrosh
2007-09-10 19:34 ` [PATCH ver2 1/5] scsi_error: code cleanup before refactoring of scsi_send_eh_cmnd() Boaz Harrosh
2007-09-11 8:03 ` [PATCH ver3 " Boaz Harrosh
2007-09-11 8:11 ` Julian Calaby
2007-09-11 8:54 ` Benny Halevy
2007-09-11 15:41 ` Alan Stern
2007-09-11 17:38 ` Boaz Harrosh
2007-09-11 17:39 ` [PATCH ver4 " Boaz Harrosh
2007-10-03 15:55 ` James Bottomley
2007-10-08 14:29 ` Boaz Harrosh
2007-10-08 14:35 ` [PATCH ver5 " Boaz Harrosh
2007-09-10 19:35 ` [PATCH ver2 2/5] scsi_error: Refactoring scsi_error to facilitate in synchronous REQUEST_SENSE Boaz Harrosh
2007-09-10 21:15 ` Matthew Dharm
2007-09-11 8:00 ` Boaz Harrosh [this message]
2007-09-11 8:04 ` [PATCH ver3 " Boaz Harrosh
2007-10-03 15:59 ` James Bottomley
2007-10-08 14:36 ` [PATCH ver5 " Boaz Harrosh
2007-09-10 19:36 ` [PATCH ver2 3/5] usb: transport.c use scsi_eh API in REQUEST_SENSE execution Boaz Harrosh
2007-09-10 19:37 ` [PATCH ver2 4/5] NCR5380: Use scsi_eh API for REQUEST_SENSE invocation Boaz Harrosh
2007-09-10 19:39 ` [PATCH ver2 5/5] arm: fas216 " Boaz Harrosh
2007-09-12 7:44 ` Russell King
2007-09-12 8:15 ` Benny Halevy
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=46E64B1F.9040306@panasas.com \
--to=bharrosh@panasas.com \
--cc=James.Bottomley@SteelEye.com \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=gregkh@suse.de \
--cc=hch@infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mdharm-scsi@one-eyed-alien.net \
--cc=rdunlap@xenotime.net \
--cc=rmk@arm.linux.org.uk \
--cc=stern@rowland.harvard.edu \
/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).