diff options
author | Yan <yanzheng@21cn.com> | 2008-02-15 10:40:50 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:04:00 -0400 |
commit | 39b5637f6f195852259004bb27b58e2dcf9fb378 (patch) | |
tree | 64a86c71b34fb16520a1d165b5007d814b1c1c4f /fs/btrfs/extent_io.c | |
parent | 9069218d448ea547dbad5f1cbd537e88d6519d66 (diff) | |
download | lwn-39b5637f6f195852259004bb27b58e2dcf9fb378.tar.gz lwn-39b5637f6f195852259004bb27b58e2dcf9fb378.zip |
Btrfs: Fix "no csum found for inode" issue.
A few codes were not properly updated for changes of extent map. This
may be the causes of "no csum found for inode" issue.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/extent_io.c')
-rw-r--r-- | fs/btrfs/extent_io.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index fcae999ab712..9262ab37a7cd 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -2417,12 +2417,13 @@ int try_release_extent_mapping(struct extent_map_tree *map, u64 end = start + PAGE_CACHE_SIZE - 1; u64 orig_start = start; int ret = 1; - if ((mask & __GFP_WAIT) && page->mapping->host->i_size > 16 * 1024 * 1024) { + u64 len; while (start <= end) { + len = end - start + 1; spin_lock(&map->lock); - em = lookup_extent_mapping(map, start, end); + em = lookup_extent_mapping(map, start, len); if (!em || IS_ERR(em)) { spin_unlock(&map->lock); break; |