1

The COMPARE AND WRITE command description in the SBC-4 doesn't say anything about the case when the range of logical blocks to be replaced contains unmapped blocks.

What's the common practice to deal with this case on the target side? Should a target assume that the verification step is always successful in the case when an initiator asks to replace unmapped blocks with something meaningful?

HEKTO
  • 3,876
  • 2
  • 24
  • 45
  • At first blush, it strikes me that if LBPRZ is set, then the unmapped blocks simply read as zero for purposes of verification. If it's not set, then I'm with you. Perhaps, it's treated as a READ of garbage data that will fail the verify? It's a great question! – Mike Andrews Jun 06 '15 at 03:22

1 Answers1

1

When a block is unmapped it is equal to all zeroes. You should perform all your commands that read or compare data with this block as it was just zeroes.

Baruch Even
  • 2,581
  • 1
  • 17
  • 23
  • 1
    That's what I'm doing now, and VMware ESXi is happy about that... However the LBPRZ bit isn't set, and this worries me – HEKTO Jun 17 '15 at 16:36
  • 1
    I agree. It's not clear what to do in your case. Though, I submit that the LBPRZ is more of a guarantee that it'll read zeroes if it's unmapped. I *think* you may be OK returning zeroes in this case, but the initiator can't count on it being zeroes without LBPRZ. – Mike Andrews Jun 17 '15 at 16:38