[Ocfs2-tools-devel] [PATCH 06/13] libocfs2: Allow a global nocache flag on io_channels.
Sunil Mushran
sunil.mushran at oracle.com
Tue Jun 2 17:50:09 PDT 2009
Joel Becker wrote:
> We've added _nocache() versions of the I/O functions so that smart
> callers can specify when certain I/Os should not pollute the I/O cache.
> However, not all code is smart. Rather than teach
> ocfs2_file_read/write() to pass another nocache argument, let's give I/O
> channels the knowledge to skip caching.
>
> The io_set_nocache() function will set or clear a nocache flag on the
> channel. While set, the channel will use the _nocache() functions for
> I/O (assuming a cache is there). This preserves the qualities of the
> cache - it's always up to date - but will not pollute it with new
> blocks. When finished, the caller can io_set_nocache(channel, false)
> and return to using the cache.
>
> Signed-off-by: Joel Becker <joel.becker at oracle.com>
>
Signed-off-by: Sunil Mushran <sunil.mushran at oracle.com>
More information about the Ocfs2-tools-devel
mailing list