|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel][PATCH]blktap: handle barrier I/O request
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
|
tapdisk-barrier.PATCH
Description: Text document
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-devel][PATCH]blktap: handle barrier I/O request,
Chun Yan Liu <=
|
|
|
|
|