Please revoke old submission using "osc request revoke"

Peter

> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Xin Zhong
> Sent: Thursday, March 24, 2011 3:57 PM
> To: [email protected]
> Subject: [meego-commits] 15146: Changes to Trunk:Testing/btrfs-progs
> 
> Hi,
> I have made the following changes to btrfs-progs in project Trunk:Testing.
> Please review and accept ASAP.
> 
> Thank You,
> Xin Zhong
> 
> [This message was auto-generated]
> 
> ---
> 
> Request #15146:
> 
>   submit:   home:zhongxin:branches:Trunk:Testing/btrfs-progs(r3)(cleanup) ->
> Trunk:Testing/btrfs-progs
> 
> 
> Message:
>     Add -u option to btrfs-debug-tree for updating uuid.
> 
> 
> State:   new          2011-03-24T00:56:48 zhongxin
> Comment: None
> 
> 
> 
> changes files:
> --------------
> 
> new:
> ----
>   btrfs-progs-update-uuid.patch
> 
> spec files:
> -----------
> --- btrfs-progs.spec
> +++ btrfs-progs.spec
> @@ -19,6 +19,7 @@
>  Patch1:     btrfs-progs-fix-labels.patch
>  Patch2:     btrfs-progs-install-fsck-symlink.patch
>  Patch3:     btrfs-progs-build-convert.patch
> +Patch4:     btrfs-progs-update-uuid.patch
>  BuildRequires:  pkgconfig(uuid)
>  BuildRequires:  pkgconfig(e2p)
>  BuildRequires:  pkgconfig(ext2fs)
> @@ -41,6 +42,8 @@
>  %patch2 -p1
>  # btrfs-progs-build-convert.patch
>  %patch3 -p1
> +# btrfs-progs-update-uuid.patch
> +%patch4 -p1
>  # >> setup
>  # << setup
> 
> 
> other changes:
> --------------
> 
> ++++++ btrfs-progs-update-uuid.patch (new)
> --- btrfs-progs-update-uuid.patch
> +++ btrfs-progs-update-uuid.patch
> +diff --git a/ctree.c b/ctree.c
> +index f70e10c..d5f1e99 100644
> +--- a/ctree.c
> ++++ b/ctree.c
> +@@ -625,13 +625,13 @@ static int check_leaf(struct btrfs_root *root, struct
> btrfs_path *path,
> +             btrfs_item_key_to_cpu(leaf, &cpukey, i + 1);
> +             btrfs_item_key(leaf, &leaf_key, i);
> +             if (comp_keys(&leaf_key, &cpukey) >= 0) {
> +-                    btrfs_print_leaf(root, leaf);
> ++                    btrfs_print_leaf(root, leaf, 0);
> +                     printk("slot %d offset bad key\n", i);
> +                     BUG_ON(1);
> +             }
> +             if (btrfs_item_offset_nr(leaf, i) !=
> +                     btrfs_item_end_nr(leaf, i + 1)) {
> +-                    btrfs_print_leaf(root, leaf);
> ++                    btrfs_print_leaf(root, leaf, 0);
> +                     printk("slot %d offset bad\n", i);
> +                     BUG_ON(1);
> +             }
> +@@ -639,7 +639,7 @@ static int check_leaf(struct btrfs_root *root, struct
> btrfs_path *path,
> +                     if (btrfs_item_offset_nr(leaf, i) +
> +                            btrfs_item_size_nr(leaf, i) !=
> +                            BTRFS_LEAF_DATA_SIZE(root)) {
> +-                            btrfs_print_leaf(root, leaf);
> ++                            btrfs_print_leaf(root, leaf, 0);
> +                             printk("slot %d first offset bad\n", i);
> +                             BUG_ON(1);
> +                     }
> +@@ -647,7 +647,7 @@ static int check_leaf(struct btrfs_root *root, struct
> btrfs_path *path,
> +     }
> +     if (nritems > 0) {
> +             if (btrfs_item_size_nr(leaf, nritems - 1) > 4096) {
> +-                            btrfs_print_leaf(root, leaf);
> ++                            btrfs_print_leaf(root, leaf, 0);
> +                             printk("slot %d bad size \n", nritems - 1);
> +                             BUG_ON(1);
> +             }
> +@@ -657,13 +657,13 @@ static int check_leaf(struct btrfs_root *root, struct
> btrfs_path *path,
> +             btrfs_item_key(leaf, &leaf_key, slot);
> +             btrfs_item_key_to_cpu(leaf, &cpukey, slot - 1);
> +             if (btrfs_comp_keys(&leaf_key, &cpukey) <= 0) {
> +-                    btrfs_print_leaf(root, leaf);
> ++                    btrfs_print_leaf(root, leaf, 0);
> +                     printk("slot %d offset bad key\n", slot);
> +                     BUG_ON(1);
> +             }
> +             if (btrfs_item_offset_nr(leaf, slot - 1) !=
> +                    btrfs_item_end_nr(leaf, slot)) {
> +-                    btrfs_print_leaf(root, leaf);
> ++                    btrfs_print_leaf(root, leaf, 0);
> +                     printk("slot %d offset bad\n", slot);
> +                     BUG_ON(1);
> +             }
> +@@ -674,7 +674,7 @@ static int check_leaf(struct btrfs_root *root, struct
> btrfs_path *path,
> +             BUG_ON(btrfs_comp_keys(&leaf_key, &cpukey) >= 0);
> +             if (btrfs_item_offset_nr(leaf, slot) !=
> +                     btrfs_item_end_nr(leaf, slot + 1)) {
> +-                    btrfs_print_leaf(root, leaf);
> ++                    btrfs_print_leaf(root, leaf, 0);
> +                     printk("slot %d offset bad\n", slot);
> +                     BUG_ON(1);
> +             }
> +@@ -2356,7 +2356,7 @@ split:
> +
> +     ret = 0;
> +     if (btrfs_leaf_free_space(root, leaf) < 0) {
> +-            btrfs_print_leaf(root, leaf);
> ++            btrfs_print_leaf(root, leaf, 0);
> +             BUG();
> +     }
> +     kfree(buf);
> +@@ -2456,7 +2456,7 @@ int btrfs_truncate_item(struct btrfs_trans_handle
> *trans,
> +
> +     ret = 0;
> +     if (btrfs_leaf_free_space(root, leaf) < 0) {
> +-            btrfs_print_leaf(root, leaf);
> ++            btrfs_print_leaf(root, leaf, 0);
> +             BUG();
> +     }
> +     return ret;
> +@@ -2484,7 +2484,7 @@ int btrfs_extend_item(struct btrfs_trans_handle
> *trans,
> +     data_end = leaf_data_end(root, leaf);
> +
> +     if (btrfs_leaf_free_space(root, leaf) < data_size) {
> +-            btrfs_print_leaf(root, leaf);
> ++            btrfs_print_leaf(root, leaf, 0);
> +             BUG();
> +     }
> +     slot = path->slots[0];
> +@@ -2492,7 +2492,7 @@ int btrfs_extend_item(struct btrfs_trans_handle
> *trans,
> +
> +     BUG_ON(slot < 0);
> +     if (slot >= nritems) {
> +-            btrfs_print_leaf(root, leaf);
> ++            btrfs_print_leaf(root, leaf, 0);
> +             printk("slot %d too large, nritems %d\n", slot, nritems);
> +             BUG_ON(1);
> +     }
> +@@ -2521,7 +2521,7 @@ int btrfs_extend_item(struct btrfs_trans_handle
> *trans,
> +
> +     ret = 0;
> +     if (btrfs_leaf_free_space(root, leaf) < 0) {
> +-            btrfs_print_leaf(root, leaf);
> ++            btrfs_print_leaf(root, leaf, 0);
> +             BUG();
> +     }
> +     return ret;
> +@@ -2572,7 +2572,7 @@ int btrfs_insert_empty_items(struct
> btrfs_trans_handle *trans,
> +     data_end = leaf_data_end(root, leaf);
> +
> +     if (btrfs_leaf_free_space(root, leaf) < total_size) {
> +-            btrfs_print_leaf(root, leaf);
> ++            btrfs_print_leaf(root, leaf, 0);
> +             printk("not enough freespace need %u have %d\n",
> +                    total_size, btrfs_leaf_free_space(root, leaf));
> +             BUG();
> +@@ -2586,7 +2586,7 @@ int btrfs_insert_empty_items(struct
> btrfs_trans_handle *trans,
> +             unsigned int old_data = btrfs_item_end_nr(leaf, slot);
> +
> +             if (old_data < data_end) {
> +-                    btrfs_print_leaf(root, leaf);
> ++                    btrfs_print_leaf(root, leaf, 0);
> +                     printk("slot %d old_data %d data_end %d\n",
> +                            slot, old_data, data_end);
> +                     BUG_ON(1);
> +@@ -2634,7 +2634,7 @@ int btrfs_insert_empty_items(struct
> btrfs_trans_handle *trans,
> +     }
> +
> +     if (btrfs_leaf_free_space(root, leaf) < 0) {
> +-            btrfs_print_leaf(root, leaf);
> ++            btrfs_print_leaf(root, leaf, 0);
> +             BUG();
> +     }
> +
> +diff --git a/debug-tree.c b/debug-tree.c
> +index 0525354..cf18e94 100644
> +--- a/debug-tree.c
> ++++ b/debug-tree.c
> +@@ -103,6 +103,8 @@ static void print_extents(struct btrfs_root *root,
> struct extent_buffer *eb)
> +     }
> + }
> +
> ++extern u8 new_fsid[BTRFS_FSID_SIZE];
> ++
> + int main(int ac, char **av)
> + {
> +     struct btrfs_root *root;
> +@@ -119,12 +121,13 @@ int main(int ac, char **av)
> +     int device_only = 0;
> +     u64 block_only = 0;
> +     struct btrfs_root *tree_root_scan;
> ++    int update_uuid = 0;
> +
> +     radix_tree_init();
> +
> +     while(1) {
> +             int c;
> +-            c = getopt(ac, av, "deb:");
> ++            c = getopt(ac, av, "deub:");
> +             if (c < 0)
> +                     break;
> +             switch(c) {
> +@@ -137,6 +140,9 @@ int main(int ac, char **av)
> +                     case 'b':
> +                             block_only = atoll(optarg);
> +                             break;
> ++                    case 'u':
> ++                            update_uuid = 1;
> ++                            break;
> +                     default:
> +                             print_usage();
> +             }
> +@@ -145,7 +151,10 @@ int main(int ac, char **av)
> +     if (ac != 1)
> +             print_usage();
> +
> +-    root = open_ctree(av[optind], 0, 0);
> ++    if (update_uuid)
> ++            uuid_generate(new_fsid);
> ++
> ++    root = open_ctree(av[optind], 0, update_uuid);
> +     if (!root) {
> +             fprintf(stderr, "unable to open %s\n", av[optind]);
> +             exit(1);
> +@@ -169,18 +178,18 @@ int main(int ac, char **av)
> +                     fprintf(stderr, "failed to read %llu\n", block_only);
> +                     return 0;
> +             }
> +-            btrfs_print_tree(root, leaf, 0);
> ++            btrfs_print_tree(root, leaf, 0, update_uuid);
> +             return 0;
> +     }
> +
> +     if (!extent_only) {
> +             printf("root tree\n");
> +             btrfs_print_tree(root->fs_info->tree_root,
> +-                             root->fs_info->tree_root->node, 1);
> (272 more lines skipped)
> 
> ++++++ btrfs-progs.yaml
> --- btrfs-progs.yaml
> +++ btrfs-progs.yaml
> @@ -13,6 +13,7 @@
>      - btrfs-progs-fix-labels.patch
>      - btrfs-progs-install-fsck-symlink.patch
>      - btrfs-progs-build-convert.patch
> +    - btrfs-progs-update-uuid.patch
> 
>  PkgConfigBR:
>      - uuid
> 
> _______________________________________________
> MeeGo-commits mailing list
> [email protected]
> http://lists.meego.com/listinfo/meego-commits
_______________________________________________
MeeGo-packaging mailing list
[email protected]
http://lists.meego.com/listinfo/meego-packaging

Reply via email to