All of lore.kernel.org
 help / color / mirror / Atom feed
From: Austin S Hemmelgarn <ahferroin7@gmail.com>
To: Aastha Mehta <aasthakm@gmail.com>,
	linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: question regarding caching
Date: Tue, 31 Dec 2013 13:27:26 -0500	[thread overview]
Message-ID: <52C30C8E.9020103@gmail.com> (raw)
In-Reply-To: <CAEx9m44ZiJLqTO1_G_rVfn+csD7_pOguEdiAjsvr3uPzna+mFA@mail.gmail.com>

On 12/30/2013 09:24 PM, Aastha Mehta wrote:
> Hello,
> 
> I have some questions regarding caching in BTRFS. When a file
> system is unmounted and mounted again, would all the previously
> cached content be removed from the cache after flushing to disk?
> After remounting, would the initial requests always be fetched from
> the disk?
> 
> Rather than a local disk, I have a remote device to which my IO 
> requests are sent and from which the data is fetched. I need
> certain data to be fetched from the remote device after a remount.
> But somehow I do not see any request appearing at the device. I
> even tried to do drop_caches after remounting the file system, but
> that does not seem to help.
> 
> I guess my problem is not related to BTRFS, but since I am working 
> with BTRFS, I wanted to ask here for help. Could any one tell me
> how I can ensure that requests are fetched from the (remote)
> device, especially after file system remount, without having to
> use drop_caches?
> 
> Please let me know if I described the problem too vaguely and
> should give some more details.
The data is probably still cached in the block layer, so after
unmounting, you could try 'echo 1 > /proc/sys/vm/drop_caches' before
mounting again, but make sure to run sync right before doing that,
otherwise you might lose data.

  parent reply	other threads:[~2013-12-31 18:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-31  2:24 question regarding caching Aastha Mehta
2013-12-31  3:15 ` Kai Krakow
2013-12-31 17:02   ` Alex Elsayed
2013-12-31 18:27 ` Austin S Hemmelgarn [this message]
2014-01-03  8:39   ` Sander
2014-01-03 12:12     ` Austin S Hemmelgarn
2014-01-07 14:50       ` Aastha Mehta

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=52C30C8E.9020103@gmail.com \
    --to=ahferroin7@gmail.com \
    --cc=aasthakm@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.