linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: "Stephen C. Tweedie" <sct@redhat.com>
To: "Stephen C. Tweedie" <sct@redhat.com>,
	"Jason A. Lixfeld" <jlixfeld@fastvibe.com>,
	ext3-users@redhat.com, linux-lvm@sistina.com
Subject: [linux-lvm] Re: What really works?
Date: Tue Oct 23 05:32:01 2001	[thread overview]
Message-ID: <20011023113250.A2334@redhat.com> (raw)
In-Reply-To: <20011022162326.G5146@turbolinux.com>; from adilger@turbolabs.com on Mon, Oct 22, 2001 at 04:23:26PM -0600

Hi,

On Mon, Oct 22, 2001 at 04:23:26PM -0600, Andreas Dilger wrote:

> > lvm_do_pe_lock_unlock does try to flush existing IO, but they do it
> > with
> > 
> > 		pe_lock_req.lock = UNLOCK_PE;
> > 		fsync_dev(pe_lock_req.data.lv_dev);
> > 		pe_lock_req.lock = LOCK_PE;
> 
> Note that the code you reference is only in use when the Logical Extent
> is being moved from one disk to another (shouldn't be done in normal
> circumstances).

Right, and the user in question had a LVM working robustly for 5 days
before trying to move a partition, at which point the filesystem
started giving errors all over the place.  It wasn't 100% clear from
the bug report whether the "move" was a fs-level copy or an LVM-level
PE move, though.

> Also, this code has been reworked in the LVM CVS and
> recent LVM releases to be more robust.

Yep, saw that.

> > which (a) doesn't wait for existing IO to complete if that IO was
> > submitted externally to the buffer cache (so it won't catch
> > raw IO, direct IO, journal activity, or RAID1 ios); and (b) it allows
> > new IO to be submitted while the fsync is going on, so when it
> > eventually sets LOCK_PE state again, we can have loads of new IO
> > freshly submitted to the device by the time the lock is re-asserted.  
> 
> The "external I/O" problem is a known issue (raw IO) because it is not
> flushed.  Note that in newer kernels, all write I/O which is done to
> the LE being moved is put into a queue at LVM mapping time, so the
> above fsync is not an issue for it (it gets resubmitted when the move
> is done).

It's still an issue, because you haven't waited for the previous
external IO to complete.  The 1.0.1rc4 code looks much more robust in
its locking against newly submitted IO (case (b) above), but doesn't
address (a) yet, and for the ext3 journal, that's a big problem.

Any block device which assumes that IO is done through the buffer
cache is broken in this respect.  The 2.2 raid1/5 reconstruction code
had the same problem, but 2.4 fixed that.

Cheers,
 Stephen

  reply	other threads:[~2001-10-23  5:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E15vISM-0005YX-00.2001-10-21-14-15-58@mail5.svr.pol.co.uk>
2001-10-21 14:25 ` [linux-lvm] What really works? Jason A. Lixfeld
2001-10-22 14:37   ` [linux-lvm] " Theodore Tso
2001-10-22 14:42     ` Bryan-TheBS-Smith
2001-10-22 21:13     ` [linux-lvm] " Jason A. Lixfeld
2001-10-23  5:35       ` [linux-lvm] " Stephen C. Tweedie
2001-10-22 17:04   ` Stephen C. Tweedie
2001-10-22 17:22     ` Andreas Dilger
2001-10-23  5:32       ` Stephen C. Tweedie [this message]
2001-10-23  4:42     ` Joe Thornber
2001-11-02  9:40       ` Stephen C. Tweedie

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=20011023113250.A2334@redhat.com \
    --to=sct@redhat.com \
    --cc=ext3-users@redhat.com \
    --cc=jlixfeld@fastvibe.com \
    --cc=linux-lvm@sistina.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;
as well as URLs for NNTP newsgroup(s).