page cache flush before unmap?
Hello, I wanted to know if rbd will flush any writes in the page cache when a volume is "unmap"ed on the host, of if we need to flush explicitly using "sync" before unmap? Thanks, Shridhar
On Mon, May 4, 2020 at 7:32 AM Void Star Nill <void.star.nill@gmail.com> wrote:
Hello,
I wanted to know if rbd will flush any writes in the page cache when a volume is "unmap"ed on the host, of if we need to flush explicitly using "sync" before unmap?
In effect, yes. rbd doesn't do it itself, but the block layer does flush dirty data after making the disk unavailable for users and before completely destroying it. That said, it is always better to flush everything you need flushed yourself. That way you are clear and explicit about your intent, can log or react to errors, etc. Thanks, Ilya
Thanks Ilya for the quick response. On Mon, 4 May 2020 at 11:03, Ilya Dryomov <idryomov@gmail.com> wrote:
On Mon, May 4, 2020 at 7:32 AM Void Star Nill <void.star.nill@gmail.com> wrote:
Hello,
I wanted to know if rbd will flush any writes in the page cache when a volume is "unmap"ed on the host, of if we need to flush explicitly using "sync" before unmap?
In effect, yes. rbd doesn't do it itself, but the block layer does flush dirty data after making the disk unavailable for users and before completely destroying it.
That said, it is always better to flush everything you need flushed yourself. That way you are clear and explicit about your intent, can log or react to errors, etc.
Thanks,
Ilya
participants (2)
-
Ilya Dryomov
-
Void Star Nill