• Kiyoshi Ueda's avatar
    dm mpath: add start_io and nr_bytes to path selectors · 02ab823f
    Kiyoshi Ueda authored
    This patch makes two additions to the dm path selector interface for
    dynamic load balancers:
      o a new hook, start_io()
      o a new parameter 'nr_bytes' to select_path()/start_io()/end_io()
        to pass the size of the I/O
    
    start_io() is called when a target driver actually submits I/O
    to the selected path.
    Path selectors can use it to start accounting of the I/O.
    (e.g. counting the number of in-flight I/Os.)
    The start_io hook is based on the patch posted by Stefan Bader:
    https://www.redhat.com/archives/dm-devel/2005-October/msg00050.html
    
    
    
    nr_bytes, the size of the I/O, is so path selectors can take the
    size of the I/O into account when deciding which path to use.
    dm-service-time uses it to estimate service time, for example.
    (Added the nr_bytes member to dm_mpath_io instead of using existing
     details.bi_size, since request-based dm patch deletes it.)
    Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
    Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.c...
    02ab823f
dm-round-robin.c 4.56 KB