RE: fsync and journal_async_commit mount options

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I think I didn't explain myself well. 

My question is regarding the barrier=0/1 mount option. 
On the one hand, the "mount" man page says "This enables/disables the use of write barriers in the jbd code". From there I understand that this option changes the behaviour of journalling code only. But on the other hand, this option change the the behaviour of fsync()  (at least in case of ext4): the flush request is issued only if barrier mount option is 1.

Thanks,
Alexey
________________________________________
From: Theodore Ts'o [tytso@xxxxxxx]
Sent: Sunday, August 16, 2015 3:24 PM
To: Alexey Skidanov
Cc: linux-fsdevel@xxxxxxxxxxxxxxx; alexey.skidanov@xxxxxxxxx
Subject: Re: fsync and journal_async_commit mount options

On Sun, Aug 16, 2015 at 11:42:23AM +0000, Alexey Skidanov wrote:
> The barrier is a mount option imposing some ordering on journaling
> transactions - journaling content and journaling commit. So why the
> flush request is issued only if the journal ordering is imposed by
> barrier option?

The barrier option is on by default.  Users have to explicitly turn
off the barrier option using the nobarrier mount option.  The main
reason why you might want to turn off the flush request is if you have
a UPS and are confident that the you don't need to worry about power
drop.  (For example, if you have a data center with say, system or
rack level battery backups, plus a diesel generator, maybe you might
be willing make the engineering trade off to disable the barrier
option.)

I could imagine a scheme where if you had a mobile handset without a
removable battery, the handset manufacturer could implement a power
fail interrupt so that when the battery drops below 5 minutes worth of
runtime, the kernel shuts down the system cleanly which includes an
explicit flush before the power down.

Cheers,

                                        - Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux