qgroup.c (b006b2e4f96a21958164ebf37e53c555d9e4fb2f) | qgroup.c (c1c9ff7c94e83fae89a742df74db51156869bad5) |
---|---|
1/* 2 * Copyright (C) 2011 STRATO. 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, --- 384 unchanged lines hidden (view full) --- 393 goto next2; 394 } 395 396 ret = add_relation_rb(fs_info, found_key.objectid, 397 found_key.offset); 398 if (ret == -ENOENT) { 399 printk(KERN_WARNING 400 "btrfs: orphan qgroup relation 0x%llx->0x%llx\n", | 1/* 2 * Copyright (C) 2011 STRATO. 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, --- 384 unchanged lines hidden (view full) --- 393 goto next2; 394 } 395 396 ret = add_relation_rb(fs_info, found_key.objectid, 397 found_key.offset); 398 if (ret == -ENOENT) { 399 printk(KERN_WARNING 400 "btrfs: orphan qgroup relation 0x%llx->0x%llx\n", |
401 (unsigned long long)found_key.objectid, 402 (unsigned long long)found_key.offset); | 401 found_key.objectid, found_key.offset); |
403 ret = 0; /* ignore the error */ 404 } 405 if (ret) 406 goto out; 407next2: 408 ret = btrfs_next_item(quota_root, path); 409 if (ret < 0) 410 goto out; --- 747 unchanged lines hidden (view full) --- 1158 } 1159 ret = update_qgroup_limit_item(trans, quota_root, qgroupid, 1160 limit->flags, limit->max_rfer, 1161 limit->max_excl, limit->rsv_rfer, 1162 limit->rsv_excl); 1163 if (ret) { 1164 fs_info->qgroup_flags |= BTRFS_QGROUP_STATUS_FLAG_INCONSISTENT; 1165 printk(KERN_INFO "unable to update quota limit for %llu\n", | 402 ret = 0; /* ignore the error */ 403 } 404 if (ret) 405 goto out; 406next2: 407 ret = btrfs_next_item(quota_root, path); 408 if (ret < 0) 409 goto out; --- 747 unchanged lines hidden (view full) --- 1157 } 1158 ret = update_qgroup_limit_item(trans, quota_root, qgroupid, 1159 limit->flags, limit->max_rfer, 1160 limit->max_excl, limit->rsv_rfer, 1161 limit->rsv_excl); 1162 if (ret) { 1163 fs_info->qgroup_flags |= BTRFS_QGROUP_STATUS_FLAG_INCONSISTENT; 1164 printk(KERN_INFO "unable to update quota limit for %llu\n", |
1166 (unsigned long long)qgroupid); | 1165 qgroupid); |
1167 } 1168 1169 spin_lock(&fs_info->qgroup_lock); 1170 qgroup->lim_flags = limit->flags; 1171 qgroup->max_rfer = limit->max_rfer; 1172 qgroup->max_excl = limit->max_excl; 1173 qgroup->rsv_rfer = limit->rsv_rfer; 1174 qgroup->rsv_excl = limit->rsv_excl; --- 693 unchanged lines hidden (view full) --- 1868 1869 path->leave_spinning = 1; 1870 mutex_lock(&fs_info->qgroup_rescan_lock); 1871 ret = btrfs_search_slot_for_read(fs_info->extent_root, 1872 &fs_info->qgroup_rescan_progress, 1873 path, 1, 0); 1874 1875 pr_debug("current progress key (%llu %u %llu), search_slot ret %d\n", | 1166 } 1167 1168 spin_lock(&fs_info->qgroup_lock); 1169 qgroup->lim_flags = limit->flags; 1170 qgroup->max_rfer = limit->max_rfer; 1171 qgroup->max_excl = limit->max_excl; 1172 qgroup->rsv_rfer = limit->rsv_rfer; 1173 qgroup->rsv_excl = limit->rsv_excl; --- 693 unchanged lines hidden (view full) --- 1867 1868 path->leave_spinning = 1; 1869 mutex_lock(&fs_info->qgroup_rescan_lock); 1870 ret = btrfs_search_slot_for_read(fs_info->extent_root, 1871 &fs_info->qgroup_rescan_progress, 1872 path, 1, 0); 1873 1874 pr_debug("current progress key (%llu %u %llu), search_slot ret %d\n", |
1876 (unsigned long long)fs_info->qgroup_rescan_progress.objectid, | 1875 fs_info->qgroup_rescan_progress.objectid, |
1877 fs_info->qgroup_rescan_progress.type, | 1876 fs_info->qgroup_rescan_progress.type, |
1878 (unsigned long long)fs_info->qgroup_rescan_progress.offset, 1879 ret); | 1877 fs_info->qgroup_rescan_progress.offset, ret); |
1880 1881 if (ret) { 1882 /* 1883 * The rescan is about to end, we will not be scanning any 1884 * further blocks. We cannot unset the RESCAN flag here, because 1885 * we want to commit the transaction if everything went well. 1886 * To make the live accounting work in this phase, we set our 1887 * scan progress pointer such that every real extent objectid --- 307 unchanged lines hidden --- | 1878 1879 if (ret) { 1880 /* 1881 * The rescan is about to end, we will not be scanning any 1882 * further blocks. We cannot unset the RESCAN flag here, because 1883 * we want to commit the transaction if everything went well. 1884 * To make the live accounting work in this phase, we set our 1885 * scan progress pointer such that every real extent objectid --- 307 unchanged lines hidden --- |