Skip to contentSkip to conversation

btrfs: missing initialization while adding extent

RFC PATCH In review Ingo Oeser 2 participants 2 messages Jan 13, 2009 – Jan 16, 2009 Btrfs file system

lore
Share & tools
lore

Ingo Oeser

author
#0 lore raw

RFC PATCH 1/1 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 :-)

---
 fs/btrfs/disk-io.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
fs/btrfs/disk-io.c +1 -0
index 81a3138..25a0d15 100644
@@ -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,
Signature · 1 line
1.5.6.3
#1 lore raw
Quoted 3 lines · Ingo Oeser

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