Re: Samba strict allocate = yes stops btrfs compression working

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 22, 2013 at 08:29:26PM +0200, Kai Krakow wrote:
> Josef Bacik <jbacik@xxxxxxxxxxxx> schrieb:
> 
> > 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
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux