[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • 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
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

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.
Thanks.

Chunyan

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

Attachment: tapdisk-barrier.PATCH
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.