All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: dgilbert@interlog.com,
	SCSI development list <linux-scsi@vger.kernel.org>,
	christoph Hellwig <hch@infradead.org>
Cc: "Martin K. Petersen" <martin.petersen@ORACLE.COM>
Subject: Re: [PATCH] scsi_debug: switch to table based parser
Date: Mon, 24 Nov 2014 10:00:35 +0100	[thread overview]
Message-ID: <5472F3B3.9070602@suse.de> (raw)
In-Reply-To: <54496606.3050608@interlog.com>

On 10/23/2014 10:33 PM, Douglas Gilbert wrote:
> Changing a frequently hacked, big switch parser to being table
> based is, of necessity, not a small patch. Testing showed up
> some breakages which required extra code and re-factoring.
> Since supporting the REPORT SUPPORTED OPERATION CODES command,
> checking cdbs for non-zero values in reserved locations, and
> the table based parser are closely related; implementing them
> at the same time seemed to be practical. But some additions,
> such as the COMPARE AND WRITE command, should really be in
> their own patches (but adding new bugs was a useful technique
> for finding existing ones).
> 
> The first attachment is large and against Christoph's
> drivers-for-3.19 branch. It will also apply to his
> drivers-for-3.18 branch. The second, smaller attachment is
> for anyone who wants to look at (or try) this patch on
> lk 3.17.1; first apply the second patch, then the first.
> Almost all of my testing has been on lk 3.17.0 and .1 .
> 
> Perhaps contributors to this driver, such as Martin Petersen
> who has written large parts of this driver (e.g. logical block
> provisioning, DIF and error injection), might run any test
> cases they have to determine what I have broken.
> 
> Speed improvements at this stage are marginal at best.
> 
> ChangeLog:
>    - remove big switch statement in queuecommand() and replace
>      with a table based parser
>    - implement REPORT SUPPORTED OPERATION CODES command which
>      reads that table
>    - add 'strict' option which when set will cause each incoming
>      cdb to be checked against the cdb usage mask held in the
>      table based parser
>    - add logic for ILLEGAL REQUEST sense key specific field
>      pointers, use for most ILLEGAL REQUESTs
>    - add 'capacity data has changed' unit attention since the
>      virtual_gb  option can be changed on-the-fly
>    - implement REPORT SUPPORTED TASK MANAGEMENT FUNCTIONS command
>    - implement COMPARE AND WRITE command
>    - implement NDOB (no data-out buffer) in WRITE SAME(16)
>    - make GET LBA STATUS work when no logical block provisioning
> 
> Todo:
>    - re-order teardown in scsi_debug_exit()
>    - make sdebug_dev_info::stopped atomic (add to end of uas_bm ?)
>    - review Rob Elliott's suggestions; look at speed ups
>    - remove host_lock logic and make the host_lock option a dummy
>    - update some mode page and VPD data to reflect more recent
>      devices
>    - changing remaining >> and << byte handling over to
>      get/put_unaligned_be*()
>    - set INFO field for COMPARE AND WRITE command MISCOMPAREs
> 
> Signed-off-by: Douglas Gilbert <dgilbert@interlog.com>

Hmm. There are at least three things packed into this patch:
- Table-based parsing
- Sense code generation fixes for invalid field in cdb
- Additional cdb decoding.

Can you please split the patch into logical sections, eg
patches for
- sense code generation improvements
- table-based parsing
- Additional CDB decoding

With that it should be easier to review.

And please add a definition to XDWRITEREAD(10) to
include/scsi/scsi.h instead of using the raw value
in scsi_debug.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      zSeries & Storage
hare@suse.de			      +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      parent reply	other threads:[~2014-11-24  9:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-23 20:33 [PATCH] scsi_debug: switch to table based parser Douglas Gilbert
2014-11-24  8:49 ` christoph Hellwig
2014-11-24  9:00 ` 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=5472F3B3.9070602@suse.de \
    --to=hare@suse.de \
    --cc=dgilbert@interlog.com \
    --cc=hch@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.