All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: ext4 development <linux-ext4@vger.kernel.org>, Jan Kara <jack@suse.cz>
Subject: Re: barriers off by default?
Date: Thu, 15 May 2008 11:00:20 -0500	[thread overview]
Message-ID: <482C5E14.9030004@redhat.com> (raw)
In-Reply-To: <20080515144355.GB19325@atrey.karlin.mff.cuni.cz>

Jan Kara wrote:
>> As I look at my shiny new 500G disks with 32MB of cache, I find myself
>> wondering why the default for ext3 and ext4 is to have barriers disabled.
>>
>> This is a pretty dangerous default w.r.t. filesystem integrity on power
>> loss, no?
>   JFYI: SUSE kernel carries for ages a patch which changes this default.
> I'd be more than happy to drop it ;).
> 
> 								Honza

Did you ever send it upstream?  I'd ACK it :)

(I have a copy of it here... the fsync change seems sane too...)

@@ -85,7 +86,10 @@ int ext3_sync_file(struct file * file, s
                        .sync_mode = WB_SYNC_ALL,
                        .nr_to_write = 0, /* sys_fsync did this */
                };
+               journal_t *journal = EXT3_SB(inode->i_sb)->s_journal;
                ret = sync_inode(inode, &wbc);
+               if (journal && (journal->j_flags & JFS_BARRIER))
+                       blkdev_issue_flush(inode->i_sb->s_bdev, NULL);
        }
 out:

I assume we need that for some power-plug-pull scenarios ... in fact I
had just been meaning to do something similar after reading an old
thread on barriers.  reiserfs & xfs do this already in their sync paths.

Thanks,

-Eric

  reply	other threads:[~2008-05-15 16:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-12 15:56 barriers off by default? Eric Sandeen
2008-05-12 17:30 ` Eric A
2008-05-12 17:53   ` Eric Sandeen
     [not found]     ` <72c5d9a0805121150j58482bc6qd57a87089ce4414e@mail.gmail.com>
2008-05-12 18:51       ` Fwd: " Eric A
2008-05-12 19:00         ` Eric Sandeen
2008-05-12 19:11           ` Eric A
2008-05-12 19:15             ` Eric Sandeen
2008-05-15 14:43 ` Jan Kara
2008-05-15 16:00   ` Eric Sandeen [this message]
2008-05-15 16:21     ` Andreas Dilger
2008-05-15 18:34       ` Eric Sandeen
2008-05-15 20:44   ` Eric Sandeen
2008-05-16  0:21     ` Jan Kara
2008-05-16  0:58       ` Eric Sandeen
2008-05-17 17:38         ` Theodore Tso
2008-05-17 19:02           ` 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=482C5E14.9030004@redhat.com \
    --to=sandeen@redhat.com \
    --cc=jack@suse.cz \
    --cc=linux-ext4@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.