Commit 2d62253
scsi: scsi_debug: Zero clear zones at reset write pointer
When a reset is requested the position of the write pointer is updated but
the data in the corresponding zone is not cleared. Instead scsi_debug
returns any data written before the write pointer was reset. This is an
error and prevents using scsi_debug for stale page cache testing of the
BLKRESETZONE ioctl.
Zero written data in the zone when resetting the write pointer.
Link: https://lore.kernel.org/r/20211122061223.298890-1-shinichiro.kawasaki@wdc.com
Fixes: f0d1cf9 ("scsi: scsi_debug: Add ZBC zone commands")
Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>1 parent eb97545 commit 2d62253
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4657 | 4657 | | |
4658 | 4658 | | |
4659 | 4659 | | |
| 4660 | + | |
4660 | 4661 | | |
4661 | 4662 | | |
4662 | 4663 | | |
| |||
4668 | 4669 | | |
4669 | 4670 | | |
4670 | 4671 | | |
| 4672 | + | |
| 4673 | + | |
| 4674 | + | |
| 4675 | + | |
4671 | 4676 | | |
4672 | 4677 | | |
4673 | 4678 | | |
| |||
0 commit comments