[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [dm-devel] bufio & write completion indication
- From: Mikulas Patocka <mpatocka redhat com>
- To: "Kasatkin, Dmitry" <dmitry kasatkin intel com>
- Cc: device-mapper development <dm-devel redhat com>, Milan Broz <mbroz redhat com>
- Subject: Re: [dm-devel] bufio & write completion indication
- Date: Tue, 25 Sep 2012 19:07:42 -0400 (EDT)
On Wed, 26 Sep 2012, Kasatkin, Dmitry wrote:
> Hi,
>
> I have a question.
>
> How dm target can be sure that data really have been written to storage?
>
> - for remaped request
> bio_end really indicates that?
> or data can be stuck in block buffers?
No. When bio_endio is called, data may still be in hardware cache in the
disk and not yet written to the disk. After you receive bio_endio for a
write bio, you must submit another bio with REQ_FLUSH flag to flush the
hardware cache (or you can use blkdev_issue_flush to send it).
> - for bufio requests
> dm_bufio_write_dirty_buffers() provides that ?
Yes. dm_bufio_write_dirty_buffers calls dm_bufio_issue_flush and
dm_bufio_issue_flush flushes the hardware cache.
Mikulas
>
> Thanks,
> Dmitry
>
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]