• Steven Whitehouse's avatar
    GFS2: O_(D)SYNC support for fallocate · 4442f2e0
    Steven Whitehouse authored
    Add sync of metadata after fallocate for O_SYNC files to ensure that we
    meet expectations for everything being on disk in this case.
    Unfortunately, the offset and len parameters are modified during the
    course of the fallocate function, so I've had to add a couple of new
    variables to call generic_write_sync() at the end.
    
    I know that potentially this will sync data as well within the range,
    but I think that is a fairly harmless side-effect overall, since we
    would not normally expect there to be any dirty data within the range in
    question.
    Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
    Cc: Christoph Hellwig <hch@infradead.org>
    Cc: Benjamin Marzinski <bmarzins@redhat.com>
    4442f2e0
file.c 25.5 KB