Hello there,
I have a question about the behavior of lvmcache with respect to writes that are smaller than the cache chunk size into chunks that are not currently cached.

Given an lvmcache using writeback mode, 128KiB chunksize, and nothing currently cached.

When an application does a 4KiB write followed by an fsync, what reads/writes occur within lvmcache before the fsync is acknowledged?


Is it roughly:

1. The 128KiB cold chunk is read from the origin LV.
2. The 4KiB write is made into this chunk, and written to the cache LV.
3. Fsync acknowledged.

Or, does lvmcache avoid the read of the origin LV (step 1) by buffering the smaller-than-chunksize write in the cache LV somewhere?  Perhaps in some sort of dedicated journal for small writes.