On 8/21/20 3:39 AM, Omar Sandoval wrote:
From: Omar Sandoval <osandov@xxxxxx> send_write() currently copies from the page cache to sctx->read_buf, and then from sctx->read_buf to sctx->send_buf. Similarly, send_hole() zeroes sctx->read_buf and then copies from sctx->read_buf to sctx->send_buf. However, if we write the TLV header manually, we can copy to sctx->send_buf directly and get rid of sctx->read_buf. Signed-off-by: Omar Sandoval <osandov@xxxxxx>
I couldn't figure out why you weren't just using TLV_ helper for this, but then I realized the len is the length of the data, so you need a special helper for the header. Just in case anybody else gets confused,
Reviewed-by: Josef Bacik <josef@xxxxxxxxxxxxxx> Thanks, Josef