Commit Graph

50 Commits

Author SHA1 Message Date
Tom Marshall cbf8777042 Reset objects outside cache lock
Also update TODO
2019-11-04 11:36:20 -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 141888fa98 Make pbat len variable
Also a bit of cleanup in lbd.c
2019-11-04 11:18:28 -08:00
Tom Marshall b8395c8a83 Alloc compress state using vmalloc 2019-11-03 09:00:28 -08:00
Tom Marshall 92fc5158e2 Remove percpu comment 2019-11-03 08:31:13 -08:00
Tom Marshall 309bb2d5ef Tidy up lblk percpu stuff 2019-11-03 08:28:13 -08:00
Tom Marshall f90c744a38 Update TODO 2019-11-03 08:18:24 -08:00
Tom Marshall 7a743a7e65 Rewrite lbatview_elem_realloc
* Only touch the data we need to touch.
 * Handle failure gracefully by reverting to old data.
 * Adjust libcbd check_one_lblk to ignore unused allocs.
2019-11-03 08:15:43 -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 11cc8a229e Use page vector and vmap for lbd 2019-11-02 07:49:09 -07:00
Tom Marshall 8e1630b08c Rearrange compress init 2019-11-01 15:08:34 -07:00
Tom Marshall ee7eacd4a6 First really working version 2019-11-01 14:41:11 -07:00
Tom Marshall 9a543670aa Fix writeback for lbatpage 2019-10-31 14:48:12 -07:00
Tom Marshall abdb25d31c Revert "DEBUG: pbat read verification"
This reverts commit 290b1873a0.
2019-10-31 14:45:40 -07:00
Tom Marshall db3d323d27 Finally fixed the pbat writeback issue 2019-10-31 14:43:22 -07: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 eeafc209a5 Use per-cpu lz4 state 2019-10-30 12:34:21 -07:00
Tom Marshall 290b1873a0 DEBUG: pbat read verification 2019-10-30 10:24:15 -07:00
Tom Marshall e1ec3567df Rearrange lbatview.pbat handling 2019-10-30 10:24:15 -07:00
Tom Marshall 8c7adec85d Remove compress.io_mutex 2019-10-30 10:24:15 -07:00
Tom Marshall e58d404811 Make val optional in arg parsing 2019-10-30 10:24:15 -07:00
Tom Marshall a2680aadf5 Use u64 for lblk 2019-10-30 10:24:15 -07:00
Tom Marshall 365cd0a13a Pass block_device to pblk_io_prepare 2019-10-30 10:24:11 -07:00
Tom Marshall 6ead93e4d0 NFC: rearrange local vars 2019-10-30 10:05:08 -07:00
Tom Marshall 0d3d79de10 Require that compression saves at least one pblk 2019-10-30 10:03:50 -07:00
Tom Marshall f8361d1e2e First fully working version 2019-10-25 10:03:00 -07:00
Tom Marshall 1b5b24a179 Use zone_for_pblk 2019-10-25 09:56:27 -07:00
Tom Marshall 6f3b20bb3a Add kmod headers to kmod deps 2019-10-25 09:55:35 -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
Tom Marshall 8ff29f0262 Rename [pl]blk_alloc to [pl]bat 2019-10-11 08:28:37 -07:00
Tom Marshall b80d80215b Implement bi-directional page alloc scanning 2019-10-10 19:40:00 -07:00
Tom Marshall c1ec406a00 memcmpz -> lblk_is_zeros 2019-10-10 15:13:15 -07:00
Tom Marshall 24401f9a68 WIP: Implement zone caches 2019-10-10 15:07:39 -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 36dec597ac Implement async writes 2019-10-10 09:23:34 -07:00
Tom Marshall 26152ce1ec Move compress_{alloc,free}_pages up for use by async I/O 2019-10-09 19:49:47 -07:00
Tom Marshall 7326fe2e14 Optimize lblk handling 2019-10-09 14:41:13 -07:00
Tom Marshall a5cc0f2e81 Rename zone_{pblk,lblk}* to {pblk,lblk}* 2019-10-09 13:36:26 -07:00
Tom Marshall 4499785fbb Refactor blkdev_pblk_* in preparation for async writes 2019-10-09 13:19:21 -07:00
Tom Marshall b675fe573a Pass buffer to elem rather than alloc in lblk_alloc_elem_{get,put}
This will assist in {read,writ}ing only the needed lblk alloc pages.
2019-10-09 11:57:57 -07:00
Tom Marshall 6dfb8997a8 libcbd/check.c: Rename alloc to elem 2019-10-09 11:45:30 -07:00
Tom Marshall f87e897207 Rename dm_compress.lblk_alloc to lblk_alloc_elem 2019-10-09 11:41:29 -07:00
Tom Marshall 08b94b6363 Add a .gitignore
Most of this can be removed when we build kernel modules out-of-tree.
2019-10-09 11:35:16 -07:00
Tom Marshall 0ca9fc789f Rename some stuff and limit LBLK_SHIFT_MAX 2019-10-09 11:32:36 -07:00
Tom Marshall 2e18584af3 Initial working version
Slow but seems functional.
2019-10-09 11:04:40 -07:00
Tom Marshall 489bd7d028 Initial empty repository 2019-10-09 09:02:39 -07:00