Re: [Qemu-devel] [PATCH v7] sheepdog: add discard/trim support for sheepdog

2013-04-18 Thread Liu Yuan
On 04/18/2013 03:37 PM, Stefan Hajnoczi wrote: >> @@ -184,6 +186,8 @@ typedef struct SheepdogInode { >> > uint32_t data_vdi_id[MAX_DATA_OBJS]; >> > } SheepdogInode; >> > >> > +static bool discard_supported = true; > Normally state should be part of BDRVSheepdogState so that it does not > af

Re: [Qemu-devel] [PATCH v7] sheepdog: add discard/trim support for sheepdog

2013-04-18 Thread Stefan Hajnoczi
On Thu, Apr 18, 2013 at 01:50:53PM +0800, Liu Yuan wrote: > @@ -184,6 +186,8 @@ typedef struct SheepdogInode { > uint32_t data_vdi_id[MAX_DATA_OBJS]; > } SheepdogInode; > > +static bool discard_supported = true; Normally state should be part of BDRVSheepdogState so that it does not affect

[Qemu-devel] [PATCH v7] sheepdog: add discard/trim support for sheepdog

2013-04-17 Thread Liu Yuan
From: Liu Yuan The 'TRIM' command from VM that is to release underlying data storage for better thin-provision is already supported by the Sheepdog. This patch adds the TRIM support at QEMU part. For older Sheepdog that doesn't support it, we return 0(success) to upper layer. Cc: MORITA Kazuta