From: "Bryn M. Reeves" <bmr@redhat.com>
To: Niels de Vos <ndevos@redhat.com>
Cc: Jens Axboe <axboe@kernel.dk>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] block: Invalidate the cache for a parent block-device if blkdev_issue_flush() was called for a partition
Date: Thu, 19 Jan 2012 15:06:42 +0000 [thread overview]
Message-ID: <4F183182.5000801@redhat.com> (raw)
In-Reply-To: <4F17D95E.7070403@redhat.com>
On 01/19/2012 08:50 AM, Niels de Vos wrote:
> Executing a BLKFLSBUF-ioctl on a partition flushes the caches for that
> partition but reading data through the parent device will still return
> the old cached data.
>
> The cache for the block-device is not synced if the block-device is kept
> open (due to a mounted partition, for example). Only when all users for
> the disk have exited, the cache for the disk is made consistent again.
>
> Calling invalidate_bdev() on the parent block-device in case
> blkdev_issue_flush() was called for a partition fixes this.
>
> The problem can be worked around by forcing the caches to be flushed
> with either
> # blockdev --flushbufs ${dev_disk}
> or
> # echo 3 > /proc/sys/vm/drop_caches
>
> CC: Bryn M. Reeves <bmr@redhat.com>
> Signed-off-by: Niels de Vos <ndevos@redhat.com>
Acked-by: Bryn M. Reeves <bmr@redhat.com>
Cheers,
Bryn.
prev parent reply other threads:[~2012-01-19 15:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-19 8:50 [PATCH] block: Invalidate the cache for a parent block-device if blkdev_issue_flush() was called for a partition Niels de Vos
2012-01-19 15:06 ` Bryn M. Reeves [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F183182.5000801@redhat.com \
--to=bmr@redhat.com \
--cc=axboe@kernel.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=ndevos@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).