relocation.c (9785dbdf265ddc47d5c88267d89a97648c0dc14b) relocation.c (f248679e86fead40cc78e724c7181d6bec1a2046)
1/*
2 * Copyright (C) 2009 Oracle. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public
6 * License v2 as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,

--- 2935 unchanged lines hidden (view full) ---

2944 ret = setup_extent_mapping(inode, cluster->start - offset,
2945 cluster->end - offset, cluster->start);
2946 if (ret)
2947 goto out;
2948
2949 index = (cluster->start - offset) >> PAGE_CACHE_SHIFT;
2950 last_index = (cluster->end - offset) >> PAGE_CACHE_SHIFT;
2951 while (index <= last_index) {
1/*
2 * Copyright (C) 2009 Oracle. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public
6 * License v2 as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,

--- 2935 unchanged lines hidden (view full) ---

2944 ret = setup_extent_mapping(inode, cluster->start - offset,
2945 cluster->end - offset, cluster->start);
2946 if (ret)
2947 goto out;
2948
2949 index = (cluster->start - offset) >> PAGE_CACHE_SHIFT;
2950 last_index = (cluster->end - offset) >> PAGE_CACHE_SHIFT;
2951 while (index <= last_index) {
2952 mutex_lock(&inode->i_mutex);
2953 ret = btrfs_delalloc_reserve_metadata(inode, PAGE_CACHE_SIZE);
2952 ret = btrfs_delalloc_reserve_metadata(inode, PAGE_CACHE_SIZE);
2954 mutex_unlock(&inode->i_mutex);
2955 if (ret)
2956 goto out;
2957
2958 page = find_lock_page(inode->i_mapping, index);
2959 if (!page) {
2960 page_cache_sync_readahead(inode->i_mapping,
2961 ra, NULL, index,
2962 last_index + 1 - index);

--- 1456 unchanged lines hidden ---
2953 if (ret)
2954 goto out;
2955
2956 page = find_lock_page(inode->i_mapping, index);
2957 if (!page) {
2958 page_cache_sync_readahead(inode->i_mapping,
2959 ra, NULL, index,
2960 last_index + 1 - index);

--- 1456 unchanged lines hidden ---