On Tue, Jan 15 2008, Jens Axboe wrote:This works, but probably pretty suboptimal (should end the new journal in map_io_complete()?). And yes I know the >> 9 isn't correct, since the fs block size is larger. Just making sure that we always have enough blocks. Punting to Chris! diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c index 55e677d..e97181a 100644 --- a/fs/ext3/inode.c +++ b/fs/ext3/inode.c @@ -1002,11 +1002,25 @@ static struct extent_map *ext3_map_extent(struct address_space *mapping, gfp_t gfp_mask) { struct extent_map_tree *tree = &EXT3_I(mapping->host)->extent_tree; + handle_t *handle = NULL; + struct extent_map *ret; - return map_extent_get_block(tree, mapping, start, len, create, gfp_mask, + if (create) { + handle = ext3_journal_start(mapping->host, len >> 9); + if (IS_ERR(handle)) + return (struct extent_map *) handle; + } + + ret = map_extent_get_block(tree, mapping, start, len, create, gfp_mask, ext3_get_block); + if (handle) + ext3_journal_stop(handle); + + return ret; } + + /* * `handle' can be NULL if create is zero */ -- Jens Axboe - To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Linus Torvalds | Linux 2.6.27-rc5 |
| Greg Kroah-Hartman | [PATCH 007/196] Chinese: add translation of stable_kernel_rules.txt |
| Kamalesh Babulal | [Build Failure] 2.6.25-rc5-mm1 Build fails with allmodconfig probe_4drives undefined |
| Gabriel C | Re: Linus 2.6.23-rc1 |
| David Woodhouse | Re: [bug?] tg3: Failed to load firmware "tigon/tg3_tso.bin" |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| David Miller | [GIT]: Networking |
| Gerrit Renker | [PATCH 0/37] dccp: Feature negotiation - last call for comments |
git: | |
