[stgt] [PATCH] COMPARE_AND_WRITE: If the compare fails we should not continue to write the data
FUJITA Tomonori
fujita.tomonori at lab.ntt.co.jp
Fri Aug 31 01:56:30 CEST 2012
On Thu, 30 Aug 2012 09:09:39 -0700
Ronnie Sahlberg <ronniesahlberg at gmail.com> wrote:
> Fix a bug in COMPARE-AND-WRITE. If the compare fails, we have to abort with a sense code immediately and we should NOT continue to over-write the backing store with the mismatching data.
>
> IF the data is not matching, we also should compute at which offset the first mismatch in the buffer occurs.
> This is to be reported in the INFORMATION field (bytes 3-7) in the sense buffer in a later patch.
>
> Signed-off-by: Ronnie Sahlberg <ronniesahlberg at gmail.com>
> ---
> usr/bs_rdwr.c | 25 +++++++++++++++++++++++--
> 1 files changed, 23 insertions(+), 2 deletions(-)
I'm not sure this fixes the previous issue. I'm happy to apply it if
someone confirms it.
Thanks,
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
More information about the stgt
mailing list