From: Martin Steigerwald <Martin@lichtvoll.de>
To: linux-xfs@oss.sgi.com
Subject: Re: write back cache and barriers
Date: Sun, 6 Aug 2006 11:00:35 +0200 [thread overview]
Message-ID: <200608061100.36508.Martin@lichtvoll.de> (raw)
In-Reply-To: <44CC2D1A.3060805@sandeen.net>
Am Sonntag 30 Juli 2006 05:52 schrieb Eric Sandeen:
> > If I try mounting a xfs filesystem I get a message like "barriers are
> > not supported by this device" but if I mount a ext3 or a reiserfs
> > filesystem respectively with options barrier=1 and barrier=flush they
> > don't complain. If I mount the reiserfs I explicity get a message
> > like "using barriers". So who tells the truth ??
>
> I don't see ext3 or reiser actually checking whether the underlying
> device supports barriers. xfs does, in xfs_mountfs_check_barriers().
Hello Eric,
for my article I looked at the source code of those. It seems that journal
block device tests wether barriers work
commit.c: if (ret == -EOPNOTSUPP && barrier_done) {
commit.c: "JBD: barrier-based sync failed on %s - "
commit.c: "disabling barriers\n",
Also reiserfs 3 seems to deactivate barriers if not avaible (journal.c)
if (reiserfs_barrier_flush(p_s_sb)) {
int ret;
lock_buffer(journal->j_header_bh);
ret = submit_barrier_buffer(journal->j_header_bh);
if (ret == -EOPNOTSUPP) {
set_buffer_uptodate(journal->j_header_bh);
disable_barrier(p_s_sb);
goto sync;
}
wait_on_buffer(journal->j_header_bh);
check_barrier_completion(p_s_sb,
journal->j_header_bh);
} else {
(both sources from kernel 2.6.17.7)
Regards,
--
Martin 'Helios' Steigerwald - http://www.Lichtvoll.de
GPG: 03B0 0D6C 0040 0710 4AFA B82F 991B EAAC A599 84C7
next prev parent reply other threads:[~2006-08-06 9:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-28 19:45 write back cache and barriers calembour
2006-07-30 3:52 ` Eric Sandeen
2006-08-01 11:30 ` calembour
2006-08-06 9:00 ` Martin Steigerwald [this message]
2006-08-07 2:31 ` Eric Sandeen
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=200608061100.36508.Martin@lichtvoll.de \
--to=martin@lichtvoll.de \
--cc=linux-xfs@oss.sgi.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