Re: Cache coherency bug: stale reads on /dev/sda1

From: Bagas Sanjaya
Date: Sat Aug 26 2023 - 22:51:45 EST


On 27/08/2023 09:38, Joshua Hudson wrote:
> "Whole disk and all partitions have page caches of their own."
>
> That's so bad.
>
> I can think of numerous cases where this will cause problems; including
> some I encountered last year and did not understand at the time. Manipulating
> EFI partitions through the whole disk device makes sense because FAT filesystems
> *know their offset on the disk*, and some of the existing tools really
> don't like being
> given a partition device.
>
> There's also the astounding: write stuff to disk, umount everything,
> copy one disk to
> another using the whole disk device doesn't work because reading the whole disk
> yields a stale cache (sometimes).
>
> On the other hand, I can think of very few cases where the file vs
> disk buffer pool
> matters, because the loop device is unaffected (writing to a loop
> block device is
> coherent with the file).
>

tl;dr:

> A: http://en.wikipedia.org/wiki/Top_post
> Q: Were do I find info about this thing called top-posting?
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
> A: Top-posting.
> Q: What is the most annoying thing in e-mail?
>
> A: No.
> Q: Should I include quotations after my reply?
>
> http://daringfireball.net/2007/07/on_top

What cases on the loop devices?

--
An old man doll... just what I always wanted! - Clara