dm-integrity and write reordering

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

 



Hi,

I was wondering how (excluding possible crashes) dm-integrity
guarantees that the hashes that it stores for each sector is
consistent with the data for each sector.

I've been told that outside of FUAs or flushes, block IOs can be
arbitrarily reordered (see this article
https://lwn.net/Articles/400541/). So, let's say there are 2 write
operations, A and B, writing to the same sector, not separated by any
FUA or flushes. We know that even if they are concurrent, dm-integrity
will ensure that they are not submitted concurrently: write A must
complete first (its end_io is called) before write B is submitted.
This is the add_new_range() logic, if I am interpreting it correctly.
In this case, the hash of write B is written to disk.

Can the disk order write B before write A, thereby making the hash
check fail? Or is there an ordering guarantee, that if write B is
submitted after write A's end_io, it must be ordered after? The
add_new_range() logic seems to suggest that that is the case. Are
there any special flags that dm-integrity appends in order to get this
ordering guarantee?

Thanks,
David




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux