target-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Disseldorp <ddiss@suse.de>
To: target-devel@vger.kernel.org
Cc: linux-scsi@vger.kernel.org
Subject: [PATCH v4 0/4] scsi: target: COMPARE AND WRITE miscompare sense
Date: Sat, 31 Oct 2020 23:32:07 +0000	[thread overview]
Message-ID: <20201031233211.5207-1-ddiss@suse.de> (raw)

This patchset adds missing functionality to return the offset of
non-matching read/compare data in the sense INFORMATION field on
COMPARE AND WRITE miscompare.

The functionality can be tested using the libiscsi
CompareAndWrite.MiscompareSense test proposed via:
  https://github.com/sahlberg/libiscsi/pull/344

Changes since v3:
- (4/4) optimize for equality, as suggested by Doug
  + perform byte-by-byte offset check only after memcmp() failure
  + drop Mike's RB tag due to this rework

Changes since v2:
- perform bad_sector->sense_info rename in overlooked ib_isert
- drop scatterlist change queued via Jens' tree
- add Mike's reviewed-by tag
- rebase against Martin's 5.11/scsi-queue branch

Changes since v1:
- drop unnecessary WARN_ON()
- fix two checkpatch warnings
- drop single-use nlbas variable
- avoid compare_len recalculation

Cheers, David

 drivers/infiniband/ulp/isert/ib_isert.c |   4 +-
 drivers/target/target_core_sbc.c        | 138 ++++++++++++++----------
 drivers/target/target_core_transport.c  |  33 +++---
 include/target/target_core_base.h       |   2 +-
 4 files changed, 104 insertions(+), 73 deletions(-)

             reply	other threads:[~2020-10-31 23:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-31 23:32 David Disseldorp [this message]
2020-10-31 23:32 ` [PATCH v4 1/4] scsi: target: rename struct sense_info to sense_detail David Disseldorp
2020-10-31 23:32 ` [PATCH v4 2/4] scsi: target: rename cmd.bad_sector to cmd.sense_info David Disseldorp
2020-10-31 23:32 ` [PATCH v4 3/4] scsi: target: split out COMPARE AND WRITE memcmp into helper David Disseldorp
2020-10-31 23:32 ` [PATCH v4 4/4] scsi: target: return COMPARE AND WRITE miscompare offsets David Disseldorp
2020-11-05  3:03 ` [PATCH v4 0/4] scsi: target: COMPARE AND WRITE miscompare sense Martin K. Petersen
2020-11-11  2:58 ` Martin K. Petersen

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=20201031233211.5207-1-ddiss@suse.de \
    --to=ddiss@suse.de \
    --cc=linux-scsi@vger.kernel.org \
    --cc=target-devel@vger.kernel.org \
    /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).