Re: [PATCH] btrfs: Add enospc_debug printing in metadata_reserve_bytes

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

 




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@xxxxxxxx>

Looks good.

Reviewed-by: Qu Wenruo <wqu@xxxxxxxx>

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@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

Attachment: signature.asc
Description: OpenPGP digital signature


[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