linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Josef Bacik <josef@redhat.com>
To: Arne Jansen <sensille@gmx.net>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] Btrfs: don't reserve metadata when we're using the delalloc reserve
Date: Wed, 13 Apr 2011 12:41:54 -0400	[thread overview]
Message-ID: <4DA5D252.5070103@redhat.com> (raw)
In-Reply-To: <4DA5D081.4070108@gmx.net>

On 04/13/2011 12:34 PM, Arne Jansen wrote:
> On 13.04.2011 18:06, Josef Bacik wrote:
>> There are a bunch of places where we do btrfs_join_transaction(root, 1), but
>> really we set the block_rsv to the delalloc reserve because our metadata was
>> reserved at delalloc time.  This means we don't need to reserve space at all,
>> and can just join the transaction and go.  This patch also fixes a few places
>> where we weren't actually setting the block_rsv to the delalloc reserve.
>> Thanks,
>>
>> Signed-off-by: Josef Bacik<josef@redhat.com>
>> ---
>>   fs/btrfs/inode.c |   27 +++++++++++++++++----------
>>   1 files changed, 17 insertions(+), 10 deletions(-)
>>
>> diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
>> index c4b914e..e9bda50 100644
>> --- a/fs/btrfs/inode.c
>> +++ b/fs/btrfs/inode.c
>> @@ -420,7 +420,7 @@ again:
>>   		}
>>   	}
>>   	if (start == 0) {
>> -		trans = btrfs_join_transaction(root, 1);
>> +		trans = btrfs_join_transaction(root, 0);
>
> btrfs_join_transaction ignores the num_blocks parameter, so this
> shouldn't change anything. Maybe it's cleaner to just eradicate
> the parameter.
>

Balls I forgot about that, though we should still be using the delalloc 
block reserve in the places that I put it.  I'll just fix that up.  Thanks,

Josef

      reply	other threads:[~2011-04-13 16:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-13 16:06 [PATCH] Btrfs: don't reserve metadata when we're using the delalloc reserve Josef Bacik
2011-04-13 16:34 ` Arne Jansen
2011-04-13 16:41   ` Josef Bacik [this message]

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=4DA5D252.5070103@redhat.com \
    --to=josef@redhat.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=sensille@gmx.net \
    /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).