diff options
author | Chris Mason <chris.mason@oracle.com> | 2008-07-24 11:57:52 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:04:05 -0400 |
commit | 3eaa2885276fd6dac7b076a793932428b7168e74 (patch) | |
tree | b06382bec68bf1755597a74ac8225f3bcddda5e5 /fs/btrfs/ctree.h | |
parent | 64f26f745084872b916cd1bef6054e21b15c5784 (diff) |
Btrfs: Fix the defragmention code and the block relocation code for data=ordered
Before setting an extent to delalloc, the code needs to wait for
pending ordered extents.
Also, the relocation code needs to wait for ordered IO before scanning
the block group again. This is because the extents are not removed
until the IO for the new extents is finished
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r-- | fs/btrfs/ctree.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 8ecac2e77a43..6675e916ebcd 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h | |||
@@ -539,6 +539,13 @@ struct btrfs_fs_info { | |||
539 | atomic_t nr_async_submits; | 539 | atomic_t nr_async_submits; |
540 | 540 | ||
541 | /* | 541 | /* |
542 | * this is used by the balancing code to wait for all the pending | ||
543 | * ordered extents | ||
544 | */ | ||
545 | spinlock_t ordered_extent_lock; | ||
546 | struct list_head ordered_extents; | ||
547 | |||
548 | /* | ||
542 | * there is a pool of worker threads for checksumming during writes | 549 | * there is a pool of worker threads for checksumming during writes |
543 | * and a pool for checksumming after reads. This is because readers | 550 | * and a pool for checksumming after reads. This is because readers |
544 | * can run with FS locks held, and the writers may be waiting for | 551 | * can run with FS locks held, and the writers may be waiting for |