linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Rob Harris <rob.harris@gmail.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: Refreshing after OOB file update?
Date: Thu, 28 Aug 2014 19:32:37 -0400	[thread overview]
Message-ID: <20140828233237.GA31174@thunk.org> (raw)
In-Reply-To: <53FF3E90.1060200@gmail.com>

On Thu, Aug 28, 2014 at 10:37:04AM -0400, Rob Harris wrote:
> 
> This tells me (probably naively) that the kernel is caching the old file
> contents.

Yes, that's what the page cache is all about.

> Is there a way for me to tell the file system that something out-of-band
> change a file contents and to force a re-read from the disk?

Have your userspace program do an O_DIRECT read.  That will discard
the page cache and do a direct read from the disk.

Cheers,

							- Ted

      reply	other threads:[~2014-08-28 23:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-28 14:37 Refreshing after OOB file update? Rob Harris
2014-08-28 23:32 ` Theodore Ts'o [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140828233237.GA31174@thunk.org \
    --to=tytso@mit.edu \
    --cc=linux-ext4@vger.kernel.org \
    --cc=rob.harris@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).