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
|