search for: dev_item

Displaying 15 results from an estimated 15 matches for "dev_item".

2009 Nov 14
2
[PATCH] btrfs-progs: Check mount status of multidevice filesystems
...ot, u8 *fsid) goto out; } - ret = btrfs_open_devices(fs_devices, O_RDONLY); + ret = btrfs_open_devices(fs_devices, O_RDONLY, check_mount); if (ret) goto out; @@ -1272,7 +1286,8 @@ out: static int read_one_dev(struct btrfs_root *root, struct extent_buffer *leaf, - struct btrfs_dev_item *dev_item) + struct btrfs_dev_item *dev_item, + int check_mount) { struct btrfs_device *device; u64 devid; @@ -1289,7 +1304,7 @@ static int read_one_dev(struct btrfs_root *root, BTRFS_UUID_SIZE); if (memcmp(fs_uuid, root->fs_info->fsid, BTRFS_UUID_SIZE)) { - ret = open_se...
2012 May 29
0
[btrfs-progs] btrfs fi df output
...e ? Which ones ? In the three there is one 4MB andthree 8MB, one with 2 stripes. #btrfs-debug-tree /dev/mapper/vg-lvtest chunk tree leaf 20979712 items 12 free space 2557 generation 5 owner 3 fs uuid 6accfaf3-c88a-462e-85fc-35513d0b43d6 chunk uuid 65f22206-a9dd-4053-a660-61bc4ee0be12 item 0 key (DEV_ITEMS DEV_ITEM 1) itemoff 3897 itemsize 98 dev item devid 1 total_bytes 116912029696 bytes used 8627683328 item 1 key (FIRST_CHUNK_TREE CHUNK_ITEM 0) itemoff 3817 itemsize 80 chunk length 4194304 owner 2 type 2 num_stripes 1 stripe 0 devid 1 offset 0 item 2 key (FIRST_CHUNK_TREE CHUNK_ITEM 4194...
2015 Dec 24
4
[PATCH] btrfs: Fix logical to physical block address mapping
The current btrfs support did not handled multiple stripes stored in chunk items, hence skipping the physical addresses that were needed to do the mapping. Besides, the chunk tree may contain DEV_ITEM keys which store information on all of the underlying block devices, so we must skip them instead of finishing lookup. The bug was reproduced with btrfs-progs v4.2.2. Cc: Gene Cumm <gene.cumm at gmail.com> Cc: H. Peter Anvin <hpa at zytor.com> Signed-off-by: Paulo Alcantara <pcacjr...
2015 Dec 27
1
[PATCH v2] btrfs: Fix logical to physical block address mapping
...n Thu, Dec 24, 2015 at 8:58 AM, Paulo Alcantara <pcacjr at gmail.com> wrote: > The current btrfs support did not handled multiple stripes stored in > chunk items, hence skipping the physical addresses that were needed to > do the mapping. > > Besides, the chunk tree may contain DEV_ITEM keys which store > information on all of the underlying block devices, so we must skip them > instead of finishing lookup. > > The bug was reproduced with btrfs-progs v4.2.2. > > Cc: Gene Cumm <gene.cumm at gmail.com> > Cc: H. Peter Anvin <hpa at zytor.com> > Sig...
2012 Jan 11
5
Warning: bad fsid on block 20971520
...estion is, where the update is lost -- block layer, write caches of the disk. btrfs-debug-tree says it''s: chunk tree leaf 20971520 items 6 free space 3283 generation 4 owner 3 fs uuid 024cd2e6-d584-493c-af81-fa3e2f548abb chunk uuid 3f52ec70-89a9-4cd5-b5f0-177d7ae63de3 item 0 key (DEV_ITEMS DEV_ITEM 1) itemoff 3897 itemsize 98 dev item devid 1 total_bytes 10737418240 bytes used 2185232384 item 1 key (FIRST_CHUNK_TREE CHUNK_ITEM 0) itemoff 3817 itemsize 80 chunk length 4194304 owner 2 type 2 num_stripes 1 stripe 0 devid 1...
2014 Mar 05
0
[PATCH] Btrfs-progs: remove unused variable and update btrfs-image man page
...sizeof(*disk_key); ptr += sizeof(*disk_key); cur += sizeof(*disk_key); - new_cur += sizeof(*disk_key); if (key.type == BTRFS_CHUNK_ITEM_KEY) { chunk = (struct btrfs_chunk *)ptr; @@ -1406,7 +1404,6 @@ static int update_super(u8 *buffer) memcpy(chunk->stripe.dev_uuid, super->dev_item.uuid, BTRFS_UUID_SIZE); new_array_size += sizeof(*chunk); - new_cur += sizeof(*chunk); } else { fprintf(stderr, "Bogus key in the sys chunk array " "%d\n", key.type); diff --git a/man/btrfs-image.8.in b/man/btrfs-image.8.in index d5ba594..3f51f3f 100...
2011 Apr 20
4
[PATCH 1/5] Btrfs: fix bh leak on __btrfs_open_devices path
''bh'' is forgot to release if no error is detected Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com> --- fs/btrfs/volumes.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 8b9fb8c..69fc902 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -631,6 +631,7 @@ static int
2015 Dec 24
0
[PATCH v2] btrfs: Fix logical to physical block address mapping
The current btrfs support did not handled multiple stripes stored in chunk items, hence skipping the physical addresses that were needed to do the mapping. Besides, the chunk tree may contain DEV_ITEM keys which store information on all of the underlying block devices, so we must skip them instead of finishing lookup. The bug was reproduced with btrfs-progs v4.2.2. Cc: Gene Cumm <gene.cumm at gmail.com> Cc: H. Peter Anvin <hpa at zytor.com> Signed-off-by: Paulo Alcantara <pcacjr...
2015 Dec 27
0
[PATCH v3] btrfs: Fix logical to physical block address mapping
The current btrfs support did not handled multiple stripes stored in chunk items, hence skipping the physical addresses that were needed to do the mapping. Besides, the chunk tree may contain DEV_ITEM keys which store information on all of the underlying block devices, so we must skip them instead of finishing lookup. The bug was reproduced with btrfs-progs v4.2.2. Cc: Gene Cumm <gene.cumm at gmail.com> Cc: H. Peter Anvin <hpa at zytor.com> Signed-off-by: Paulo Alcantara <pcacjr...
2011 Aug 26
0
[PATCH] Btrfs: make some functions return void
...evices); } - return 0; } static noinline struct btrfs_device *__find_device(struct list_head *head, @@ -3491,9 +3490,9 @@ static int read_one_chunk(struct btrfs_root *root, struct btrfs_key *key, return 0; } -static int fill_device_from_item(struct extent_buffer *leaf, - struct btrfs_dev_item *dev_item, - struct btrfs_device *device) +static void fill_device_from_item(struct extent_buffer *leaf, + struct btrfs_dev_item *dev_item, + struct btrfs_device *device) { unsigned long ptr; @@ -3508,8 +3507,6 @@ static int fill_device_from_item(struct extent_buffer *leaf, p...
2012 Mar 20
13
[PATCH 0 of 3 v2] PV-GRUB: add support for ext4 and btrfs
Hi, The following patches add support for ext4 and btrfs to PV-GRUB. These patches are taken nearly verbatim from those provided by Fedora and Gentoo. We''ve been using these patches for the PV-GRUB images available in EC2 for some time now with no problems. Changes from v1: - Makefile has been changed to check the exit code from patch - The btrfs patch has been rebased to apply
2011 Dec 09
10
[PATCH 0/3] Btrfs: add IO error device stats
The goal is to detect when drives start to get an increased error rate, when drives should be replaced soon. Therefore statistic counters are added that count IO errors (read, write and flush). Additionally, the software detected errors like checksum errors and corrupted blocks are counted. An ioctl interface is added to get the device statistic counters. A second ioctl is added to atomically get
2012 May 25
6
[PATCH v5 0/3] Btrfs: add IO error device stats
Changes v1-v2: - Remove restriction that BTRFS_IOC_GET_DEVICE_STATS is a privileged operation - Cast u64 to unsigned long long for printf() Changes v2-v3: - Rebased on Chris'' current master Changes v3-v4: - Add padding at end of ioctl structure Changes v4-v5: - The statistic members in the ioctl are now organized as an array of 64 bit values. Symbolic names for the array indexes
2009 May 12
0
[PATCH 1/2] btrfs-progs: mixed back ref support
...ct extent_buffer *buf; struct btrfs_root_item root_item; struct btrfs_disk_key disk_key; - struct btrfs_extent_ref *extent_ref; struct btrfs_extent_item *extent_item; + struct btrfs_tree_block_info *block_info; struct btrfs_inode_item *inode_item; struct btrfs_chunk *chunk; struct btrfs_dev_item *dev_item; @@ -212,25 +212,32 @@ int make_btrfs(int fd, const char *devic extent_item = btrfs_item_ptr(buf, nritems, struct btrfs_extent_item); btrfs_set_extent_refs(buf, extent_item, 1); + btrfs_set_extent_generation(buf, extent_item, 1); + nritems++; + + /* create tree block i...
2011 Oct 04
68
[patch 00/65] Error handling patchset v3
Hi all - Here''s my current error handling patchset, against 3.1-rc8. Almost all of this patchset is preparing for actual error handling. Before we start in on that work, I''m trying to reduce the surface we need to worry about. It turns out that there is a ton of code that returns an error code but never actually reports an error. The patchset has grown to 65 patches. 46 of them