On 09/25/2015 08:30 AM, Holger Hoffstätte wrote:
Followup from my observation wrt. "Btrfs: change how we wait for
pending ordered extents" and balance sitting idle:
On Thu, Sep 24, 2015 at 4:47 PM, Josef Bacik <jbacik@xxxxxx> wrote:
I want to set some per transaction flags, so instead of adding yet another int
lets just convert the current two int indicators to flags and add a flags field
for future use. Thanks,
..snip..
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index ff64689..3f5a781 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -1399,7 +1399,7 @@ again:
btrfs_error(root->fs_info, ret,
"Failed to remove dev extent item");
} else {
- trans->transaction->have_free_bgs = 1;
+ set_bit(BTRFS_TRANS_DIRTY_BG_RUN, &trans->transaction->flags);
Judging from the rest of the code transformation TRANS_DIRTY_BG_RUN
seems like the wrong bit to set here. A quick test with
set_bit(BTRFS_TRANS_HAVE_FREE_BGS) confirms that it fixes the balance
delays.
Haha oops, thanks for catching that, I'll fix it up locally and send out
an updated one in a bit.
Josef
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html