All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nikolay Borisov <nborisov@suse.com>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: Add enospc_debug printing in metadata_reserve_bytes
Date: Tue, 6 Feb 2018 11:18:41 +0200	[thread overview]
Message-ID: <4317cffa-e7ef-6ded-dfd8-68ccfb84fe55@suse.com> (raw)
In-Reply-To: <b905db35-f6c6-2de3-f1fb-154d697cc747@gmx.com>



On  6.02.2018 03:29, Qu Wenruo wrote:
> 
> 
> On 2018年02月06日 00:20, Nikolay Borisov wrote:
>>
>>
>> On 15.12.2017 12:05, Nikolay Borisov wrote:
>>> Currently when enoscp_debug mount option is turned on we do not print
>>> any debug info in case metadata reservation failures happen. Fix this
>>> by adding the necessary hook in reserve_metadata_bytes.
>>>
>>> Signed-off-by: Nikolay Borisov <nborisov@suse.com>
> 
> Looks good.
> 
> Reviewed-by: Qu Wenruo <wqu@suse.com>

Yeah you already reviewed it back in December, I was bumping it to make
sure David won't miss it since it's a rather old patch :)

> 
> Thanks,
> Qu
> 
>>> ---
>>>  fs/btrfs/extent-tree.c | 7 ++++++-
>>>  1 file changed, 6 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
>>> index 4497f937e8fb..7a281fc97bc5 100644
>>> --- a/fs/btrfs/extent-tree.c
>>> +++ b/fs/btrfs/extent-tree.c
>>> @@ -5382,10 +5382,15 @@ static int reserve_metadata_bytes(struct btrfs_root *root,
>>>  		    !block_rsv_use_bytes(global_rsv, orig_bytes))
>>>  			ret = 0;
>>>  	}
>>> -	if (ret == -ENOSPC)
>>> +	if (ret == -ENOSPC) {
>>>  		trace_btrfs_space_reservation(fs_info, "space_info:enospc",
>>>  					      block_rsv->space_info->flags,
>>>  					      orig_bytes, 1);
>>> +
>>> +		if (btrfs_test_opt(fs_info, ENOSPC_DEBUG))
>>> +			dump_space_info(fs_info, block_rsv->space_info,
>>> +					orig_bytes, 0);
>>> +	}
>>>  	return ret;
>>>  }
>>>  
>>>
>>
>> Ping
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
> 

  reply	other threads:[~2018-02-06  9:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-15 10:05 [PATCH] btrfs: Add enospc_debug printing in metadata_reserve_bytes Nikolay Borisov
2017-12-15 11:36 ` Qu Wenruo
2017-12-15 11:41   ` Nikolay Borisov
2018-02-05 16:20 ` Nikolay Borisov
2018-02-06  1:29   ` Qu Wenruo
2018-02-06  9:18     ` Nikolay Borisov [this message]
2018-02-14 13:13       ` David Sterba

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=4317cffa-e7ef-6ded-dfd8-68ccfb84fe55@suse.com \
    --to=nborisov@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quwenruo.btrfs@gmx.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.