{"push_id":2360894961,"size":1,"distinct_size":1,"ref":"refs/heads/sqlite-and-dnode-race-48","head":"5433c52e7d504de9ea311ff2092452545bc117a1","before":"9efea871123f52c20d7c31481916665e3f3d1766","commits":[{"sha":"5433c52e7d504de9ea311ff2092452545bc117a1","author":{"name":"Sean Doran","email":"9d920242a826588974ad0848b71a0c4c08979b01@use.net"},"message":"porting lundman's 4ca968ca867b89f47c45321e93deb2f5288c2020\n\nHandle compressed buffers in __dbuf_hold_impl()\n\nIn __dbuf_hold_impl(), if a buffer is currently syncing and is still\nreferenced from db_data, a copy is made in case it is dirtied again in\nthe txg.  Previously, the buffer for the copy was simply allocated with\narc_alloc_buf() which doesn't handle compressed or encrypted buffers\n(which are a special case of a compressed buffer).  The result was\ntypically an invalid memory access because the newly-allocated buffer\nwas of the uncompressed size.\n\nThis commit fixes the problem by handling the 2 compressed cases,\nencrypted and unencrypted, respectively, with arc_alloc_raw_buf() and\narc_alloc_compressed_buf().\n\nAlthough using the proper allocation functions fixes the invalid memory\naccess by allocating a buffer of the compressed size, another unrelated\nissue made it impossible to properly detect compressed buffers in the\nfirst place.  The header's compression flag was set to ZIO_COMPRESS_OFF\nin arc_write() when it was possible that an attached buffer was actually\ncompressed.  This commit adds logic to only set ZIO_COMPRESS_OFF in\nthe non-ZIO_RAW case which wil handle both cases of compressed buffers\n(encrypted or unencrypted).\n\nReviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>\nSigned-off-by: Tim Chase <tim@chase2k.com>","distinct":true,"url":"https://api.github.com/repos/rottegift/zfs/commits/5433c52e7d504de9ea311ff2092452545bc117a1"}]}
{"actor":{"display_login":"rottegift"}}