Re: [RFC PATCH] btrfs: Fix slight df misreporting when listing mixed block groups fs

2018-01-10 Thread Qu Wenruo
On 2018年01月10日 23:33, Nikolay Borisov wrote: > > > On 10.01.2018 03:30, Qu Wenruo wrote: >> That system chunk can be relocated by balance, and in that case new >> chunk may start beyond 1M. >> >> So the most reliable method would be manually checking the the first >> device extent of this devic

Re: [RFC PATCH] btrfs: Fix slight df misreporting when listing mixed block groups fs

2018-01-10 Thread David Sterba
On Wed, Jan 10, 2018 at 09:30:06AM +0800, Qu Wenruo wrote: > > > On 2018年01月10日 00:04, Nikolay Borisov wrote: > > Currently when df (resp. statfs) is executed on a btrfs instance the > > free space is calculated as the freespace of the block groups + > > any unallocated space on the devices, cons

Re: [RFC PATCH] btrfs: Fix slight df misreporting when listing mixed block groups fs

2018-01-10 Thread Nikolay Borisov
On 10.01.2018 03:30, Qu Wenruo wrote: > That system chunk can be relocated by balance, and in that case new > chunk may start beyond 1M. > > So the most reliable method would be manually checking the the first > device extent of this device, and to determine if we should minus that 1M. > > If t

Re: [RFC PATCH] btrfs: Fix slight df misreporting when listing mixed block groups fs

2018-01-09 Thread Qu Wenruo
On 2018年01月10日 09:30, Qu Wenruo wrote: > > > On 2018年01月10日 00:04, Nikolay Borisov wrote: >> Currently when df (resp. statfs) is executed on a btrfs instance the >> free space is calculated as the freespace of the block groups + >> any unallocated space on the devices, constituting this filesys

Re: [RFC PATCH] btrfs: Fix slight df misreporting when listing mixed block groups fs

2018-01-09 Thread Qu Wenruo
On 2018年01月10日 00:04, Nikolay Borisov wrote: > Currently when df (resp. statfs) is executed on a btrfs instance the > free space is calculated as the freespace of the block groups + > any unallocated space on the devices, constituting this filesystem. > There is a catch, however, in that the unal

Re: [RFC PATCH] btrfs: Fix slight df misreporting when listing mixed block groups fs

2018-01-09 Thread Josef Bacik
On Tue, Jan 09, 2018 at 06:04:05PM +0200, Nikolay Borisov wrote: > Currently when df (resp. statfs) is executed on a btrfs instance the > free space is calculated as the freespace of the block groups + > any unallocated space on the devices, constituting this filesystem. > There is a catch, however

[RFC PATCH] btrfs: Fix slight df misreporting when listing mixed block groups fs

2018-01-09 Thread Nikolay Borisov
Currently when df (resp. statfs) is executed on a btrfs instance the free space is calculated as the freespace of the block groups + any unallocated space on the devices, constituting this filesystem. There is a catch, however, in that the unallocated space from the devices has 1 mb subtracted from