transaction.c (70f801754728017ebc909d603c69255dc1e6f06f) | transaction.c (c1c9ff7c94e83fae89a742df74db51156869bad5) |
---|---|
1/* 2 * Copyright (C) 2007 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, --- 1934 unchanged lines hidden (view full) --- 1943 spin_unlock(&fs_info->trans_lock); 1944 return 0; 1945 } 1946 root = list_first_entry(&fs_info->dead_roots, 1947 struct btrfs_root, root_list); 1948 list_del_init(&root->root_list); 1949 spin_unlock(&fs_info->trans_lock); 1950 | 1/* 2 * Copyright (C) 2007 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, --- 1934 unchanged lines hidden (view full) --- 1943 spin_unlock(&fs_info->trans_lock); 1944 return 0; 1945 } 1946 root = list_first_entry(&fs_info->dead_roots, 1947 struct btrfs_root, root_list); 1948 list_del_init(&root->root_list); 1949 spin_unlock(&fs_info->trans_lock); 1950 |
1951 pr_debug("btrfs: cleaner removing %llu\n", 1952 (unsigned long long)root->objectid); | 1951 pr_debug("btrfs: cleaner removing %llu\n", root->objectid); |
1953 1954 btrfs_kill_all_delayed_nodes(root); 1955 1956 if (btrfs_header_backref_rev(root->node) < 1957 BTRFS_MIXED_BACKREF_REV) 1958 ret = btrfs_drop_snapshot(root, NULL, 0, 0); 1959 else 1960 ret = btrfs_drop_snapshot(root, NULL, 1, 0); 1961 /* 1962 * If we encounter a transaction abort during snapshot cleaning, we 1963 * don't want to crash here 1964 */ 1965 return (ret < 0) ? 0 : 1; 1966} | 1952 1953 btrfs_kill_all_delayed_nodes(root); 1954 1955 if (btrfs_header_backref_rev(root->node) < 1956 BTRFS_MIXED_BACKREF_REV) 1957 ret = btrfs_drop_snapshot(root, NULL, 0, 0); 1958 else 1959 ret = btrfs_drop_snapshot(root, NULL, 1, 0); 1960 /* 1961 * If we encounter a transaction abort during snapshot cleaning, we 1962 * don't want to crash here 1963 */ 1964 return (ret < 0) ? 0 : 1; 1965} |