Displaying 6 results from an estimated 6 matches for "btrfs_disk_key_to_cpu".
2009 Jul 23
1
[PATCH] Remove code duplication in comp_keys
...(-)
Index: linux/fs/btrfs/ctree.c
===================================================================
--- linux.orig/fs/btrfs/ctree.c 2009-07-24 00:47:20.936410297 +0200
+++ linux/fs/btrfs/ctree.c 2009-07-24 00:48:02.368160146 +0200
@@ -557,19 +557,7 @@ static int comp_keys(struct btrfs_disk_k
btrfs_disk_key_to_cpu(&k1, disk);
- if (k1.objectid > k2->objectid)
- return 1;
- if (k1.objectid < k2->objectid)
- return -1;
- if (k1.type > k2->type)
- return 1;
- if (k1.type < k2->type)
- return -1;
- if (k1.offset > k2->offset)
- return 1;
- if (k1.offset < k2->offset...
2013 Oct 17
0
[PATCH] Btrfs-progs: fix btrfsck improper prompt on dropping snapshots
...ct extent_buffer *buf;
u64 bytenr;
@@ -3817,6 +3839,15 @@ static int run_next_block(struct btrfs_root *root,
ptr = btrfs_node_blockptr(buf, i);
size = btrfs_level_size(root, level - 1);
btrfs_node_key_to_cpu(buf, &key, i);
+ if (ri != NULL) {
+ struct btrfs_key drop_key;
+ btrfs_disk_key_to_cpu(&drop_key,
+ &ri->drop_progress);
+ if ((level == ri->drop_level)
+ && is_dropped_key(&key, &drop_key)) {
+ continue;
+ }
+ }
ret = add_extent_rec(extent_cache, &key,
ptr, size, 0, 0, 1, 0, 1, 0,
size);
@@ -54...
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
2012 Aug 01
17
[PATCH] add crtime to the snapshot list
From: Anand <anand.jain@oracle.com>
This patch adds creation-time to the snapshot list display,
which would help user to better manage the snapshots when
number of snapshots grow substantially. This patch is developed
and on top of the send/receive btrfs and btrfs-progs repo at
git://github.com/ablock84/linux-btrfs.git (send-v2)
git://github.com/ablock84/btrfs-progs.git (send-v2)
2013 Apr 03
0
[PATCH] Btrfs-progs: add a free space cache checker to fsck
...fs_item_ptr(leaf, path->slots[0],
+ struct btrfs_free_space_header);
+ num_entries = btrfs_free_space_entries(leaf, header);
+ num_bitmaps = btrfs_free_space_bitmaps(leaf, header);
+ generation = btrfs_free_space_generation(leaf, header);
+ btrfs_free_space_key(leaf, header, &disk_key);
+ btrfs_disk_key_to_cpu(&inode_location, &disk_key);
+ btrfs_release_path(root, path);
+
+ ret = btrfs_search_slot(NULL, root, &inode_location, path, 0, 0);
+ if (ret) {
+ printf("Couldn''t find free space inode %d\n", ret);
+ return 0;
+ }
+
+ leaf = path->nodes[0];
+ inode_item = btrfs...
2011 Oct 06
26
[PATCH v0 00/18] btfs: Subvolume Quota Groups
This is a first draft of a subvolume quota implementation. It is possible
to limit subvolumes and any group of subvolumes and also to track the amount
of space that will get freed when deleting snapshots.
The current version is functionally incomplete, with the main missing feature
being the initial scan and rescan of an existing filesystem.
I put some effort into writing an introduction into