From: Akinobu Mita <akinobu.mita@gmail.com>
To: linux-scsi@vger.kernel.org
Cc: Akinobu Mita <akinobu.mita@gmail.com>,
"James E.J. Bottomley" <JBottomley@parallels.com>,
Douglas Gilbert <dgilbert@interlog.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>
Subject: [PATCH v2 3/7] scsi_debug: fix duplicate dif_errors increment
Date: Sun, 19 Jan 2014 22:51:39 +0900 [thread overview]
Message-ID: <1390139503-11519-4-git-send-email-akinobu.mita@gmail.com> (raw)
In-Reply-To: <1390139503-11519-1-git-send-email-akinobu.mita@gmail.com>
It is unnecessary to increase dif_errors in dif_verify(), because the
caller will increment it when dif_verify() detects failure.
This bug was introduced by commit beb40ea42bd6 ("[SCSI] scsi_debug:
reduce duplication between prot_verify_read and prot_verify_write")
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Acked-by: Martin K. Petersen <martin.petersen@oracle.com>
Cc: "James E.J. Bottomley" <JBottomley@parallels.com>
Cc: Douglas Gilbert <dgilbert@interlog.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org
---
No change from previous version
drivers/scsi/scsi_debug.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index 9cd211e..1a42880 100644
--- a/drivers/scsi/scsi_debug.c
+++ b/drivers/scsi/scsi_debug.c
@@ -1780,7 +1780,6 @@ static int dif_verify(struct sd_dif_tuple *sdt, const void *data,
be32_to_cpu(sdt->ref_tag) != ei_lba) {
pr_err("%s: REF check failed on sector %lu\n",
__func__, (unsigned long)sector);
- dif_errors++;
return 0x03;
}
return 0;
--
1.8.3.2
next prev parent reply other threads:[~2014-01-19 13:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-19 13:51 [PATCH v2 0/7] scsi_debug: several bug fixes and enable clustering support Akinobu Mita
2014-01-19 13:51 ` [PATCH v2 1/7] scsi_debug: fix false positive logical block reference tag check fail Akinobu Mita
2014-01-19 13:51 ` [PATCH v2 2/7] scsi_debug: make pseudo_primary static Akinobu Mita
2014-01-19 13:51 ` Akinobu Mita [this message]
2014-01-19 13:51 ` [PATCH v2 4/7] scsi_debug: fix resp_xdwriteread() return value when running out of memory Akinobu Mita
2014-01-19 13:51 ` [PATCH v2 5/7] scsi_debug: prepare to enable clustering Akinobu Mita
2014-01-19 13:51 ` [PATCH v2 6/7] scsi_debug: protect device access with atomic_rw lock Akinobu Mita
2014-01-19 13:51 ` [PATCH v2 7/7] scsi_debug: add ability to enable clustering Akinobu Mita
2014-01-19 15:59 ` [PATCH v2 0/7] scsi_debug: several bug fixes and enable clustering support Douglas Gilbert
2014-02-04 4:01 ` 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=1390139503-11519-4-git-send-email-akinobu.mita@gmail.com \
--to=akinobu.mita@gmail.com \
--cc=JBottomley@parallels.com \
--cc=dgilbert@interlog.com \
--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