• Rafał Miłecki's avatar
    ubifs: Use dirty_writeback_interval value for wbuf timer · 1b7fc2c0
    Rafał Miłecki authored
    Right now wbuf timer has hardcoded timeouts and there is no place for
    manual adjustments. Some projects / cases many need that though. Few
    file systems allow doing that by respecting dirty_writeback_interval
    that can be set using sysctl (dirty_writeback_centisecs).
    
    Lowering dirty_writeback_interval could be some way of dealing with user
    space apps lacking proper fsyncs. This is definitely *not* a perfect
    solution but we don't have ideal (user space) world. There were already
    advanced discussions on this matter, mostly when ext4 was introduced and
    it wasn't behaving as ext3. Anyway, the final decision was to add some
    hacks to the ext4, as trying to fix whole user space or adding new API
    was pointless.
    
    We can't (and shouldn't?) just follow ext4. We can't e.g. sync on close
    as this would cause too many commits and flash wearing. On the other
    hand we still should allow some trade-off between -o sync and default
    wbuf timeout. Respecting dirty_writeback_interval should allow some sane
    cutomizations if used warily.
    Signed-off-by: default avatarRafał Miłecki <rafal@milecki.pl>
    Reviewed-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
    Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
    1b7fc2c0
io.c 33.4 KB