linux.kernel
Re: [Xen-devel] [PATCH 3/3] xen/blk[front|back]: Enhance discard support with secure erasing support.
I think we also should mark the vbd has discard_secure if we are
usingthe file backend,as if we punch a hole in the image, those blocks
are freed tofilesystem and hardly to getthem back, or maybe write
zeros to the range before we punch the hole is better?
On Mon, Oct 17, 2011 at 9:23 PM, Jan Beulich <JBeulich_at_suse.com> wrote:
>>>> On 11.10.11 at 22:57, Konrad Rzeszutek Wilk <konrad.wilk_at_oracle.com> wrote:
>> --- a/drivers/block/xen-blkfront.c
>> +++ b/drivers/block/xen-blkfront.c
>>...
>> _at__at_ -705,7 +711,7 _at__at_ static void blkif_free(struct blkfront_info *info, int suspend)
>> ?static void blkif_completion(struct blk_shadow *s)
>> ?{
>> ? ? ? int i;
>
> This function gets called for all types of requests, and hence must filter
> discard ones now that what would be nr_segments can be non-zero,
> e.g.
>
> ? ? ? ?if (s->req.operation == BLKIF_OP_DISCARD)
> ? ? ? ? ? ? ? ?return;
>
> Jan
>
>> - ? ? for (i = 0; i < s->req.nr_segments; i++)
>> + ? ? for (i = 0; i < s->req.u1.nr_segments; i++)
>> ? ? ? ? ? ? ? gnttab_end_foreign_access(s->req.u.rw.seg[i].gref, 0, 0UL);
>> ?}
>>
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo_at_vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Written by Li Dongyang
20/10/2011 5.20.02
Check some pics on this site!
25/05/2012 5.14.28