From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:12899 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752984AbaBJSla (ORCPT ); Mon, 10 Feb 2014 13:41:30 -0500 Message-ID: <52F91D53.5060902@fb.com> Date: Mon, 10 Feb 2014 13:41:23 -0500 From: Josef Bacik MIME-Version: 1.0 To: cwillu CC: Hugo Mills , "lin >> linux-btrfs@vger.kernel.org" Subject: Re: What to do about df and btrfs fi df References: <52F9014F.6070901@fb.com> <20140210170606.GK6490@carfax.org.uk> <52F91A4A.4080807@fb.com> In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Sender: linux-btrfs-owner@vger.kernel.org List-ID: On 02/10/2014 01:36 PM, cwillu wrote: > IMO, used should definitely include metadata, especially given that we > inline small files. > > I can convince myself both that this implies that we should roll it > into b_avail, and that we should go the other way and only report the > actual used number for metadata as well, so I might just plead > insanity here. > I could be convinced to do this. So we have total: (total disk bytes) / (raid multiplier) used: (total used in data block groups) + (total used in metadata block groups) avail: total - (total used in data block groups + total metadata block groups) That seems like the simplest to code up. Then we can argue about whether to use the total metadata size or just the used metadata size for b_avail. Seem reasonable? Josef