WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] Xen block fixes, secure discard, and barrier support

To: xen-devel@xxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, hch@xxxxxxxxxxxxx, Jan Beulich <JBeulich@xxxxxxxxxx>
Subject: [Xen-devel] [PATCH] Xen block fixes, secure discard, and barrier support for 3.2 (v1)
From: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Date: Mon, 10 Oct 2011 11:28:11 -0400
Cc:
Delivery-date: Mon, 10 Oct 2011 08:29:58 -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
 [PATCH 1/3] xen/blkback: Support 'feature-barrier' aka old-style

The BARRIER support is done by:
 1) setting the drain value to one and waiting for the 'complete waitqueue' to 
be
    complete. We also double-check the kthread status in case the interface is 
being
    disconnected. Waiting means stalling processing of the queue.
 2) By latching on the refcnt value which is incremented every time a 'struct 
request'
    is used for a particular interface we can figure out outstanding I/Os.
    The refcnt is decremented when all the bio's that were generated for the
    'struct request' have been processed. When we detect that all outstanding
    'struct request' and their bio's have been completed we notify the
    'complete waitqueue' which halted processing of the ring.
 3) When the 'complete waitqueue' is signaled, it submits a WRITE_FLUSH
    operation.

That should take care of emulating the drain behavior properly. When I ran with 
SLES11
guests using the ext3/reiserfs using the 'fio tiobench-example;fio fsx' they 
ran fine.
Also killing the guest during runtime and then restarting showed no corruption.
If there are some better tests to check for proper operation of this - please 
advise.

 [PATCH 2/3] xen/blkback: Fix the inhibition to map pages when

Obvious bugfix in the 'feature-discard' patchset.

 [PATCH 3/3] xen/blk[front|back]: Enhance discard support with secure

We also provide the REQ_SECURE support to allow the user to now issue:
 'blkdev_issue_discard(.., secure)' flag.

[NOTE: My SSD died on my - so I can't test this yet - going through the process
of RMA-ing it, so please consider the 3/3 patch more as an RFC as it has not 
been tested].

Please review.

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