linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Josef Bacik <jbacik@fusionio.com>
To: Kai Krakow <hurikhan77+btrfs@gmail.com>
Cc: <linux-btrfs@vger.kernel.org>
Subject: Re: Samba strict allocate  = yes stops btrfs compression working
Date: Thu, 22 Aug 2013 14:47:10 -0400	[thread overview]
Message-ID: <20130822184710.GB29654@localhost.localdomain> (raw)
In-Reply-To: <6t1iea-qg7.ln1@hurikhan77.spdns.de>

On Thu, Aug 22, 2013 at 08:29:26PM +0200, Kai Krakow wrote:
> Josef Bacik <jbacik@fusionio.com> 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

  reply	other threads:[~2013-08-22 18:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-22  9:57 Samba strict allocate = yes stops btrfs compression working Mark Ridley
2013-08-22 14:07 ` Josef Bacik
2013-08-22 18:29   ` Kai Krakow
2013-08-22 18:47     ` Josef Bacik [this message]
2013-08-23  9:03     ` Mark Ridley
2013-08-23  8:01   ` Roger Binns
2013-08-23  8:20     ` Mark Ridley
2013-08-23 19:35       ` Roger Binns
     [not found]     ` <CE3CD861.3C3F5%mark@backupsystems. co.uk>
2013-08-23  9:08       ` Duncan
2013-08-23  9:14         ` Mark Ridley
2013-08-23 13:43           ` Clemens Eisserer
2013-08-23  9:09     ` Mark Ridley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130822184710.GB29654@localhost.localdomain \
    --to=jbacik@fusionio.com \
    --cc=hurikhan77+btrfs@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).