diff options
author | Olof Johansson <olof@lixom.net> | 2014-09-24 14:20:48 -0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2014-09-24 14:21:01 -0400 |
commit | 28fd837204236cf5b5533525e5b53c5176fa97a3 (patch) | |
tree | ac7dcad925950bc0bb53c5a55cb199e31e7aaee0 /fs/btrfs/tree-log.c | |
parent | c82eb464879dd0ecbe0c4cb1b80ac4e82b634872 (diff) | |
parent | 64d14a31d5410ea34641c41795e0ba222bda740c (diff) |
Merge tag 'imx-cleanup-3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/cleanup
Merge "ARM: imx: cleanup for 3.18" from Shawn Guo:
The i.MX cleanup for 3.18:
- Reomve a few i.MX27 and i.MX1 board files
- Remove imx_scu_standby_enable() since core code handles scu
standby now
- Remove unnecessary iomux declaration
- Remove useless sound card property from vf610-twr dts
* tag 'imx-cleanup-3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
ARM: imx: Remove mach-mxt_td60 board file
ARM: i.MX: Remove i.MX1 ADS board support
ARM: dts: vf610-twr: remove useless property for sound card.
ARM: imx: remove imx_scu_standby_enable()
ARM: i.MX: Remove Phytec i.MX27 PCM038/PCM970 board files
ARM: i.MX: Remove mach-cpuimx27sd board file
ARM: imx: iomux: Do not export symbol without public declaration
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'fs/btrfs/tree-log.c')
-rw-r--r-- | fs/btrfs/tree-log.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 9e1f2cd5e67a..7e0e6e3029dd 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c | |||
@@ -3298,7 +3298,7 @@ static noinline int copy_items(struct btrfs_trans_handle *trans, | |||
3298 | struct list_head ordered_sums; | 3298 | struct list_head ordered_sums; |
3299 | int skip_csum = BTRFS_I(inode)->flags & BTRFS_INODE_NODATASUM; | 3299 | int skip_csum = BTRFS_I(inode)->flags & BTRFS_INODE_NODATASUM; |
3300 | bool has_extents = false; | 3300 | bool has_extents = false; |
3301 | bool need_find_last_extent = (*last_extent == 0); | 3301 | bool need_find_last_extent = true; |
3302 | bool done = false; | 3302 | bool done = false; |
3303 | 3303 | ||
3304 | INIT_LIST_HEAD(&ordered_sums); | 3304 | INIT_LIST_HEAD(&ordered_sums); |
@@ -3352,8 +3352,7 @@ static noinline int copy_items(struct btrfs_trans_handle *trans, | |||
3352 | */ | 3352 | */ |
3353 | if (ins_keys[i].type == BTRFS_EXTENT_DATA_KEY) { | 3353 | if (ins_keys[i].type == BTRFS_EXTENT_DATA_KEY) { |
3354 | has_extents = true; | 3354 | has_extents = true; |
3355 | if (need_find_last_extent && | 3355 | if (first_key.objectid == (u64)-1) |
3356 | first_key.objectid == (u64)-1) | ||
3357 | first_key = ins_keys[i]; | 3356 | first_key = ins_keys[i]; |
3358 | } else { | 3357 | } else { |
3359 | need_find_last_extent = false; | 3358 | need_find_last_extent = false; |
@@ -3427,6 +3426,16 @@ static noinline int copy_items(struct btrfs_trans_handle *trans, | |||
3427 | if (!has_extents) | 3426 | if (!has_extents) |
3428 | return ret; | 3427 | return ret; |
3429 | 3428 | ||
3429 | if (need_find_last_extent && *last_extent == first_key.offset) { | ||
3430 | /* | ||
3431 | * We don't have any leafs between our current one and the one | ||
3432 | * we processed before that can have file extent items for our | ||
3433 | * inode (and have a generation number smaller than our current | ||
3434 | * transaction id). | ||
3435 | */ | ||
3436 | need_find_last_extent = false; | ||
3437 | } | ||
3438 | |||
3430 | /* | 3439 | /* |
3431 | * Because we use btrfs_search_forward we could skip leaves that were | 3440 | * Because we use btrfs_search_forward we could skip leaves that were |
3432 | * not modified and then assume *last_extent is valid when it really | 3441 | * not modified and then assume *last_extent is valid when it really |
@@ -3537,7 +3546,7 @@ fill_holes: | |||
3537 | 0, 0); | 3546 | 0, 0); |
3538 | if (ret) | 3547 | if (ret) |
3539 | break; | 3548 | break; |
3540 | *last_extent = offset + len; | 3549 | *last_extent = extent_end; |
3541 | } | 3550 | } |
3542 | /* | 3551 | /* |
3543 | * Need to let the callers know we dropped the path so they should | 3552 | * Need to let the callers know we dropped the path so they should |