Re: [PATCH] Add support for WRITEVERIFY10/12/16

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx> wrote:
> On Sat, 14 Jul 2012 13:00:21 +1000
> ronnie sahlberg <ronniesahlberg@xxxxxxxxx> wrote:
>
>> On Sat, Jul 14, 2012 at 12:54 PM, ronnie sahlberg
>> <ronniesahlberg@xxxxxxxxx> wrote:
>> > On Sat, Jul 14, 2012 at 12:20 PM, FUJITA Tomonori
>> > <fujita.tomonori@xxxxxxxxxxxxx> wrote:
>> >> On Sat, 14 Jul 2012 08:30:40 +1000
>> >> ronnie sahlberg <ronniesahlberg@xxxxxxxxx> wrote:
>> >>
>> >>> From 7717d0bdaaf1f37943f659390cf20179c6e3c9ef Mon Sep 17 00:00:00 2001
>> >>> From: Ronnie Sahlberg <ronniesahlberg@xxxxxxxxx>
>> >>> Date: Sat, 14 Jul 2012 08:28:26 +1000
>> >>> Subject: [PATCH] Add support for WRITEVERIFY10/12/16
>> >>
>> >> Thanks!
>> >>
>> >>> Signed-off-by: Ronnie Sahlberg <ronniesahlberg@xxxxxxxxx>
>> >>> ---
>> >>>  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.
>
>

Attachment: 0001-Revert-incorrect-BYTCHK-check.patch.gz
Description: GNU Zip compressed data

Attachment: 0001-Revert-incorrect-BYTCHK-check.patch
Description: Binary data


[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux