This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-devel][PATCH]blktap: handle barrier I/O request

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel][PATCH]blktap: handle barrier I/O request
From: "Chun Yan Liu" <cyliu@xxxxxxxxxx>
Date: Wed, 03 Nov 2010 01:12:55 -0600
Delivery-date: Wed, 03 Nov 2010 00:13:54 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Current /tools/blktap does not support barrier feature. A barrier IO request cannot be handled. But for some file systems, barrier IO is important. The patch in the attachment is trying to hanlde a write barrier IO request, by emulating the barrier IO behaviour from file operations. Following is a simple descripition of the patch work:

With PV driver, a blktap IO request sent to frontend driver->backend driver-> /tools/blktap/ tapdisk thread->operating backend file. Since there is no place to set BARRIER flag in file system operations, a barrier IO behaviour should be emulated.

In the patch, when receving a write barrier IO request, it first check all previous requests completed (for aio context, it first submit preceding requests still in queue, then wait for all requests completed; for sync context, one request completed before next request submit, no more work to do), then do fsync() to flush data to disk, then submit write barrier as write. As the same, wait for write barrier request completed, and do fsync() again to flush data to disk. Then continue to processing following requests.

Signed-off by: Chunyan Liu <cyliu@xxxxxxxxxx>

Please review it and share your comments.


Xen-devel mailing list

Attachment: tapdisk-barrier.PATCH
Description: Text document

Xen-devel mailing list
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel][PATCH]blktap: handle barrier I/O request, Chun Yan Liu <=