search for: extent_type

Displaying 8 results from an estimated 8 matches for "extent_type".

2009 Nov 12
0
[PATCH 03/12] Btrfs: Rewrite btrfs_drop_extents
...em 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; - btrfs_release_path(root, path); ret = btrfs_lookup_file_extent(trans, root, path,...
2020 Aug 10
2
[PATCH nbdkit] python: Allow extents to return any iterable (which includes lists).
...F (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 return an iterable of 3-tuples"); + P...
2020 Aug 10
5
[PATCH nbdkit] python: Implement can_extents + extents.
...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 = PyTuple_GetItem (t, 0); + py_length = PyT...
2020 Aug 10
0
Re: [PATCH nbdkit] python: Implement can_extents + extents.
...t 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 = PyTupl...
2008 Oct 27
0
[PATCH 3/4] update nodatacow code
...locking = 1; - /* if no item found, the extent is referenced by other snapshot */ - ret = btrfs_search_slot(NULL, old_root, key, path, 0, 0); - if (ret) - goto out; - - eb = path->nodes[0]; - item = btrfs_item_ptr(eb, path->slots[0], - struct btrfs_file_extent_item); - if (btrfs_file_extent_type(eb, item) != BTRFS_FILE_EXTENT_REG || - btrfs_file_extent_disk_bytenr(eb, item) != bytenr) { - ret = 1; - goto out; - } - - for (level = BTRFS_MAX_LEVEL - 1; level >= -1; level--) { - if (level >= 0) { - eb = path->nodes[level]; - if (!eb) - continue; - extent_start = eb-&g...
2020 Aug 10
0
Re: [PATCH nbdkit] python: Implement can_extents + extents.
...t 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 = PyTupl...
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
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