Commit Graph

15 Commits

Author SHA1 Message Date
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 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 66eeec39f5 Add error flag to cbd_params, set it on write error 2019-11-09 17:02:53 +01: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 b8395c8a83 Alloc compress state using vmalloc 2019-11-03 09:00:28 -08:00
Tom Marshall 5be74b3346 Make pblk_read/write take block_device, not cbd_params 2019-11-02 08:11:12 -07:00
Tom Marshall f1513f8cb3 pbat_write tweaks
* Rename pblk_endio to pblk_write_endio.
 * Unlock pages last in pblk_write_endio.
 * Do page ops when prepare fails.
 * Ditch header guard.
2019-11-02 08:00:37 -07:00
Tom Marshall 7fbf77b1f3 Revert "Add md5 for debugging"
This reverts commit 351e43b953.
2019-11-02 07:54:02 -07:00
Tom Marshall ee7eacd4a6 First really working version 2019-11-01 14:41:11 -07:00
Tom Marshall eeafc209a5 Use per-cpu lz4 state 2019-10-30 12:34:21 -07:00
Tom Marshall 365cd0a13a Pass block_device to pblk_io_prepare 2019-10-30 10:24:11 -07:00
Tom Marshall 351e43b953 Add md5 for debugging 2019-10-25 05:56:20 -07:00
Tom Marshall 446a4811f6 More improvements, but still failing to clone linux 2019-10-24 13:02:03 -07:00
Tom Marshall 495d191d16 checkpoint: Mostly working
This seems to work except for I/O timing.  Reads are sync and
writes are async, so this sequence fails:
  - Object x flushes
  - Object x is reused as y
  - Another object is taken as x
  - New object x reads
  -> Stale data is read

Two potential solutions from here:

1. Implement async reads.

2. Hold ref to object until write completes.

(1) is complicated, but more correct.  Writes may stay in buffers for
quite some time (typically 5 seconds), during which time the dm-compress
object cannot be released.
2019-10-21 19:39:27 -07:00