Re: msync() behaviour broken for MS_ASYNC, revert patch?

From: Andrew Morton (akpm_at_osdl.org)
Date: 04/01/04

  • Next message: Andy Whitcroft: "Re: BUG_ON(!cpus_equal(cpumask, tmp));"
    Date:	Wed, 31 Mar 2004 16:30:55 -0800
    To: Linus Torvalds <torvalds@osdl.org>
    
    

    Linus Torvalds <torvalds@osdl.org> wrote:
    >
    > I'd be perfectly happy with a set of file cache control operations,
    > including
    >
    > - start writeback in [a,b]
    > - wait for [a,b] stable
    > - and maybe "punch hole in [a,b]"

    Yup, there are a number of linux-specific fadvise() extensions we
    can/should be adding, including "start writeback on this byte range for
    flush" and "start writeback on this byte range for data integrity" and
    "wait on writeback of this byte range".

    Some of these are needed internally for the fs-AIO implementation, and also
    for an O_SYNC which only writes the pages which the writer wrote. It's
    pretty simple, and it'll be happening.

    One wrinkle is that we'd need to add the start/end loff_t pair to the
    a_ops->writepages() prototype. But instead I intend to put the start/end
    info into struct writeback_control and pass it that way. It seems sleazy
    at first but when you think about it, it isn't. It provides forward and
    backward compatability, it recognises that it's just a hint and that
    filesystems can legitimately sync the whole file and it produces
    smaller+faster code.

    We might need a wait_on_page_writeback_range() a_op though.
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Andy Whitcroft: "Re: BUG_ON(!cpus_equal(cpumask, tmp));"