Commit Graph

15 Commits

Author SHA1 Message Date
Tom Marshall d87de4e238 WIP: Add info command
This just reads the sysfs nodes and presents the information in a
convenient way.
2021-05-22 09:57:10 -07:00
Tom Marshall 9ff7a1ddaf Remove variable pblk and pbat sizes, optimize, and cleanup 2021-05-17 13:36:40 -07:00
Tom Marshall 2fab692cdf Implement cbd tune plus some cleanup and rearranging
Still need to implement cbd tune --repack.
2019-11-18 00:47:10 +01:00
Tom Marshall 8b08b0c2c1 Make detect zeros a runtime flag 2019-11-17 10:09:58 -08:00
Tom Marshall b169a0fbcc Add zone lazy init and do more cleanup
* Add lazy init logic to cb format.  Override with --full-init.
 * Make cbd check lazy init aware.
 * Fix up a bunch of size calculation errors.
 * Add pblk validity check in lbd_flush, lbd_read.
2019-11-16 18:39:03 +01:00
Tom Marshall c6fe92715c Implement mount options cache_pages and sync
Also fixup kernel arg parsing.
2019-11-14 19:12:41 +01:00
Tom Marshall 6e92d5071a Fix variable pblk len, cleanup, rearrange
This is tested with the performance profile and works.

Lots of cleanup and rearranging also.
2019-11-13 15:36:33 -08:00
Tom Marshall 8229ef90bd Make pblk len variable, add format profiles, and cleanup 2019-11-12 23:49:36 +01:00
Tom Marshall efc83e0dc2 Rename [pl]blk_alloc to [pl]blk_used
Also a bit of minor cleanup.
2019-11-12 14:57:06 +01:00
Tom Marshall ceb0eb3230 Make cbd check actually do a check and do some cleanup
* cbd check now works (ish).
 * Added full-check arg to cbd check, link with liblz4, libz.
 * Added libcbd/util.c with goodies like verbose, ask_user_bool.
 * Rework kernel side params, stats to separate from user space.
 * Lock kernel stats when updating.
 * Add lblk_used to stats.

... and probably some other forgotten things.
2019-11-11 20:48:46 +01:00
Tom Marshall d7fb50911b Start implementing stats
Just pblks allocated for now.

Also update device layout info in README.
2019-11-04 12:25:54 -08:00
Tom Marshall f37155f527 Add flags to header
Initial flag definition includes dirty flag.

Also remove unused pblk_read().

Also add pbat-len arg to format.
2019-11-04 11:36:12 -08:00
Tom Marshall 164a09b9aa Add zlib support
* New args to cbd format.
 * HAVE_* -> COMPRESS_HAVE_*.
 * Verify header params algorithm and compression.
 * Move percpu alloc to lbdcache.
 * Alloc percpu data in lbdcache_ctr, free in lbdcache_dtr.
2019-10-31 11:09:03 -07:00
Tom Marshall 07f4221a5f Fix a bunch of things
* Fix command line handling.
* Move option/parameter validation to libcbd.
* Make resize argument the logical size.
* Make blkdev_pblk_* take dm_compress instead of block_device.
* Reinstate dm_compress.io_failed.
* Other misc stuff.
2019-10-10 13:27:37 -07:00
Tom Marshall 2e18584af3 Initial working version
Slow but seems functional.
2019-10-09 11:04:40 -07:00