Displaying 4 results from an estimated 4 matches for "btrfs_add_ordered_extent".
2008 Oct 27
0
[PATCH 3/4] update nodatacow code
...bytenr);
- if (!block_group || block_group->ro)
- goto not_found;
+ if (found_key.offset > cur_offset) {
+ extent_end = found_key.offset;
+ goto out_check;
+ }
- bytenr += btrfs_file_extent_offset(leaf, item);
- extent_num_bytes = min(end + 1, extent_end) - start;
- ret = btrfs_add_ordered_extent(inode, start, bytenr,
- extent_num_bytes, 1);
- if (ret) {
- err = ret;
- goto out;
+ fi = btrfs_item_ptr(leaf, path->slots[0],
+ struct btrfs_file_extent_item);
+ extent_type = btrfs_file_extent_type(leaf, fi);
+
+ if (extent_type == BTRFS_FILE_EXTENT_REG) {
+ struct btrfs...
2008 Sep 01
2
Transparent compression for Btrfs
Hi,
For a medium term project, I''m thinking of working on transparent compression
for Btrfs. Please give any hints and comments on how we would want to go
about this, the features we would like to have and some common pitfalls to
avoid.
Is looking at how it''s done in Reiser4, a good idea ? Can we allow the
compression algorithm be configurable on a per file basis, may be
2010 May 07
6
[PATCH 1/5] fs: allow short direct-io reads to be completed via buffered IO V2
V1->V2: Check to see if our current ppos is >= i_size after a short DIO read,
just in case it was actually a short read and we need to just return.
This is similar to what already happens in the write case. If we have a short
read while doing O_DIRECT, instead of just returning, fallthrough and try to
read the rest via buffered IO. BTRFS needs this because if we encounter a
compressed or
2010 Sep 03
0
[PATCH 1/2] btrfs: document where we use BUG_ON instead of error handling
...root->sectorsize, 0, alloc_hint,
(u64)-1, &ins, 1);
- BUG_ON(ret);
+ btrfs_fixable_bug_on(ret);
em = alloc_extent_map(GFP_NOFS);
em->start = start;
@@ -840,13 +840,13 @@ static noinline int cow_file_range(struct inode *inode,
cur_alloc_size = ins.offset;
ret = btrfs_add_ordered_extent(inode, start, ins.objectid,
ram_size, cur_alloc_size, 0);
- BUG_ON(ret);
+ btrfs_fixable_bug_on(ret);
if (root->root_key.objectid ==
BTRFS_DATA_RELOC_TREE_OBJECTID) {
ret = btrfs_reloc_clone_csums(inode, start,
cur_alloc_size);
- BUG_ON(ret);
+ btr...