Il 09/12/2013 13:58, Kevin Wolf ha scritto: > How is BlockLimits supposed with respect to inheritance of values > through the BDS tree?
I think right now the accessor wrappers for the various BlockLimits field sort that out. Of course this could be slow if the accessors end up in the fast path (but that's not different from what your series does already). > I tried looking at the code, but for example > bl.opt_transfer_length is only forwarded in raw, so for any other format > (or if you ever put a filter there) it simply doesn't work. That's correct. For example, for qcow2 the optimal transfer length could be the cluster size. Without benchmarking, I didn't complain about Peter's choice of leaving it zero. > I could initialise a new BlockLimits.opt_mem_align field in > bdrv_open_common() with the value of bs->file->bl.opt_mem_align, and in > bdrv_open_backing_file() change it to MAX(bs->bl.opt_mem_align, > bs->backing_hd->bl.opt_mem_align). The block driver could then in > bdrv_open() override the former, but never the latter. > > What would happen on bdrv_reopen(), specifically toggling O_DIRECT? The > values would have to change then. Yes. This also goes in favor of making wrappers handle the stacking of limits, at least for now. Paolo