Displaying 4 results from an estimated 4 matches for "btrfs_free_space_ctl".
2013 Apr 03
0
[PATCH] Btrfs-progs: add a free space cache checker to fsck
...if (ret)
+ goto out;
+
fprintf(stderr, "checking fs roots\n");
ret = check_fs_roots(root, &root_cache);
if (ret)
diff --git a/ctree.h b/ctree.h
index 702de2c..67fa650 100644
--- a/ctree.h
+++ b/ctree.h
@@ -28,6 +28,7 @@
struct btrfs_root;
struct btrfs_trans_handle;
+struct btrfs_free_space_ctl;
#define BTRFS_MAGIC 0x4D5F53665248425F /* ascii _BHRfS_M, no null */
#define BTRFS_MAX_LEVEL 8
@@ -268,6 +269,15 @@ struct btrfs_chunk {
/* additional stripes go here */
} __attribute__ ((__packed__));
+#define BTRFS_FREE_SPACE_EXTENT 1
+#define BTRFS_FREE_SPACE_BITMAP 2
+
+struct btrfs_f...
2013 Mar 15
0
[PATCH] Btrfs: add some free space cache tests
...* Checks to see if the given range is in the free space cache. This is really
+ * just used to check the absence of space, so if there is free space in the
+ * range at all we will return 1.
+ */
+static int check_exists(struct btrfs_block_group_cache *cache, u64 offset,
+ u64 bytes)
+{
+ struct btrfs_free_space_ctl *ctl = cache->free_space_ctl;
+ struct btrfs_free_space *info;
+ int ret = 0;
+
+ spin_lock(&ctl->tree_lock);
+ info = tree_search_offset(ctl, offset, 0, 0);
+ if (!info) {
+ info = tree_search_offset(ctl, offset_to_bitmap(ctl, offset),
+ 1, 0);
+ if (!info)
+ goto out;
+ }
+
+h...
2012 Jan 11
12
[PATCH 00/11] Btrfs: some patches for 3.3
The biggest one is a fix for fstrim, and there''s a fix for on-disk
free space cache. Others are small fixes and cleanups.
The last three have been sent weeks ago.
The patchset is also available in this repo:
git://repo.or.cz/linux-btrfs-devel.git for-chris
Note there''s a small confict with Al Viro''s vfs changes.
Li Zefan (11):
Btrfs: add pinned extents to
2013 Aug 14
23
[RFC] btrfs-progs: fix sparse checking and warnings
Hi gang,
I was a little surprised to see that patch go by recently
which fixed an endian bug. I went to see how sparse
checking looked and it was.. broken. I got it going
again in my Fedora environment.
Most of the patches are just cleanups, but there *were*
three real bugs lurking in all that sparse warning spam.
So I maintain that it''s worth our time to keep it going
and fix