Re: [PATCH 1/2] btrfs-progs: fsck: Add support to clear v1 free space cache.

2016-10-26 Thread David Sterba
On Wed, Oct 26, 2016 at 09:07:25AM +0800, Qu Wenruo wrote: > At 10/25/2016 10:09 PM, David Sterba wrote: > > On Thu, Oct 13, 2016 at 05:22:26PM +0800, Qu Wenruo wrote: > >> Kernel clear_cache mount option will only rebuilt free space cache if > >> used space of that chunk has changed. > >> > >> So

Re: [PATCH 1/2] btrfs-progs: fsck: Add support to clear v1 free space cache.

2016-10-25 Thread Qu Wenruo
At 10/25/2016 10:09 PM, David Sterba wrote: On Thu, Oct 13, 2016 at 05:22:26PM +0800, Qu Wenruo wrote: Kernel clear_cache mount option will only rebuilt free space cache if used space of that chunk has changed. So it won't ensure any corrupted free space cache get cleared. So add a new

Re: [PATCH 1/2] btrfs-progs: fsck: Add support to clear v1 free space cache.

2016-10-25 Thread David Sterba
On Thu, Oct 13, 2016 at 05:22:26PM +0800, Qu Wenruo wrote: > Kernel clear_cache mount option will only rebuilt free space cache if > used space of that chunk has changed. > > So it won't ensure any corrupted free space cache get cleared. > > So add a new option "--clear-space-cache v1|v2" to

Re: [PATCH 1/2] btrfs-progs: fsck: Add support to clear v1 free space cache.

2016-10-24 Thread David Sterba
On Thu, Oct 20, 2016 at 09:04:23AM +0800, Qu Wenruo wrote: > >> + /* Clear all free space cache inodes and its extent data */ > >> + while (1) { > >> + bg_cache = btrfs_lookup_first_block_group(fs_info, current); > >> + if (!bg_cache) > >> + break; > >> +

Re: [PATCH 1/2] btrfs-progs: fsck: Add support to clear v1 free space cache.

2016-10-19 Thread Qu Wenruo
At 10/19/2016 11:13 PM, David Sterba wrote: On Thu, Oct 13, 2016 at 05:22:26PM +0800, Qu Wenruo wrote: Kernel clear_cache mount option will only rebuilt free space cache if used space of that chunk has changed. So it won't ensure any corrupted free space cache get cleared. So add a new

Re: [PATCH 1/2] btrfs-progs: fsck: Add support to clear v1 free space cache.

2016-10-19 Thread David Sterba
On Thu, Oct 13, 2016 at 05:22:26PM +0800, Qu Wenruo wrote: > Kernel clear_cache mount option will only rebuilt free space cache if > used space of that chunk has changed. > > So it won't ensure any corrupted free space cache get cleared. > > So add a new option "--clear-space-cache v1|v2" to

Re: [PATCH 1/2] btrfs-progs: fsck: Add support to clear v1 free space cache.

2016-10-13 Thread Qu Wenruo
At 10/14/2016 01:44 AM, Omar Sandoval wrote: On Thu, Oct 13, 2016 at 05:22:26PM +0800, Qu Wenruo wrote: Kernel clear_cache mount option will only rebuilt free space cache if used space of that chunk has changed. So it won't ensure any corrupted free space cache get cleared. So add a new

Re: [PATCH 1/2] btrfs-progs: fsck: Add support to clear v1 free space cache.

2016-10-13 Thread Omar Sandoval
On Thu, Oct 13, 2016 at 05:22:26PM +0800, Qu Wenruo wrote: > Kernel clear_cache mount option will only rebuilt free space cache if > used space of that chunk has changed. > > So it won't ensure any corrupted free space cache get cleared. > > So add a new option "--clear-space-cache v1|v2" to

[PATCH 1/2] btrfs-progs: fsck: Add support to clear v1 free space cache.

2016-10-13 Thread Qu Wenruo
Kernel clear_cache mount option will only rebuilt free space cache if used space of that chunk has changed. So it won't ensure any corrupted free space cache get cleared. So add a new option "--clear-space-cache v1|v2" to btrfsck, to completely wipe out free space cache. So kernel won't complain