[DRBD-user] how about read a block that not return to upper application in protocol C?

Lars Ellenberg lars.ellenberg at linbit.com
Mon Sep 5 11:50:56 CEST 2016

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


On Mon, Sep 05, 2016 at 01:16:21AM +0800, Mia Lueng wrote:
> Hi All:
> In protocol C, a bio will return to upper application(execute
> bi_endio()) when local bio is completed and  recieve the data ack
> packet from peer.  But if  a write request to block N was submitted
> and written to local disk, but not received the data ack from peer, a
> read request to the same block N  is comming. The read request will
> get the data of block N that was not returned to upper application.
> 
> Will this cause the application's(eg. oracle) logical error?

If you have dependencies between IO requests,
you must not issue the second request,
before the first has completed.

Think of local disk only.

You issue a WRITE to block X.
Then, before that completed,
you issue a READ to block X.
(actual, direct, IO requests to the backend device,
not catched by some intermediate caching layer)

The result of the READ is undefined.
It may return old data, it may return new data,
it may even return partially updated data.

Undefined.

-- 
: Lars Ellenberg
: LINBIT | Keeping the Digital World Running
: DRBD -- Heartbeat -- Corosync -- Pacemaker

DRBD® and LINBIT® are registered trademarks of LINBIT
__
please don't Cc me, but send to list -- I'm subscribed



More information about the drbd-user mailing list