From: Andreas Dilger <adilger@clusterfs.com>
To: Jim Lawson <jim+linux-kernel@jimlawson.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [Q] How to flush disk cache w/read-only filesystem w/o unmount&remount? (shared SAN filesystem)
Date: Tue, 5 Nov 2002 08:42:18 -0700 [thread overview]
Message-ID: <20021105084218.A15258@munet-d.enel.ucalgary.ca> (raw)
In-Reply-To: <Pine.LNX.4.44.0211051014110.24422-100000@infocalypse.jimlawson.org>; from jim+linux-kernel@jimlawson.org on Tue, Nov 05, 2002 at 10:18:11AM -0500
On Nov 05, 2002 10:18 -0500, Jim Lawson wrote:
> I'm looking for a way to flush or invalidate the cache on the block
> device/filesystem, so that the system is forced to go all the way to the
> disk. Unmounting and remounting would accomplish this, of course, but
> that's tough to do in production.
>
> I've tried blockdev --flushbufs, which appears to do a BLKFLSBUF, but that
> seems to be equivalent to "sync" - just pushes the dirty buffers to disk,
> which doesn't help me.
>
> Looking in fs/dcache.c, I see shrink_dcache_sb(struct super_block *),
> which *might* do what I want, but there doesn't seem to be any way to call
> that from user-land. And that probably just updates the dentries - I
> don't know if that has any effect on the file data.
You may be in luck - we likely need to have an ioctl to do this from
e2fsck because the ext3 htree repacking of bad directories is causing
a bunch of problems. In theory, the startup scripts should reboot the
system in this case, but there have also been cases reported where
people ran "e2fsck -D" on an ro-mounted root and then read-write mounted
it again.
Cheers, Andreas
--
Andreas Dilger \ "If a man ate a pound of pasta and a pound of antipasto,
\ would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/ -- Dogbert
next prev parent reply other threads:[~2002-11-05 15:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-05 15:18 Jim Lawson
2002-11-05 15:42 ` Andreas Dilger [this message]
2002-11-06 4:41 ` Anton Blanchard
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=20021105084218.A15258@munet-d.enel.ucalgary.ca \
--to=adilger@clusterfs.com \
--cc=jim+linux-kernel@jimlawson.org \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®