• Andreas Rohner's avatar
    nilfs2: implementation of NILFS_IOCTL_SET_SUINFO ioctl · 2cc88f3a
    Andreas Rohner authored
    With this ioctl the segment usage entries in the SUFILE can be updated
    from userspace.
    
    This is useful, because it allows the userspace GC to modify and update
    segment usage entries for specific segments, which enables it to avoid
    unnecessary write operations.
    
    If a segment needs to be cleaned, but there is no or very little
    reclaimable space in it, the cleaning operation basically degrades to a
    useless moving operation.  In the end the only thing that changes is the
    location of the data and a timestamp in the segment usage information.
    With this ioctl the GC can skip the cleaning and update the segment
    usage entries directly instead.
    
    This is basically a shortcut to cleaning the segment.  It is still
    necessary to read the segment summary information, but the writing of
    the live blocks can be skipped if it's not worth it.
    
    [konishi.ryusuke@lab.ntt.co.jp: add description of NILFS_IOCTL_SET_SUINFO ioctl]
    Signed-off-by: default avatarAndreas Rohner <andreas.rohner@gmx.net>
    Signed-off-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    2cc88f3a
ioctl.c 35.4 KB