enable btrfs images
cover enable btrfs images
From: Nitin A Kamble <[email protected]>
These patches enable the btrfs image support in the poky tree. Other than kernel parts all the parts are ready here. linux-yocto-2.6.37 kernel need some work to get latest btrfs working, and that part will be sent separately.
The following changes since commit 2163461ec94528ecf046a04edc5db3d2dd3a6b8b:
systemtap: remove non-core COMPATIBLE_MACHINES (2011-06-16 22:14:06 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib nitin/btrfs
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=nitin/btrfs
Nitin A Kamble (6):
btrfs-tools: new recipe for tools to operate on btrfs images image-types.bbclass: get the image size in the whole number image_types.bbclass: enable btrfs as one of the image type qemu machine: enable btrfs as one of the supported filesystem
base-files: add btrfs to /etc/filesystems scripts/runqemu: enable btrfs
meta/classes/image_types.bbclass | 9 +- meta/conf/machine/include/qemu.inc | 2 +- .../recipes-core/base-files/base-files/filesystems | 1 + meta/recipes-core/base-files/base-files_3.0.14.bb | 2 +- .../btrfs-tools/btrfs-tools/debian/01-labels.patch | 29 + .../btrfs-tools/btrfs-tools/debian/02-ftbfs.patch | 125 +++ .../btrfs-tools/btrfs-tools/debian/03-glibc.patch | 16 + .../btrfs-tools/btrfs-tools/fix_use_of_gcc.patch | 84 ++ .../btrfs-tools/btrfs-tools/mkfs-xin-fixes.patch | 183 ++++ ...g-devices-so-degraded-filesystems-can-be-.patch | 64 ++ ...-Check-for-RAID10-in-set_avail_alloc_bits.patch | 35 + ...t-the-root-generation-in-btrfs-debug-tree.patch | 33 + ...low-partial-FS-opens-for-btrfsck-scanning.patch | 253 +++++ .../0005-Temporary-debugging-for-dragonn.patch | 75 ++ ...-add-a-btrfs-select-super-command-to-over.patch | 170 +++ ...gs-use-safe-string-manipulation-functions.patch | 152 +++ ...0003-Btrfs-progs-utils-Informative-errors.patch | 37 + ...-page-to-new-defragment-command-interface.patch | 99 ++ ...prove-error-handling-in-the-btrfs-command.patch | 510 +++++++++ ...progs-update-super-fields-for-space-cache.patch | 57 + ...-add-support-for-mixed-data-metadata-bloc.patch | 403 +++++++ .../upstream-tmp/0008-Update-for-lzo-support.patch | 203 ++++ ...pdate-clean-up-btrfs-help-and-man-page-V2.patch | 272 +++++ ...0-Deprecate-btrfsctl-btrfs-show-btrfs-vol.patch | 152 +++ ...11-Add-the-btrfs-filesystem-label-command.patch | 390 +++++++ ...-Update-man-page-for-mixed-data-metadata-.patch | 42 + ...-Add-new-feature-to-mkfs.btrfs-to-make-fi.patch | 1108 ++++++++++++++++++++ ...-fix-wrong-extent-buffer-size-when-readin.patch | 33 + ...5-btrfs-progs-add-discard-support-to-mkfs.patch | 110 ++ .../btrfs-tools/btrfs-tools_git.bb | 52 + scripts/runqemu | 6 +- scripts/runqemu-internal | 12 +- 32 files changed, 4707 insertions(+), 12 deletions(-) create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/debian/01-labels.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/debian/02-ftbfs.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/debian/03-glibc.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/fix_use_of_gcc.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/mkfs-xin-fixes.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-for-dragonn/0001-Fill-missing-devices-so-degraded-filesystems-can-be-.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-for-dragonn/0002-Check-for-RAID10-in-set_avail_alloc_bits.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-for-dragonn/0003-Print-the-root-generation-in-btrfs-debug-tree.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-for-dragonn/0004-Allow-partial-FS-opens-for-btrfsck-scanning.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-for-dragonn/0005-Temporary-debugging-for-dragonn.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-tmp/0001-Btrfs-progs-add-a-btrfs-select-super-command-to-over.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-tmp/0002-Btrfs-progs-use-safe-string-manipulation-functions.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-tmp/0003-Btrfs-progs-utils-Informative-errors.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-tmp/0004-update-man-page-to-new-defragment-command-interface.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-tmp/0005-Improve-error-handling-in-the-btrfs-command.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-tmp/0006-Btrfs-progs-update-super-fields-for-space-cache.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-tmp/0007-Btrfs-progs-add-support-for-mixed-data-metadata-bloc.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-tmp/0008-Update-for-lzo-support.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-tmp/0009-Update-clean-up-btrfs-help-and-man-page-V2.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-tmp/0010-Deprecate-btrfsctl-btrfs-show-btrfs-vol.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-tmp/0011-Add-the-btrfs-filesystem-label-command.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-tmp/0012-Btrfs-progs-Update-man-page-for-mixed-data-metadata-.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-tmp/0013-btrfs-progs-Add-new-feature-to-mkfs.btrfs-to-make-fi.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-tmp/0014-btrfs-progs-fix-wrong-extent-buffer-size-when-readin.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-tmp/0015-btrfs-progs-add-discard-support-to-mkfs.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools_git.bb
Signature · 1 line
1.7.4.4
PATCH 1/6 btrfs-tools: new recipe for tools to operate on btrfs images
From: Nitin A Kamble <[email protected]>
Added these patches to the recipe to get it to work as desired:
Upstream patches from tmp & for-dragonn branches of repository http://git.kernel.org/?p=linux/kernel/git/mason/btrfs-progs-unstable.git
Also included the debian patches.
Nitin's patch to make the makefile cross friendly
And Xin Zhong's patch to improve mkfs.btrfs
--- .../btrfs-tools/btrfs-tools/debian/01-labels.patch | 29 + .../btrfs-tools/btrfs-tools/debian/02-ftbfs.patch | 125 +++ .../btrfs-tools/btrfs-tools/debian/03-glibc.patch | 16 + .../btrfs-tools/btrfs-tools/fix_use_of_gcc.patch | 84 ++ .../btrfs-tools/btrfs-tools/mkfs-xin-fixes.patch | 183 ++++ ...g-devices-so-degraded-filesystems-can-be-.patch | 64 ++ ...-Check-for-RAID10-in-set_avail_alloc_bits.patch | 35 + ...t-the-root-generation-in-btrfs-debug-tree.patch | 33 + ...low-partial-FS-opens-for-btrfsck-scanning.patch | 253 +++++ .../0005-Temporary-debugging-for-dragonn.patch | 75 ++ ...-add-a-btrfs-select-super-command-to-over.patch | 170 +++ ...gs-use-safe-string-manipulation-functions.patch | 152 +++ ...0003-Btrfs-progs-utils-Informative-errors.patch | 37 + ...-page-to-new-defragment-command-interface.patch | 99 ++ ...prove-error-handling-in-the-btrfs-command.patch | 510 +++++++++ ...progs-update-super-fields-for-space-cache.patch | 57 + ...-add-support-for-mixed-data-metadata-bloc.patch | 403 +++++++ .../upstream-tmp/0008-Update-for-lzo-support.patch | 203 ++++ ...pdate-clean-up-btrfs-help-and-man-page-V2.patch | 272 +++++ ...0-Deprecate-btrfsctl-btrfs-show-btrfs-vol.patch | 152 +++ ...11-Add-the-btrfs-filesystem-label-command.patch | 390 +++++++ ...-Update-man-page-for-mixed-data-metadata-.patch | 42 + ...-Add-new-feature-to-mkfs.btrfs-to-make-fi.patch | 1108 ++++++++++++++++++++ ...-fix-wrong-extent-buffer-size-when-readin.patch | 33 + ...5-btrfs-progs-add-discard-support-to-mkfs.patch | 110 ++ .../btrfs-tools/btrfs-tools_git.bb | 52 + 26 files changed, 4687 insertions(+), 0 deletions(-) create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/debian/01-labels.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/debian/02-ftbfs.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/debian/03-glibc.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/fix_use_of_gcc.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/mkfs-xin-fixes.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-for-dragonn/0001-Fill-missing-devices-so-degraded-filesystems-can-be-.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-for-dragonn/0002-Check-for-RAID10-in-set_avail_alloc_bits.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-for-dragonn/0003-Print-the-root-generation-in-btrfs-debug-tree.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-for-dragonn/0004-Allow-partial-FS-opens-for-btrfsck-scanning.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-for-dragonn/0005-Temporary-debugging-for-dragonn.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-tmp/0001-Btrfs-progs-add-a-btrfs-select-super-command-to-over.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-tmp/0002-Btrfs-progs-use-safe-string-manipulation-functions.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-tmp/0003-Btrfs-progs-utils-Informative-errors.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-tmp/0004-update-man-page-to-new-defragment-command-interface.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-tmp/0005-Improve-error-handling-in-the-btrfs-command.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-tmp/0006-Btrfs-progs-update-super-fields-for-space-cache.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-tmp/0007-Btrfs-progs-add-support-for-mixed-data-metadata-bloc.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-tmp/0008-Update-for-lzo-support.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-tmp/0009-Update-clean-up-btrfs-help-and-man-page-V2.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-tmp/0010-Deprecate-btrfsctl-btrfs-show-btrfs-vol.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-tmp/0011-Add-the-btrfs-filesystem-label-command.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-tmp/0012-Btrfs-progs-Update-man-page-for-mixed-data-metadata-.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-tmp/0013-btrfs-progs-Add-new-feature-to-mkfs.btrfs-to-make-fi.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-tmp/0014-btrfs-progs-fix-wrong-extent-buffer-size-when-readin.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-tmp/0015-btrfs-progs-add-discard-support-to-mkfs.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools_git.bb
meta/recipes-devtools/btrfs-tools/btrfs-tools/debian/01-labels.patch new file +29 -0
@@ -0,0 +1,29 @@ +Upstream-Status: Inappropriate [distribution: debian] + +Author: Chris Mason <[email protected]> +Description: Allow /'s in labels. + +diff -Naurp btrfs-tools.orig/mkfs.c btrfs-tools/mkfs.c +--- btrfs-tools.orig/mkfs.c 2009-03-15 13:27:12.000000000 +0100 ++++ btrfs-tools/mkfs.c 2009-04-17 20:53:12.000000000 +0200 +@@ -294,7 +294,6 @@ static u64 parse_profile(char *s) + + static char *parse_label(char *input) + { +- int i; + int len = strlen(input); + + if (len > BTRFS_LABEL_SIZE) { +@@ -302,12 +301,6 @@ static char *parse_label(char *input) + BTRFS_LABEL_SIZE); + exit(1); + } +- for (i = 0; i < len; i++) { +- if (input[i] == '/' || input[i] == '\\') { +- fprintf(stderr, "invalid label %s\n", input); +- exit(1); +- } +- } + return strdup(input); + } +
meta/recipes-devtools/btrfs-tools/btrfs-tools/debian/02-ftbfs.patch new file +125 -0
125 lines not on this page · raw message
meta/recipes-devtools/btrfs-tools/btrfs-tools/debian/03-glibc.patch new file +16 -0
@@ -0,0 +1,16 @@ +Upstream-Status: Inappropriate [distribution: debian] + +Author: Colin Watson <[email protected]> +Description: Fixes FTBFS with glibc 2.12 (Closes; #586111). + +diff -Naurp btrfs-tools.orig//btrfsck.c btrfs-tools/btrfsck.c +--- btrfs-tools.orig//btrfsck.c 2010-06-05 09:06:38.000000000 +0200 ++++ btrfs-tools/btrfsck.c 2010-06-16 16:16:10.000000000 +0200 +@@ -21,6 +21,7 @@ + #include <stdio.h> + #include <stdlib.h> + #include <fcntl.h> ++#include <sys/stat.h> + #include "kerncompat.h" + #include "ctree.h" + #include "disk-io.h"
meta/recipes-devtools/btrfs-tools/btrfs-tools/fix_use_of_gcc.patch new file +84 -0
84 lines not on this page · raw message
meta/recipes-devtools/btrfs-tools/btrfs-tools/mkfs-xin-fixes.patch new file +183 -0
183 lines not on this page · raw message
meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-for-dragonn/0001-Fill-missing-devices-so-degraded-filesystems-can-be-.patch new file +64 -0
64 lines not on this page · raw message
meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-for-dragonn/0002-Check-for-RAID10-in-set_avail_alloc_bits.patch new file +35 -0
@@ -0,0 +1,35 @@ +Upstream-Status: Inappropriate [Backport] +From 454a0538680bc17656cefadef1f167917ea0b856 Mon Sep 17 00:00:00 2001 +From: Chris Mason <[email protected]> +Date: Wed, 15 Dec 2010 16:02:45 -0500 +Subject: [PATCH 2/5] Check for RAID10 in set_avail_alloc_bits + +When raid is setup with mkfs, it is supposed to cow the initial filesystem +it creates up to the desired raid level. RAID10 was not in the list +of RAID levels it checked for, so the initial FS created for RAID10 +actually only lived on the first disk. + +This works well enough because all the roots get quickly cowed during the +first mount. The exception is the data relocation tree, which only gets +cowed when we do a balance. + +Signed-off-by: Chris Mason <[email protected]> +--- + extent-tree.c | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/extent-tree.c b/extent-tree.c +index b2f9bb2..108933f 100644 +--- a/extent-tree.c ++++ b/extent-tree.c +@@ -1775,6 +1775,7 @@ static void set_avail_alloc_bits(struct btrfs_fs_info *fs_info, u64 flags) + { + u64 extra_flags = flags & (BTRFS_BLOCK_GROUP_RAID0 | + BTRFS_BLOCK_GROUP_RAID1 | ++ BTRFS_BLOCK_GROUP_RAID10 | + BTRFS_BLOCK_GROUP_DUP); + if (extra_flags) { + if (flags & BTRFS_BLOCK_GROUP_DATA) +-- +1.7.2.3 +
meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-for-dragonn/0003-Print-the-root-generation-in-btrfs-debug-tree.patch new file +33 -0
@@ -0,0 +1,33 @@ +Upstream-Status: Inappropriate [Backport] +From d5b8b904ac40e4c5dbff4008accd7e588b697085 Mon Sep 17 00:00:00 2001 +From: Chris Mason <[email protected]> +Date: Wed, 15 Dec 2010 16:03:00 -0500 +Subject: [PATCH 3/5] Print the root generation in btrfs-debug-tree + +Signed-off-by: Chris Mason <[email protected]> +--- + print-tree.c | 5 +++-- + 1 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/print-tree.c b/print-tree.c +index ac575d5..85399aa 100644 +--- a/print-tree.c ++++ b/print-tree.c +@@ -505,11 +505,12 @@ void btrfs_print_leaf(struct btrfs_root *root, struct extent_buffer *l) + case BTRFS_ROOT_ITEM_KEY: + ri = btrfs_item_ptr(l, i, struct btrfs_root_item); + read_extent_buffer(l, &root_item, (unsigned long)ri, sizeof(root_item)); +- printf("\t\troot data bytenr %llu level %d dirid %llu refs %u\n", ++ printf("\t\troot data bytenr %llu level %d dirid %llu refs %u gen %llu\n", + (unsigned long long)btrfs_root_bytenr(&root_item), + btrfs_root_level(&root_item), + (unsigned long long)btrfs_root_dirid(&root_item), +- btrfs_root_refs(&root_item)); ++ btrfs_root_refs(&root_item), ++ (unsigned long long)btrfs_root_generation(&root_item)); + if (btrfs_root_refs(&root_item) == 0) { + struct btrfs_key drop_key; + btrfs_disk_key_to_cpu(&drop_key, +-- +1.7.2.3 +
meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-for-dragonn/0004-Allow-partial-FS-opens-for-btrfsck-scanning.patch new file +253 -0
253 lines not on this page · raw message
meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-for-dragonn/0005-Temporary-debugging-for-dragonn.patch new file +75 -0
75 lines not on this page · raw message
meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-tmp/0001-Btrfs-progs-add-a-btrfs-select-super-command-to-over.patch new file +170 -0
170 lines not on this page · raw message
meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-tmp/0002-Btrfs-progs-use-safe-string-manipulation-functions.patch new file +152 -0
152 lines not on this page · raw message
meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-tmp/0003-Btrfs-progs-utils-Informative-errors.patch new file +37 -0
@@ -0,0 +1,37 @@ +Upstream-Status: Inappropriate [Backport] +From ac1a80f52434d05230f9933d8f68e28cc09e10b0 Mon Sep 17 00:00:00 2001 +From: Goldwyn Rodrigues <[email protected]> +Date: Mon, 7 Feb 2011 07:34:36 +0000 +Subject: [PATCH 03/15] Btrfs-progs utils Informative errors + +Signed-off-by: Chris Mason <[email protected]> +--- + utils.c | 5 +++-- + 1 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/utils.c b/utils.c +index 96ef94d..d8c3dcc 100644 +--- a/utils.c ++++ b/utils.c +@@ -867,7 +867,7 @@ again: + } + dirp = opendir(dirname); + if (!dirp) { +- fprintf(stderr, "Unable to open /sys/block for scanning\n"); ++ fprintf(stderr, "Unable to open %s for scanning\n", dirname); + return -ENOENT; + } + while(1) { +@@ -902,7 +902,8 @@ again: + } + fd = open(fullpath, O_RDONLY); + if (fd < 0) { +- fprintf(stderr, "failed to read %s\n", fullpath); ++ fprintf(stderr, "failed to read %s: %s\n", fullpath, ++ strerror(errno)); + continue; + } + ret = btrfs_scan_one_device(fd, fullpath, &tmp_devices, +-- +1.7.2.3 +
meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-tmp/0004-update-man-page-to-new-defragment-command-interface.patch new file +99 -0
99 lines not on this page · raw message
meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-tmp/0005-Improve-error-handling-in-the-btrfs-command.patch new file +510 -0
510 lines not on this page · raw message
meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-tmp/0006-Btrfs-progs-update-super-fields-for-space-cache.patch new file +57 -0
57 lines not on this page · raw message
meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-tmp/0007-Btrfs-progs-add-support-for-mixed-data-metadata-bloc.patch new file +403 -0
403 lines not on this page · raw message
meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-tmp/0008-Update-for-lzo-support.patch new file +203 -0
203 lines not on this page · raw message
meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-tmp/0009-Update-clean-up-btrfs-help-and-man-page-V2.patch new file +272 -0
272 lines not on this page · raw message
meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-tmp/0010-Deprecate-btrfsctl-btrfs-show-btrfs-vol.patch new file +152 -0
152 lines not on this page · raw message
meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-tmp/0011-Add-the-btrfs-filesystem-label-command.patch new file +390 -0
48 lines not on this page · raw message
meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-tmp/0012-Btrfs-progs-Update-man-page-for-mixed-data-metadata-.patch new file +42 -0
42 lines not on this page · raw message
meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-tmp/0013-btrfs-progs-Add-new-feature-to-mkfs.btrfs-to-make-fi.patch new file +1108 -0
1,108 lines not on this page · raw message
meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-tmp/0014-btrfs-progs-fix-wrong-extent-buffer-size-when-readin.patch new file +33 -0
Lines of this file are not shown. View the raw message.
meta/recipes-devtools/btrfs-tools/btrfs-tools/upstream-tmp/0015-btrfs-progs-add-discard-support-to-mkfs.patch new file +110 -0
110 lines not on this page · raw message
meta/recipes-devtools/btrfs-tools/btrfs-tools_git.bb new file +52 -0
52 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.7.4.4
Part of the diff is not shown here. View the raw message.
PATCH 2/6 image-types.bbclass: get the image size in the whole number
From: Nitin A Kamble <[email protected]>
Avoid fractions like 80.72 and round them to whole numbers.
--- meta/classes/image_types.bbclass | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
meta/classes/image_types.bbclass +1 -1
@@ -13,7 +13,7 @@ def get_imagecmds(d): runimagecmd () { # Image generation code for image type ${type} - ROOTFS_SIZE=`du -ks ${IMAGE_ROOTFS}|awk '{size = $1 * ${IMAGE_OVERHEAD_FACTOR} + ${IMAGE_ROOTFS_EXTRA_SPACE}; print (size > ${IMAGE_ROOTFS_SIZE} ? size : ${IMAGE_ROOTFS_SIZE}) }'` + ROOTFS_SIZE=`du -ks ${IMAGE_ROOTFS}|awk '{size = $1 * ${IMAGE_OVERHEAD_FACTOR} + ${IMAGE_ROOTFS_EXTRA_SPACE}; OFMT = "%.0f" ; print (size > ${IMAGE_ROOTFS_SIZE} ? size : ${IMAGE_ROOTFS_SIZE}) }'` ${cmd} cd ${DEPLOY_DIR_IMAGE}/ rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.${type}
Signature · 1 line
1.7.4.4
PATCH 3/6 image_types.bbclass: enable btrfs as one of the image type
In reply to [email protected]From: Nitin A Kamble <[email protected]>
--- meta/classes/image_types.bbclass | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
meta/classes/image_types.bbclass +7 -0
@@ -45,6 +45,11 @@ IMAGE_CMD_ext3.gz () { mv ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext3.gz ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext3.gz rmdir ${DEPLOY_DIR_IMAGE}/tmp.gz } + +IMAGE_CMD_btrfs () { + mkfs.btrfs -b `expr ${ROOTFS_SIZE} \* 1024` ${EXTRA_IMAGECMD} -r ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.btrfs +} + IMAGE_CMD_squashfs = "mksquashfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs ${EXTRA_IMAGECMD} -noappend" IMAGE_CMD_squashfs-lzma = "mksquashfs-lzma ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs-lzma ${EXTRA_IMAGECMD} -noappend" IMAGE_CMD_tar = "cd ${IMAGE_ROOTFS} && tar -cvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar ."
@@ -71,6 +76,7 @@ EXTRA_IMAGECMD_ext2 ?= "-i 8192" EXTRA_IMAGECMD_ext2.gz ?= "-i 8192" EXTRA_IMAGECMD_ext3 ?= "-i 8192" EXTRA_IMAGECMD_ext3.gz ?= "-i 8192" +EXTRA_IMAGECMD_btrfs ?= "" IMAGE_DEPENDS = "" IMAGE_DEPENDS_jffs2 = "mtd-utils-native"
@@ -79,6 +85,7 @@ IMAGE_DEPENDS_ext2 = "genext2fs-native" IMAGE_DEPENDS_ext2.gz = "genext2fs-native" IMAGE_DEPENDS_ext3 = "genext2fs-native e2fsprogs-native" IMAGE_DEPENDS_ext3.gz = "genext2fs-native e2fsprogs-native" +IMAGE_DEPENDS_btrfs = "btrfs-tools-native" IMAGE_DEPENDS_squashfs = "squashfs-tools-native" IMAGE_DEPENDS_squashfs-lzma = "squashfs-lzma-tools-native" IMAGE_DEPENDS_ubi = "mtd-utils-native"
Signature · 1 line
1.7.4.4
PATCH 4/6 qemu machine: enable btrfs as one of the supported filesystem
In reply to [email protected]From: Nitin A Kamble <[email protected]>
--- meta/conf/machine/include/qemu.inc | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
meta/conf/machine/include/qemu.inc +1 -1
@@ -3,7 +3,7 @@ PREFERRED_PROVIDER_virtual/xserver ?= "xserver-kdrive" MACHINE_FEATURES = "kernel26 apm alsa pcmcia bluetooth irda usbgadget screen" -IMAGE_FSTYPES ?= "tar.bz2 ext3" +IMAGE_FSTYPES ?= "tar.bz2 ext3 btrfs" ROOT_FLASH_SIZE = "280"
Signature · 1 line
1.7.4.4
PATCH 5/6 base-files: add btrfs to /etc/filesystems
In reply to [email protected]From: Nitin A Kamble <[email protected]>
--- .../recipes-core/base-files/base-files/filesystems | 1 + meta/recipes-core/base-files/base-files_3.0.14.bb | 2 +- 2 files changed, 2 insertions(+), 1 deletions(-)
meta/recipes-core/base-files/base-files/filesystems +1 -0
@@ -3,4 +3,5 @@ fat vfat ext2 ext3 +btrfs *
meta/recipes-core/base-files/base-files_3.0.14.bb +1 -1
@@ -2,7 +2,7 @@ SUMMARY = "Miscellaneous files for the base system." DESCRIPTION = "The base-files package creates the basic system directory structure and provides a small set of key configuration files for the system." SECTION = "base" PRIORITY = "required" -PR = "r68" +PR = "r69" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://licenses/GPL-2;md5=94d55d512a9ba36caa9b7df079bae19f" SRC_URI = "file://rotation \
Signature · 1 line
1.7.4.4
PATCH 6/6 scripts/runqemu: enable btrfs
In reply to [email protected]From: Nitin A Kamble <[email protected]>
--- scripts/runqemu | 6 +++--- scripts/runqemu-internal | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-)
scripts/runqemu +3 -3
@@ -71,7 +71,7 @@ process_filename() { usage fi elif [[ "x$EXT" == "xext2" || "x$EXT" == "xext3" || - "x$EXT" == "xjffs2" ]]; then + "x$EXT" == "xjffs2" || "x$EXT" == "xbtrfs" ]]; then # A file ending in a supportted fs type is a rootfs image if [[ -z "$FSTYPE" || "$FSTYPE" == "$EXT" ]]; then FSTYPE=$EXT
@@ -101,7 +101,7 @@ while [ $i -le $# ]; do usage fi ;; - "ext2" | "ext3" | "jffs2" | "nfs") + "ext2" | "ext3" | "jffs2" | "nfs" | "btrfs") if [[ -z "$FSTYPE" || "$FSTYPE" == "$arg" ]]; then FSTYPE=$arg else
@@ -317,7 +317,7 @@ if [[ -e "$ROOTFS" && -z "$FSTYPE" ]]; then # Extract the filename extension EXT=`echo $ROOTFS | awk -F . '{ print \$NF }'` if [[ "x$EXT" == "xext2" || "x$EXT" == "xext3" || - "x$EXT" == "xjffs2" ]]; then + "x$EXT" == "xjffs2" || "x$EXT" == "xbtrfs" ]]; then FSTYPE=$EXT else echo "Note: Unable to determine filesystem extension for $ROOTFS"
scripts/runqemu-internal +6 -6
@@ -277,7 +277,7 @@ if [ "$MACHINE" = "qemuarm" -o "$MACHINE" = "qemuarmv6" -o "$MACHINE" = "qemuarm MACHINE_SUBTYPE=versatilepb QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS" # QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS -force-pointer" - if [ "$FSTYPE" = "ext3" ]; then + if [ "$FSTYPE" = "ext3" -o "$FSTYPE" = "btrfs" ]; then KERNCMDLINE="root=/dev/sda rw console=ttyAMA0,115200 console=tty $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY highres=off" QEMUOPTIONS="$QEMU_NETWORK_CMD -M versatilepb -hda $ROOTFS -no-reboot $QEMU_UI_OPTIONS" fi
@@ -301,7 +301,7 @@ fi if [ "$MACHINE" = "qemux86" ]; then QEMU=qemu QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS -vga vmware -enable-gl" - if [ "$FSTYPE" = "ext3" ]; then + if [ "$FSTYPE" = "ext3" -o "$FSTYPE" = "btrfs" ]; then KERNCMDLINE="vga=0 root=/dev/hda rw mem=$QEMU_MEMORY $KERNEL_NETWORK_CMD" QEMUOPTIONS="$QEMU_NETWORK_CMD -hda $ROOTFS $QEMU_UI_OPTIONS" fi
@@ -322,7 +322,7 @@ fi if [ "$MACHINE" = "qemux86-64" ]; then QEMU=qemu-system-x86_64 QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS -vga vmware -enable-gl" - if [ "$FSTYPE" = "ext3" ]; then + if [ "$FSTYPE" = "ext3" -o "$FSTYPE" = "btrfs" ]; then KERNCMDLINE="vga=0 root=/dev/hda rw mem=$QEMU_MEMORY $KERNEL_NETWORK_CMD" QEMUOPTIONS="$QEMU_NETWORK_CMD -hda $ROOTFS $QEMU_UI_OPTIONS" fi
@@ -345,7 +345,7 @@ fi if [ "$MACHINE" = "spitz" ]; then QEMU=qemu-system-arm - if [ "$FSTYPE" = "ext3" ]; then + if [ "$FSTYPE" = "ext3" -o "$FSTYPE" = "btrfs" ]; then echo $ROOTFS ROOTFS=`readlink -f $ROOTFS` echo $ROOTFS
@@ -361,7 +361,7 @@ if [ "$MACHINE" = "qemumips" ]; then QEMU=qemu-system-mips MACHINE_SUBTYPE=malta QEMU_UI_OPTIONS="-vga cirrus $QEMU_UI_OPTIONS" - if [ "$FSTYPE" = "ext3" ]; then + if [ "$FSTYPE" = "ext3" -o "$FSTYPE" = "btrfs" ]; then #KERNCMDLINE="root=/dev/hda console=ttyS0 console=tty0 $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY" KERNCMDLINE="root=/dev/hda rw console=ttyS0 console=tty $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY" QEMUOPTIONS="$QEMU_NETWORK_CMD -M $MACHINE_SUBTYPE -hda $ROOTFS -no-reboot $QEMU_UI_OPTIONS"
@@ -383,7 +383,7 @@ if [ "$MACHINE" = "qemuppc" ]; then CPU_SUBTYPE=603e BIOS=powerpc_rom.bin QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS -nographic" - if [ "$FSTYPE" = "ext3" ]; then + if [ "$FSTYPE" = "ext3" -o "$FSTYPE" = "btrfs" ]; then KERNCMDLINE="root=/dev/hda rw console=ttyS0 console=tty0 $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY" QEMUOPTIONS="$QEMU_NETWORK_CMD -cpu $CPU_SUBTYPE -M $MACHINE_SUBTYPE -bios $BIOS -hda $ROOTFS -no-reboot $QEMU_UI_OPTIONS" fi
Signature · 1 line
1.7.4.4
Richard Purdie
AppliedQuoted 15 lines · On Tue, 2011-06-21 at 13:27 -0700, [email protected] wrote:
From: Nitin A Kamble <[email protected]>
These patches enable the btrfs image support in the poky tree. Other than kernel parts all the parts are ready here. linux-yocto-2.6.37 kernel need some work to get latest btrfs working, and that part will be sent separately.
The following changes since commit
2163461ec94528ecf046a04edc5db3d2dd3a6b8b:systemtap: remove non-core
COMPATIBLE_MACHINES(2011-06-16 22:14:06 +0100)are available in the git repository at:
git://git.pokylinux.org/poky-contribnitin/btrfs
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=nitin/btrfs
Quoted 7 lines
Nitin A Kamble (6):
btrfs-tools: new recipe for tools to operate on btrfs images image-types.bbclass: get the image size in the whole number image_types.bbclass: enable btrfs as one of the image type qemu machine: enable btrfs as one of the supported filesystem
base-files: add btrfs to/etc/filesystemsscripts/runqemu: enable btrfs
Merged to master, thanks.
Richard