Yes, you are right. That check shouldnt be changed like that. . I havbe attached a patch top fix the check. It now passes all my test so it should be good. regards ronnie sahlberg On Sat, Jul 14, 2012 at 1:14 PM, FUJITA Tomonori <fujita.tomonori at lab.ntt.co.jp> wrote: > On Sat, 14 Jul 2012 13:00:21 +1000 > ronnie sahlberg <ronniesahlberg at gmail.com> wrote: > >> On Sat, Jul 14, 2012 at 12:54 PM, ronnie sahlberg >> <ronniesahlberg at gmail.com> wrote: >> > On Sat, Jul 14, 2012 at 12:20 PM, FUJITA Tomonori >> > <fujita.tomonori at lab.ntt.co.jp> wrote: >> >> On Sat, 14 Jul 2012 08:30:40 +1000 >> >> ronnie sahlberg <ronniesahlberg at gmail.com> wrote: >> >> >> >>> From 7717d0bdaaf1f37943f659390cf20179c6e3c9ef Mon Sep 17 00:00:00 2001 >> >>> From: Ronnie Sahlberg <ronniesahlberg at gmail.com> >> >>> Date: Sat, 14 Jul 2012 08:28:26 +1000 >> >>> Subject: [PATCH] Add support for WRITEVERIFY10/12/16 >> >> >> >> Thanks! >> >> >> >>> Signed-off-by: Ronnie Sahlberg <ronniesahlberg at gmail.com> >> >>> --- >> >>> usr/bs_rdwr.c | 13 ++++++++++++- >> >>> usr/sbc.c | 20 ++++++++++---------- >> >>> usr/scsi.c | 4 +++- >> >>> 3 files changed, 25 insertions(+), 12 deletions(-) >> >> >> >> (snip) >> >> >> >>> @@ -417,12 +423,6 @@ static int sbc_verify(int host_no, struct scsi_cmd *cmd) >> >>> goto sense; >> >>> } >> >>> >> >>> - bytchk = cmd->scb[1] & 0x02; >> >>> - if (!bytchk) { >> >>> - /* no data compare with the media */ >> >>> - return SAM_STAT_GOOD; >> >>> - } >> >>> - >> >> >> >> What's this change for? >> > >> > There is no BYTCHK flag in WRITEVERIFY* >> > WRITEVERIFY* will always perform a compare to the data. >> > Thats why the check is removed from WRITEVERIFY. >> >> >> So the check is moved down into the bs_rdwr() backend instead. And >> there it is only triggered for VERIFY* commands >> but not for WRITEVERIFY* commands > > But VERIFY_* in the previous code with BYTCHK disabled, the command > doesn't go to bs_rdwc.c. But now such commands goes to bs_rdwc.c > unnecessarily? Also looks like the BYTCHK code in bs_rdwc.c leads > memory leak. > > -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Revert-incorrect-BYTCHK-check.patch.gz Type: application/x-gzip Size: 747 bytes Desc: not available URL: <http://lists.wpkg.org/pipermail/stgt/attachments/20120714/b8583eb3/attachment.bin> -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Revert-incorrect-BYTCHK-check.patch Type: application/octet-stream Size: 1364 bytes Desc: not available URL: <http://lists.wpkg.org/pipermail/stgt/attachments/20120714/b8583eb3/attachment.obj> |