All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marco Colombo <linux-lvm@esiway.net>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] fsync() and LVM
Date: Mon, 16 Mar 2009 00:31:55 +0100	[thread overview]
Message-ID: <49BD8FEB.4040506@esiway.net> (raw)
In-Reply-To: <7B7881568CF40E4388B615CD06F87B98098BDD@clara.maurer-it.com>

[Please forgive double-posting, I'm not sure my previous attempt
succeeded]
Dietmar Maurer wrote:
>>> Does that mean I should never use more than one device if I have
>>> applications depending on fsync (databases)?
>> It just means that write barriers won't get passed to the device.
>> This is only a problem if the devices have write caches.
> 
> But fsync is implemented using 'write barriers' - so fsync does not
> work?
> 
> After fsync, all data should be sent from the OS to the disk controller:
> 
> a.) this work perfectly using LVM?
> 
> b.) this does not work at all using LVM?
> 
> c.) it works when you use one single physical drive with LVM?
> 
> I am confused. The thread on the postfix list claims that it does not
> work at
> all?

Well, it's on the PostgreSQL list, not postfix. But it may affect postfix
as well. Quoting postfix documentation:

 Gory details: the Postfix mail queue requires that (1) the file system
 can rename a file to a near-by directory without changing the file's
 inode number, and that (2) mail is safely stored after fsync() of that
 file (not its parent directory) returns successfully, even when that
 file is renamed to a near-by directory at some later point in time.

If fsync() doen't work, point (2) is not fulfilled.


Please note: that on PostgreSQL list is not speculation. It comes from
measurements. Benchmarks show too high transaction rates, just as if
fsync() was disabled. The explanation (they provided) is that LVM does
not honor fsync().


By some reading I've done I'm not sure. Is blkdev_issue_flush() we're
talking about? Please see: http://lkml.org/lkml/2007/5/25/71
Is a LVM (well, device mapper) device still a "FLUSHABLE device" by
that definition? Apparently it's ok not to support BIO_RW_BARRIER, as
long as you support blkdev_issue_flush(). Has something changed since then?

How would you classify a LVM device? SAFE, FLUSHABLE, BARRIER or
something else (UNSAFE)?

.TM.

  reply	other threads:[~2009-03-15 23:33 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-13 17:46 [linux-lvm] fsync() and LVM Marco Colombo
2009-03-13 20:08 ` Stuart D. Gathman
2009-03-13 20:29   ` Ben Chobot
2009-03-13 20:38   ` Alasdair G Kergon
2009-03-14  3:16     ` Marco Colombo
2009-03-14  9:07     ` Dietmar Maurer
2009-03-14 14:31       ` Stuart D. Gathman
2009-03-15  0:51         ` Marco Colombo
2009-03-16 11:02           ` Charles Marcus
2009-03-16 11:05             ` Martin Schröder
2009-03-16 11:18               ` Charles Marcus
2009-03-16 11:25                 ` Dietmar Maurer
2009-03-16 14:36             ` Marco Colombo
2009-03-16 17:13               ` Stuart D. Gathman
2009-03-16 17:17           ` Stuart D. Gathman
2009-03-16 18:50             ` Les Mikesell
2009-03-16 19:36               ` Greg Freemyer
2009-03-16 19:55                 ` [linux-lvm] liblvm status question ben scott
2009-03-16 20:58                   ` Greg Freemyer
2009-03-17 10:38                     ` Bryn M. Reeves
2009-03-17 18:42                       ` ben scott
2009-03-17 20:52                       ` Greg Freemyer
2009-03-16 20:28                 ` [linux-lvm] fsync() and LVM Les Mikesell
2009-03-16 20:54                   ` Greg Freemyer
2009-03-16 21:17                     ` Les Mikesell
2009-03-16 21:36                       ` Greg Freemyer
2009-03-16 21:53                         ` Les Mikesell
2009-03-16 22:51                           ` Joshua D. Drake
2009-03-17 15:33                             ` Joshua D. Drake
2009-03-19  9:20                               ` Tim Post
2009-03-16 21:57                         ` Allen, Jack
2009-03-17 16:00             ` Marco Colombo
2009-03-17 17:40               ` Stuart D. Gathman
2009-03-17 18:17                 ` Les Mikesell
2009-03-18  0:37                   ` Marco Colombo
2009-03-15  8:51         ` Dietmar Maurer
2009-03-15 23:31           ` Marco Colombo [this message]
2009-03-17 18:12           ` Les Mikesell
2009-03-17 18:19             ` Dietmar Maurer

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=49BD8FEB.4040506@esiway.net \
    --to=linux-lvm@esiway.net \
    --cc=linux-lvm@redhat.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 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.