[Qemu-block] [PATCH v5 12/42] block: Use bdrv_filtered_rw* where obvious

2019-06-12 Thread Max Reitz
Places that use patterns like if (bs->drv->is_filter && bs->file) { ... something about bs->file->bs ... } should be BlockDriverState *filtered = bdrv_filtered_rw_bs(bs); if (filtered) { ... something about @filtered ... } instead. Signed-off-by: Max Reitz

Re: [Qemu-block] [PATCH v5 12/42] block: Use bdrv_filtered_rw* where obvious

2019-06-13 Thread Vladimir Sementsov-Ogievskiy
13.06.2019 1:09, Max Reitz wrote: > Places that use patterns like > > if (bs->drv->is_filter && bs->file) { > ... something about bs->file->bs ... > } > > should be > > BlockDriverState *filtered = bdrv_filtered_rw_bs(bs); > if (filtered) { > ... something a