| 1 |
python-btrfs v15, Apr 11, 2025 |
| 2 |
* Add the DEFRAG_RANGE ioctl |
| 3 |
* Add documentation for the COMPRESS_* values |
| 4 |
* Add logical_ino and logical_ino_v2 to the ioctl module as primary function |
| 5 |
names for calling the LOGICAL_INO and LOGICAL_INO_V2 ioctls, to more |
| 6 |
closely resemble the ioctl names. The current logical_to_ino* functions |
| 7 |
names will stay to provide backwards compatibility. |
| 8 |
* Fix a bunch of spelling issues, thanks Yaroslav Halchenko for the |
| 9 |
suggestion about using codespell. |
| 10 |
* Stuff: |
| 11 |
- Fix some bad whitespace in the code |
| 12 |
|
| 13 |
python-btrfs v14.1, May 7, 2024 |
| 14 |
* Fixes: |
| 15 |
- Prevent a "SyntaxWarning: invalid escape sequence" from being displayed |
| 16 |
when using recent Python versions. |
| 17 |
- Actually use long_description_content_type in setup.py |
| 18 |
|
| 19 |
python-btrfs v14, Apr 28, 2024 |
| 20 |
* Add Block Group Tree support. |
| 21 |
* Add a block_groups convenience function to the FileSystem class. |
| 22 |
* btrfs-search-metadata: Use the new FileSystem block_groups function, so |
| 23 |
that it also DTRT when the Block Group Tree is being used. |
| 24 |
* Fixes: |
| 25 |
- Do not apply the workaround to prevent bogus cross references when |
| 26 |
building documentation with Sphinx version >= 4. It's not needed any more |
| 27 |
since that version. Thanks Jorti, for the report. |
| 28 |
- Fix documentation typo in FeatureFlags: free_space_tree is in |
| 29 |
compat_ro_flags, not in incompat_flags. |
| 30 |
- examples/show_file_csum: Fix calculating the vaddr to use when searching |
| 31 |
for data in the example file. Thanks Cebtenzzre, for the fix! |
| 32 |
* Stuff: |
| 33 |
- Add a .flake8 file to set line length to 99 |
| 34 |
- Add .readthedocs.yaml to fix building html docs at readthedocs.org |
| 35 |
|
| 36 |
python-btrfs v13, Apr 26, 2021 |
| 37 |
* Add new profiles RAID1C3 and RAID1C4. Thanks, Marmotte. |
| 38 |
* Update setup.py so that the package description is more compact and not |
| 39 |
rejected by pypi. |
| 40 |
* Update setup.py so that the example programs in bin/ are included in the |
| 41 |
pypi upload. Thanks, hexa-. |
| 42 |
* Some small documentation fixes and improvements. Thanks, endolith. |
| 43 |
|
| 44 |
python-btrfs v12, Oct 13, 2020 |
| 45 |
* Data structures: RootRef, OrphanItem |
| 46 |
* Add a new useful program for looking up btrfs metadata, |
| 47 |
btrfs-search-metadata, and add a man page for it. |
| 48 |
* Add a recursive object printer using the str() function of objects, |
| 49 |
as an alternative to the existing pretty printer which dumps full |
| 50 |
objects. |
| 51 |
* Add the parse_tree_name function in utils, which can convert tree |
| 52 |
names to their number. E.g. 'FS_TREE' -> 5. |
| 53 |
* Add parse_key_string in utils, which parses a metadata item key |
| 54 |
string to a Key object. E.g. '(535 EXTENT_DATA 0)' -> Key(535, 108, |
| 55 |
0). |
| 56 |
* Add a search function to the FileSystem object, to make it a bit |
| 57 |
simpler to use the search ioctl when already having a FileSystem |
| 58 |
object in hands. |
| 59 |
* Add more useful information to the README of the project. It was way |
| 60 |
too terse and unhelpful. |
| 61 |
* Allow setting the env.mounts option for the munin plugin, so that we |
| 62 |
can 1) limit what filesystems are included and 2) influence the |
| 63 |
paths shown in the graph title. |
| 64 |
* Fixes: |
| 65 |
- Fix an unfortunate crash because of a stray underscore in the code |
| 66 |
of MetaDataItem. |
| 67 |
- Actually use the data_metadata_ratio argument for |
| 68 |
btrfs-space-calculator. The option was silently ignored. |
| 69 |
- Fix a crash in btrfs-space-calculator when using raid5. |
| 70 |
- Require at least one disk size for btrfs-space-calculator, since |
| 71 |
without any disk sizes, executing the program is meaningless. |
| 72 |
- Add a centralized way to store the library version number. After |
| 73 |
releasing v11, I found out the documentation still showed v10. |
| 74 |
- Fix the field order of corruption_errs and generation_errs in |
| 75 |
DevStats in the ioctl module. The two numbers were swapped. |
| 76 |
- Fix arithmetic behaviour of metadata item key values on underflow |
| 77 |
or overflow of the 136 bit key space. |
| 78 |
* Examples added: |
| 79 |
- show_subvolumes: Show how to use the RootRef metadata item to |
| 80 |
construct path names of the locations of subvolumes in the |
| 81 |
filesystem. |
| 82 |
* Examples removed: |
| 83 |
- block_group_search_timing |
| 84 |
* Examples removed, which are replaced by the btrfs-search-metadata |
| 85 |
program: |
| 86 |
- dump_tree, show_block_group_contents, |
| 87 |
show_block_group_free_space_extents, show_block_groups, |
| 88 |
show_chunk_tree_keys, show_dev_extents, show_directory_contents, |
| 89 |
show_extent_tree_keys, show_file, show_file_by_inode, |
| 90 |
show_tree_keys |
| 91 |
* Various small documentation and bug fixes. |
| 92 |
|
| 93 |
python-btrfs v11, Feb 28, 2019 |
| 94 |
* Promote some useful examples to proper programs, and add a man page for |
| 95 |
them. Distro package maintainers can ship these in /usr/bin. |
| 96 |
- btrfs-usage-report |
| 97 |
- btrfs-balance-least-used |
| 98 |
- btrfs-space-calculator |
| 99 |
- btrfs-orphan-cleaner-progress |
| 100 |
* Add TEMPORARY_ITEM_KEY and PERSISTENT_ITEM_KEY, which have replaced |
| 101 |
BALANCE_ITEM_KEY and DEV_STATS_KEY in kernel code a while ago. |
| 102 |
* Various small documentation and bug fixes. |
| 103 |
|
| 104 |
python-btrfs v10, Jan 18, 2019 |
| 105 |
* Switch to LGPL-3.0 license. |
| 106 |
* Add reference documentation to all code, using sphinx autodoc. An |
| 107 |
online version of the result in html format is available at: |
| 108 |
https://python-btrfs.readthedocs.io/en/latest/btrfs.html |
| 109 |
* All parts of the code that are covered by reference documentation |
| 110 |
are now considered to be the public API of the library. Effort will |
| 111 |
be done to not break this API in the future. |
| 112 |
* The FileSystem class now provides a context manager, to help prevent |
| 113 |
leaking the open file descriptor used internally. |
| 114 |
* The mounted_filesystems function in btrfs.utils module has been |
| 115 |
replaced by mounted_filesystem_paths. It is the responsibility of |
| 116 |
the caller to create the FileSystem objects for these paths and use |
| 117 |
the new context manager while doing do. |
| 118 |
* Add the fs_usage module, containing the FsUsage class, providing |
| 119 |
detailed usage reporting for a filesystem. This code replaces old |
| 120 |
similar functions, which were incomplete and buggy. |
| 121 |
* Adapt munin and nagios plugins to use the new FsUsage object. |
| 122 |
* IOCTLs: IOC_SYNC, FIDEDUPERANGE, IOC_GET_FEATURES |
| 123 |
* Data structures: FreeSpaceInfo, FreeSpaceExtent, FreeSpaceBitmap. |
| 124 |
* Introduce ItemNotFoundError, currently only raised by the block |
| 125 |
group lookup function in FileSystem. It inherits from IndexError for |
| 126 |
backwards compatibility. |
| 127 |
* Many small changes to improve the object pretty printer. |
| 128 |
* Fixes: |
| 129 |
- By default the maximum amount of items generated by a single call |
| 130 |
to search or search_v2 would be limited to 2^32-1. Fix this, so |
| 131 |
it's unlimited. The search functions return an iterator and call |
| 132 |
the search ioctl of the linux kernel multiple times internally. |
| 133 |
* Examples added: |
| 134 |
- A new show_usage, which shows information from the new usage |
| 135 |
reporting. |
| 136 |
- space_calculator: Offline usable space calculator, based on disk |
| 137 |
sizes and profiles provided on the command line. |
| 138 |
- file_dedupe_range: Example about using the deduplication ioctl. |
| 139 |
|
| 140 |
python-btrfs v9.1, Okt 22, 2018 |
| 141 |
* Fix compatibility with Python 3.7, which breaks the struct module API. |
| 142 |
* Change the bad free space fragmentation example to use a minimal score to |
| 143 |
filter output. The default value (250) now causes only displaying block |
| 144 |
groups that look really suspicious. |
| 145 |
|
| 146 |
python-btrfs v9, Nov 23 2017 |
| 147 |
* IOCTLs: IOC_SET_RECEIVED_SUBVOL, IOC_LOGICAL_INO_V2 |
| 148 |
* Add crc32c checksum function for data, thanks Nikolay Borisov |
| 149 |
* Recognize zstd compression type |
| 150 |
* Add a tree object pretty printer to dump data for any tree item |
| 151 |
* Examples added: |
| 152 |
- Show default subvolume id |
| 153 |
- Lookup a block checksum in the checksum tree |
| 154 |
- Determine bad free space fragmentation score for block groups |
| 155 |
- Set the received_uuid e.a. of a subvolume |
| 156 |
- Dump an entire metadata tree using the pretty printer |
| 157 |
* Fixes: |
| 158 |
- crc32c: add implicit seed truncation to 32 bits value |
| 159 |
* Small fixes and cosmetic changes |
| 160 |
|
| 161 |
python-btrfs v8, Jul 18 2017 |
| 162 |
* Easier handling of multiple appended data structures of the dir item and |
| 163 |
inode ref families. (not backwards compatible!) |
| 164 |
* Don't keep metadata page transid value when retrieving a BlockGroupItem. |
| 165 |
This was introduced in v4, but it's not technically correct. |
| 166 |
* Improve architecture dependent ioctl number handling. |
| 167 |
* Examples added: |
| 168 |
- Do a custom sorted btrfs balance, working from the least used block |
| 169 |
group to the most used, stopping at some usage value. |
| 170 |
- Calculate an inode extref hash from an inode number and file name. |
| 171 |
* Fixes: |
| 172 |
- Another unfortunate typo in __str__ methods of an object |
| 173 |
|
| 174 |
python-btrfs v7, May 28 2017 |
| 175 |
* Also unpack bitmaps when showing the free space tree |
| 176 |
* Fixes: |
| 177 |
- A few unfortunate typos in __str__ methods of objects |
| 178 |
* Examples added: |
| 179 |
- Show background subvolume removal progress. |
| 180 |
- Show metadata tree sizes in bytes and amount of tree blocks. |
| 181 |
- Show file info by tree and inode number |
| 182 |
|
| 183 |
python-btrfs v6, Mar 24 2017 |
| 184 |
* Only Python 3 supported from now on |
| 185 |
* IOCTLs: INO_LOOKUP, LOGICAL_INO, TREE_SEARCH_V2, IOC_BALANCE_V2, |
| 186 |
IOC_BALANCE_CTL, BALANCE_PROGRESS |
| 187 |
* Data structures: InodeRef, DirItem, DirIndex, XAttrItem, |
| 188 |
FileExtentItem, InodeExtref |
| 189 |
* Add a helper to retrieve free space tree extents |
| 190 |
* Check device error counters in the nagios plugin |
| 191 |
* Fixes: |
| 192 |
- Not loading backreferences for extents was broken |
| 193 |
- Handle IOCTL differences for different architectures |
| 194 |
* Examples added: |
| 195 |
- Show directory contents (both the index and namehash list) |
| 196 |
- Try to show a filename for data extents |
| 197 |
- Show file information (inode, xattrs, etc, and list of extents) |
| 198 |
- Show subvolumes |
| 199 |
|
| 200 |
python-btrfs v5, Jan 14 2017 |
| 201 |
* Revamp and fix loading of extent backreferences. |
| 202 |
* Explode when detecting a non x86_64 arch. |
| 203 |
* Add a crc32c implementation and example script to create |
| 204 |
a dir_item offset hash. |
| 205 |
|
| 206 |
python-btrfs v4, Dec 18 2016 |
| 207 |
* Bump/inverse versioning, there will never be a v1.0, just keep |
| 208 |
developing and releasing. \:D/ |
| 209 |
* IOCTLs: LOGICAL_INO |
| 210 |
* New datastructures: InodeItem, RootItem, DiskKey, TimeSpec |
| 211 |
* Add all constants to pretty print tree keys |
| 212 |
* Behaviour change: don't load extent refs by default |
| 213 |
* Keep transid value when retrieving a BlockGroupItem |
| 214 |
* Known issue: |
| 215 |
- SHARED_BLOCK_REF and TREE_BLOCK_REF are missing in extent refs |
| 216 |
|
| 217 |
python-btrfs 0.3, Nov 15 2016 |
| 218 |
* Showing the contents of metadata block groups |
| 219 |
* Renamed datastructures: DevItem, BlockGroupItem, ExtentItem |
| 220 |
* New datastructures: TreeBlockInfo, MetaDataItem, TreeBlockRef, |
| 221 |
SharedBlockRef, DevStats |
| 222 |
* IOCTLs: IOC_GET_DEV_STATS |
| 223 |
* Fixes: |
| 224 |
- Python 3 compatibility, again |
| 225 |
|
| 226 |
python-btrfs 0.2, Jun 28 2016 |
| 227 |
* Datastructures: DevExtent |
| 228 |
* Python 3 compatibility |
| 229 |
* Utils: lookup total filesystem usage (incl. unallocatable space) |
| 230 |
* Example nagios nrpe monitoring plugin |
| 231 |
* Fixes: |
| 232 |
- Optimize block group search |
| 233 |
|
| 234 |
python-btrfs 0.1, Jun 21 2016 |
| 235 |
* IOCTLs: IOC_SPACE_INFO, IOC_TREE_SEARCH, IOC_FS_INFO, IOC_DEV_INFO |
| 236 |
* Datastructures: Device (dev_item), Chunk, Stripe, BlockGroup, |
| 237 |
Extent, ExtentDataRef, SharedDataRef |
| 238 |
* btrfs.FileSystem main entry point for usage |
| 239 |
* Handing of the search Key (objectid, type, offset) |
| 240 |
* Utils: pretty printing amounts of bytes and block group / |
| 241 |
chunk types and profiles (like, MetaData, RAID1 etc...), |
| 242 |
determine wasted (unallocatable) space for RAID0, RAID1 |
| 243 |
* Example snippets using all functionality |
| 244 |
* Example munin monitoring plugin |