• Josef Bacik's avatar
    btrfs: track ordered bytes instead of just dio ordered bytes · 5deb17e1
    Josef Bacik authored
    We track dio_bytes because the shrink delalloc code needs to know if we
    have more DIO in flight than we have normal buffered IO.  The reason for
    this is because we can't "flush" DIO, we have to just wait on the
    ordered extents to finish.
    
    However this is true of all ordered extents.  If we have more ordered
    space outstanding than dirty pages we should be waiting on ordered
    extents.  We already are ok on this front technically, because we always
    do a FLUSH_DELALLOC_WAIT loop, but I want to use the ordered counter in
    the preemptive flushing code as well, so change this to count all
    ordered bytes instead of just DIO ordered bytes.
    Reviewed-by: default avatarNikolay Borisov <nborisov@suse.com>
    Signed-off-by: default avatarJosef Bacik <josef@toxicpanda.com>
    Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
    5deb17e1
ctree.h 126 KB