Displaying 3 results from an estimated 3 matches for "btrfs_free_space_entry".
2011 Mar 31
4
[PATCH] Btrfs: fix free space cache when there are pinned extents and clusters
...tent_bits(&BTRFS_I(inode)->io_tree, 0, i_size_read(inode) - 1,
0, &cached_state, GFP_NOFS);
+ /*
+ * When searching for pinned extents, we need to start at our start
+ * offset.
+ */
+ start = block_group->key.objectid;
+
/* Write out the extent entries */
do {
struct btrfs_free_space_entry *entry;
@@ -587,6 +622,8 @@ int btrfs_write_out_cache(struct btrfs_root *root,
unsigned long offset = 0;
unsigned long start_offset = 0;
+ next_page = false;
+
if (index == 0) {
start_offset = first_page_offset;
offset = start_offset;
@@ -598,7 +635,7 @@ int btrfs_write_out_cach...
2013 Apr 03
0
[PATCH] Btrfs-progs: add a free space cache checker to fsck
...ace_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_free_space_entry {
+ __le64 offset;
+ __le64 bytes;
+ u8 type;
+} __attribute__ ((__packed__));
+
struct btrfs_free_space_header {
struct btrfs_disk_key location;
__le64 generation;
@@ -866,6 +876,7 @@ struct btrfs_block_group_cache {
struct btrfs_key key;
struct btrfs_block_group_item item;
struct btrfs...
2011 Dec 28
13
fstrim on BTRFS
Hi!
With 3.2-rc4 (probably earlier), Ext4 seems to remember what areas it
trimmed:
merkaba:~> fstrim -v /boot
/boot: 224657408 bytes were trimmed
merkaba:~> fstrim -v /boot
/boot: 0 bytes were trimmed
But BTRFS does not:
merkaba:~> fstrim -v /
/: 4431613952 bytes were trimmed
merkaba:~> fstrim -v /
/: 4341846016 bytes were trimmed
Is it planned to add this feature to BTRFS