2009-01-13 21:40:35

by Ingo Oeser

[permalink] [raw]
Subject: [RFC][PATCH] btrfs: missing initialization while adding extent

If we race while adding an extent and successful look it
of afterwards, we don't set the em->bdev. Now we do :-)


Signed-off-by: Ingo Oeser <[email protected]>
---
fs/btrfs/disk-io.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 81a3138..25a0d15 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -118,6 +118,7 @@ static struct extent_map *btree_get_extent(struct inode *inode,
free_extent_map(em);
em = lookup_extent_mapping(em_tree, start, len);
if (em) {
+ em->bdev = BTRFS_I(inode)->root->fs_info->fs_devices->latest_bdev;
ret = 0;
} else {
em = lookup_extent_mapping(em_tree, failed_start,
--
1.5.6.3


2009-01-16 15:21:29

by Chris Mason

[permalink] [raw]
Subject: Re: [RFC][PATCH] btrfs: missing initialization while adding extent

On Tue, 2009-01-13 at 22:41 +0100, Ingo Oeser wrote:
> If we race while adding an extent and successful look it
> of afterwards, we don't set the em->bdev. Now we do :-)
>

Thanks, queued up.

-chris