Re: [PATCH v2] btrfs: Use btrfs_mark_bg_unused() to replace open code

2018-07-16 Thread David Sterba
On Sun, May 27, 2018 at 09:25:25AM +0800, Qu Wenruo wrote: > > > On 2018年05月22日 20:14, David Sterba wrote: > > On Tue, May 22, 2018 at 04:43:47PM +0800, Qu Wenruo wrote: > >> Introduce a small helper, btrfs_mark_bg_unused(), to accquire needed > >> locks and add a block group to unused_bgs list.

Re: [PATCH v2] btrfs: Use btrfs_mark_bg_unused() to replace open code

2018-05-26 Thread Qu Wenruo
On 2018年05月22日 20:14, David Sterba wrote: > On Tue, May 22, 2018 at 04:43:47PM +0800, Qu Wenruo wrote: >> Introduce a small helper, btrfs_mark_bg_unused(), to accquire needed >> locks and add a block group to unused_bgs list. > > The helper is nice but hides that there's a reference taken on

Re: [PATCH v2] btrfs: Use btrfs_mark_bg_unused() to replace open code

2018-05-22 Thread David Sterba
On Tue, May 22, 2018 at 04:43:47PM +0800, Qu Wenruo wrote: > Introduce a small helper, btrfs_mark_bg_unused(), to accquire needed > locks and add a block group to unused_bgs list. The helper is nice but hides that there's a reference taken on the 'bg'. This would be good to add at least to the

Re: [PATCH v2] btrfs: Use btrfs_mark_bg_unused() to replace open code

2018-05-22 Thread Nikolay Borisov
On 22.05.2018 11:43, Qu Wenruo wrote: > Introduce a small helper, btrfs_mark_bg_unused(), to accquire needed > locks and add a block group to unused_bgs list. > > No functional modification, and only 3 callers are involved.> > Signed-off-by: Qu Wenruo Reviewed-by: Nikolay

[PATCH v2] btrfs: Use btrfs_mark_bg_unused() to replace open code

2018-05-22 Thread Qu Wenruo
Introduce a small helper, btrfs_mark_bg_unused(), to accquire needed locks and add a block group to unused_bgs list. No functional modification, and only 3 callers are involved. Signed-off-by: Qu Wenruo --- This patch should provide the basis for later block group auto-removal to