would be really cool if a TRIM to the loopback device would do a 'hole punch' 
on the file

Remco


On Feb 26, 2013, at 7:25 AM, Suman C <schakr...@gmail.com> wrote:

> Thanks for the sparse file idea, I am actually using that solution
> already. I am not sure if its the best way, however.
> 
> Suman
> 
> On Mon, Feb 25, 2013 at 9:57 PM, Roman Mamedov <r...@romanrm.ru> wrote:
>> On Mon, 25 Feb 2013 21:35:08 -0800
>> Suman C <schakr...@gmail.com> wrote:
>> 
>>> Yes, zvol like feature where a btrfs subvolume like construct can be
>>> made available as a LUN/block device. This device can then be used by
>>> any application that wants a raw block device. iscsi is another
>>> obvious usecase. Having thin provisioning support would make it pretty
>>> awesome.
>> 
>> I think what you are missing is that btrfs is a filesystem, not a block 
>> device
>> management mechanism.
>> 
>> For your use case can simply create a snapshot and then make a sparse file
>> inside of it.
>> 
>>  btrfs sub create foobar
>>  dd if=/dev/zero of=foobar/100GB.img bs=1 count=1 seek=100G
>> 
>> If you need this to be a block device, use 'losetup' to make foobar/100GB.img
>> appear as one (/dev/loopX). But iSCSI/AoE/NBD can export files as well as 
>> block
>> devices, so this is not even necessary.
>> 
>> --
>> With respect,
>> Roman
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to