Displaying 14 results from an estimated 14 matches for "extent_offset".
2011 Jan 06
3
Offline Deduplication for Btrfs V2
Just a quick update, I''ve dropped the hashing stuff in favor of doing a memcmp
in the kernel to make sure the data is still the same. The thing that takes a
while is reading the data up from disk, so doing a memcmp of the entire buffer
isn''t that big of a deal, not to mention there''s a possiblity for malicious
users if there is a problem with the hashing algorithms we
2012 Sep 17
13
[PATCH 1/2 v3] Btrfs: use flag EXTENT_DEFRAG for snapshot-aware defrag
We''re going to use this flag EXTENT_DEFRAG to indicate which range
belongs to defragment so that we can implement snapshow-aware defrag:
We set the EXTENT_DEFRAG flag when dirtying the extents that need
defragmented, so later on writeback thread can differentiate between
normal writeback and writeback started by defragmentation.
This patch is used for the latter one.
Originally patch
2020 Aug 10
2
[PATCH nbdkit] python: Allow extents to return any iterable (which includes lists).
...hing which is iterable");
Py_DECREF (r);
return -1;
}
- for (i = 0; i < size; ++i) {
- PyObject *t, *py_offset, *py_length, *py_type;
+ size = 0;
+ while ((t = PyIter_Next (iter)) != NULL) {
+ PyObject *py_offset, *py_length, *py_type;
uint64_t extent_offset, extent_length;
uint32_t extent_type;
- t = PyList_GetItem (r, i);
+ size++;
+
if (!PyTuple_Check (t) || PyTuple_Size (t) != 3) {
- nbdkit_error ("extents method did not return a list of 3-tuples");
+ nbdkit_error ("extents method did not retur...
2020 Aug 10
5
[PATCH nbdkit] python: Implement can_extents + extents.
...e).
+ */
+ if (!PyList_Check (r)) {
+ nbdkit_error ("extents method did not return a list");
+ Py_DECREF (r);
+ return -1;
+ }
+
+ size = PyList_Size (r);
+ for (i = 0; i < size; ++i) {
+ PyObject *t, *py_offset, *py_length, *py_type;
+ uint64_t extent_offset, extent_length;
+ uint32_t extent_type;
+
+ t = PyList_GetItem (r, i);
+ if (!PyTuple_Check (t) || PyTuple_Size (t) != 3) {
+ nbdkit_error ("extents method did not return a list of 3-tuples");
+ Py_DECREF (r);
+ return -1;
+ }
+ py_offset = Py...
2020 Aug 10
0
Re: [PATCH nbdkit] python: Implement can_extents + extents.
...t; + nbdkit_error ("extents method did not return a list");
> + Py_DECREF (r);
> + return -1;
> + }
> +
> + size = PyList_Size (r);
> + for (i = 0; i < size; ++i) {
> + PyObject *t, *py_offset, *py_length, *py_type;
> + uint64_t extent_offset, extent_length;
> + uint32_t extent_type;
> +
> + t = PyList_GetItem (r, i);
> + if (!PyTuple_Check (t) || PyTuple_Size (t) != 3) {
> + nbdkit_error ("extents method did not return a list of 3-tuples");
> + Py_DECREF (r);
> + return...
2009 Nov 12
0
[PATCH 03/12] Btrfs: Rewrite btrfs_drop_extents
...*fi;
struct btrfs_path *path;
struct btrfs_key key;
- struct btrfs_file_extent_item old;
- int keep;
- int slot;
- int bookend;
- int found_type = 0;
- int found_extent;
- int found_inline;
+ struct btrfs_key new_key;
+ u64 search_start = start;
+ u64 disk_bytenr = 0;
+ u64 num_bytes = 0;
+ u64 extent_offset = 0;
+ u64 extent_end = 0;
+ int del_nr = 0;
+ int del_slot = 0;
+ int extent_type;
int recow;
int ret;
- inline_limit = 0;
if (drop_cache)
btrfs_drop_extent_cache(inode, start, end - 1, 0);
path = btrfs_alloc_path();
if (!path)
return -ENOMEM;
+
while (1) {
recow = 0;
- b...
2011 Jul 21
10
[PATCH v5 0/8] Btrfs scrub: print path to corrupted files and trigger nodatasum fixup
While testing raid-auto-repair patches I''m going to send out later, I just found
the very last bug in my current scrub patch series:
Changelog v4->v5:
- fixed a deadlock when fixup is taking longer while scrub is about to end
Original message follows:
------------------------
This patch set introduces two new features for scrub. They share the backref
iteration code which is the
2020 Aug 10
0
Re: [PATCH nbdkit] python: Implement can_extents + extents.
...t; + nbdkit_error ("extents method did not return a list");
> + Py_DECREF (r);
> + return -1;
> + }
> +
> + size = PyList_Size (r);
> + for (i = 0; i < size; ++i) {
> + PyObject *t, *py_offset, *py_length, *py_type;
> + uint64_t extent_offset, extent_length;
> + uint32_t extent_type;
> +
> + t = PyList_GetItem (r, i);
> + if (!PyTuple_Check (t) || PyTuple_Size (t) != 3) {
> + nbdkit_error ("extents method did not return a list of 3-tuples");
> + Py_DECREF (r);
> + return...
2011 Jan 05
52
Offline Deduplication for Btrfs
Here are patches to do offline deduplication for Btrfs. It works well for the
cases it''s expected to, I''m looking for feedback on the ioctl interface and
such, I''m well aware there are missing features for the userspace app (like
being able to set a different blocksize). If this interface is acceptable I
will flesh out the userspace app a little more, but I believe the
2010 Sep 03
0
[PATCH 1/2] btrfs: document where we use BUG_ON instead of error handling
...struct inode *inode, u64 start, u64 end,
}
ret = add_extent_mapping(em_tree, split);
- BUG_ON(ret);
+ btrfs_fixable_bug_on(ret);
free_extent_map(split);
split = NULL;
}
@@ -404,7 +404,7 @@ next_slot:
root->root_key.objectid,
new_key.objectid,
start - extent_offset);
- BUG_ON(ret);
+ btrfs_fixable_bug_on(ret);
*hint_byte = disk_bytenr;
}
key.offset = start;
@@ -479,7 +479,7 @@ next_slot:
root->root_key.objectid,
key.objectid, key.offset -
extent_offset);
- BUG_ON(ret);
+ btrfs_fixable_bug_on(ret);
inode_su...
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
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
2013 Aug 06
6
[PATCH 0/4] btrfs: out-of-band (aka offline) dedupe v4
Hi,
The following series of patches implements in btrfs an ioctl to do
out-of-band deduplication of file extents.
To be clear, this means that the file system is mounted and running, but the
dedupe is not done during file writes, but after the fact when some
userspace software initiates a dedupe.
The primary patch is loosely based off of one sent by Josef Bacik back
in January, 2011.
2011 Aug 15
9
[patch v2 0/9] btrfs: More error handling patches
Hi all -
The following 9 patches add more error handling to the btrfs code:
- Add btrfs_panic
- Catch locking failures in {set,clear}_extent_bit
- Push up set_extent_bit errors to callers
- Push up lock_extent errors to callers
- Push up clear_extent_bit errors to callers
- Push up unlock_extent errors to callers
- Make pin_down_extent return void
- Push up btrfs_pin_extent errors to