Re: [PATCH 0/3] mm: Swap checksum

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Valdis.Kletnieks
Date: Wednesday, May 26, 2010 - 2:28 pm

On Thu, 27 May 2010 00:31:44 +0900, Minchan Kim said:

I'm pretty sure that what Cesar meant was that the following could happen:

1) Write block 11983 on the disk, checksum 34FE9B72.
(... time passes.. maybe weeks)
2) Attempt to write block 11983 on disk with checksum AE9F3581. The write fails
due to a power failure or something.
(... more time passes...)
3) Read block 11983, get back data with checksum 34FE9B72. Checksum matches,
and there's no indication that the write in (2) ever failed. The program
proceeds thinking it's just read back the most recently written data, when in
fact it's just read an older version of that block. Problems can ensue if the
data just read is now out of sync with *other* blocks of data - instant data
corruption.

To be fair, we currently have the "read a stale block" problem after crashes
already.  The issue is that BLK_DEV_INTEGRITY can't provide a solution here,
but most users will form a mental image that it *is* in fact giving them
that guarantee.  The resulting mismatch between reality and expectations
cannot end well.
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/3] mm: Swap checksum, Cesar Eduardo Barros, (Sat May 22, 11:08 am)
[PATCH 1/3] mm/swapfile.c: better messages for swap_info_get, Cesar Eduardo Barros, (Sat May 22, 11:08 am)
[PATCH 2/3] kernel/power/swap.c: do not use end_swap_bio_read, Cesar Eduardo Barros, (Sat May 22, 11:08 am)
[PATCH 3/3] mm: Swap checksum, Cesar Eduardo Barros, (Sat May 22, 11:08 am)
Re: [PATCH 1/3] mm/swapfile.c: better messages for swap_in ..., Cesar Eduardo Barros, (Sat May 22, 11:18 am)
Re: [PATCH 0/3] mm: Swap checksum, Minchan Kim, (Sun May 23, 7:03 am)
Re: [PATCH 3/3] mm: Swap checksum, Avi Kivity, (Sun May 23, 8:19 am)
Re: [PATCH 0/3] mm: Swap checksum, Cesar Eduardo Barros, (Sun May 23, 11:32 am)
Re: [PATCH 3/3] mm: Swap checksum, Cesar Eduardo Barros, (Sun May 23, 11:58 am)
Re: [PATCH 0/3] mm: Swap checksum, Minchan Kim, (Sun May 23, 5:09 pm)
Re: [PATCH 0/3] mm: Swap checksum, Cesar Eduardo Barros, (Sun May 23, 5:57 pm)
Re: [PATCH 0/3] mm: Swap checksum, Minchan Kim, (Sun May 23, 7:05 pm)
Re: [PATCH 3/3] mm: Swap checksum, Avi Kivity, (Sun May 23, 11:41 pm)
Re: [PATCH 3/3] mm: Swap checksum, Nick Piggin, (Mon May 24, 12:32 am)
Re: [PATCH 0/3] mm: Swap checksum, Cesar Eduardo Barros, (Mon May 24, 3:50 am)
Re: [PATCH 3/3] mm: Swap checksum, Avi Kivity, (Mon May 24, 3:51 am)
Re: [PATCH 3/3] mm: Swap checksum, Cesar Eduardo Barros, (Mon May 24, 4:24 am)
Re: [PATCH 0/3] mm: Swap checksum, Minchan Kim, (Tue May 25, 4:52 pm)
Re: [PATCH 0/3] mm: Swap checksum, Cesar Eduardo Barros, (Wed May 26, 3:21 am)
Re: [PATCH 0/3] mm: Swap checksum, Minchan Kim, (Wed May 26, 8:31 am)
Re: [PATCH 0/3] mm: Swap checksum, Valdis.Kletnieks, (Wed May 26, 2:28 pm)
Re: [PATCH 0/3] mm: Swap checksum, Minchan Kim, (Wed May 26, 3:45 pm)
Re: [PATCH 0/3] mm: Swap checksum, Cesar Eduardo Barros, (Wed May 26, 4:19 pm)
Re: [PATCH 0/3] mm: Swap checksum, Minchan Kim, (Wed May 26, 4:27 pm)