Thread (9 messages) read the whole thread 9 messages, 4 authors, 2013-08-23

Re: Samba strict allocate = yes stops btrfs compression working

From: Josef Bacik <hidden>
Date: 2013-08-22 18:47:13

On Thu, Aug 22, 2013 at 08:29:26PM +0200, Kai Krakow wrote:
Josef Bacik [off-list ref] schrieb:
quoted
Not sure what strict allocate = yes does, but I assume it probably does
fallocate() in which case yeah we aren't going to compress, we'll just
write
into the preallocated space.  We don't support compressed writes into
preallocated space ATM, and I'm not sure we ever will.  Thanks,
Good to know, this renders btrfs as efficient storage backend for Windows 
file shares pretty useless. Does this also happen with compress-force?
Yeah the check is done in the same function, basically it goes

if (prealloc)
	do prealloc
else if (compress && (!inode->no_compress || compress_force))
	do compress
else
	do normal cow
As a work-around one could write a cronjob that regularly defrags all files 
changed since the last run with -c option...
Yeah basically.  The other option is to just not do strict allocate = yes.  Now
if it's _not_ doing prealloc then there's probably a problem somewhere, but I
assume that is what its doing.  Thanks,

Josef
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help