>>>>> "Malahal" == malahal <malahal@xxxxxxxxxx> writes: Malahal> Martin K. Petersen [martin.petersen@xxxxxxxxxx] wrote: >> */ blk_partition_remap(bio); >> >> + if (bio_integrity_enabled(bio) && bio_integrity_prep(bio)) + goto >> end_io; >> + >> if (old_sector != -1) blk_add_trace_remap(q, bio, old_dev, >> bio->bi_sector, old_sector); Malahal> It is expected that the bio's data should NOT be changed Malahal> until this I/O is sent out to the HBA for WRITES. How do you Malahal> ensure that applications or file systems don't modify the Malahal> data of a bio that is in progress? As I mentioned on dm-devel a few weeks ago it's a big problem for ext2 in particular due to lack of locking the page down while I/O is in flight. So ext2 fails spectacularly. I have been unable to trip XFS and btrfs. I had one mismatch with ext3 but that might have been something else. In any case I have not been able to reproduce it. Even with artificially induced delays in queuecommand. But generally, yes. It is up to the submitter to guarantee that the page isn't being modified during I/O. This requirement will trickle all the way to the top of the stack for things like direct I/O. -- Martin K. Petersen Oracle Linux Engineering -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html