Re: [PATCH 2/2 v3] Btrfs: snapshot-aware defrag
From: Mitch Harder <hidden>
Date: 2012-10-04 19:40:28
On Thu, Oct 4, 2012 at 9:22 AM, Liu Bo [off-list ref] wrote:
On 10/03/2012 10:02 PM, Chris Mason wrote:quoted
On Tue, Sep 25, 2012 at 07:07:53PM -0600, Liu Bo wrote:quoted
On 09/26/2012 01:39 AM, Mitch Harder wrote:quoted
On Mon, Sep 17, 2012 at 4:58 AM, Liu Bo [off-list ref] wrote:quoted
This comes from one of btrfs's project ideas, As we defragment files, we break any sharing from other snapshots. The balancing code will preserve the sharing, and defrag needs to grow this as well. Now we're able to fill the blank with this patch, in which we make full use of backref walking stuff. Here is the basic idea, o set the writeback ranges started by defragment with flag EXTENT_DEFRAG o at endio, after we finish updating fs tree, we use backref walking to find all parents of the ranges and re-link them with the new COWed file layout by adding corresponding backrefs. Originally patch by Li Zefan [off-list ref] Signed-off-by: Liu Bo <redacted>I'm hitting the WARN_ON in record_extent_backrefs() indicating a problem with the return value from iterate_inodes_from_logical().Me too. It triggers reliably with mount -o autodefrag, and then crashes a in the next function ;) -chrisGood news, I'm starting hitting the crash (a NULL pointer crash) ;) thanks, liubo
I'm also starting to hit this crash while balancing a test partition. I guess this isn't surprising since both autodefrag and balancing make use of relocation.