linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Chris Mason <mason@suse.com>
To: linux-lvm@sistina.com
Subject: Re: [linux-lvm] snapshot of Reiserfs
Date: Thu, 22 Feb 2001 12:12:03 -0500	[thread overview]
Message-ID: <2725910000.982861923@tiny> (raw)
In-Reply-To: <200102212323.f1LNNqH14620@webber.adilger.net>


On Wednesday, February 21, 2001 04:23:51 PM -0700 Andreas Dilger
<adilger@turbolinux.com> wrote:
> 
> Some overhead in calling sync_supers() and sync_supers_lockfs() because
> they do both do the same list traversal.  Granted, on most systems the
> total number of superblocks is small...  Last time I had a look at this,
> I suggested that the sync_supers_lockfs() call be changed, namely that
> it is illegal to call it with a zero "dev" parameter, otherwise you
> will lock all filesystems and that may be a bad thing.  This simplifies
> the code a bit.  If we also have it call write_super() if
> write_super_lockfs() is missing, it is better yet.
> 
It might be a stupid thing for the caller to do, but it should still work.
If I tried really hard, I might be able to think of some kind of clustering
deal where we wanted to checkpoint the current system and move it onto
another machine.  It would be a stretch though ;-)

>> It is amost exactly a cut n' paste of fsync_dev, with an extra call to
>> sync_supers_lockfs.  It should do what fsync_dev does, even when there
>> are no sync_super_lockfs methods are provided.  The only reason I didn't
>> just call fsync_dev from fsync_dev_lockfs is because I wanted the
>> sync_buffers call to happen after the lockfs call ;-)
> 
> And the reason for this is?  The first call to sync_buffers doesn't wait
> on completion (unlike the second sync_buffers call), so there is no
> guarantee that they are all written out.

The reason was to avoid a second call to sync_buffers that does wait on
completion....

You make some very good points.  The goal behind the existing call was to
do this:

1) flush as much as you can (inodes, supers, quotas, trigger buffer flushes)
2) ask the FS to lock itself.
3) make sure all dirty buffers are on disk

#2 might involve another set of flushes for anything that was modified
between #1 and the lock.  The FS is resonsible for this, since it might
have odd/complicated ways to figure out what is dirty (inodes under
reiserfs).

#3 is not allowed to deadlock against the FS lock, and it must go after the
lock to prevent new buffers from being dirtied after the sync.

Yes, this means scanning the list of supers twice, but I think it provides
a good mix of responsibilities between fsync_dev_lockfs call and the FS.
Any ideas on cleaning this up further are more than welcome.

-chris

  reply	other threads:[~2001-02-22 17:12 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-20 22:49 [linux-lvm] *** ANNOUNCEMENT *** LVM 0.9.1 beta5 available at www.sistina.com Heinz J. Mauelshagen
2001-02-21  4:19 ` [linux-lvm] snapshot of Reiserfs lvm, lvm
2001-02-21  8:59   ` Patrick Caulfield
2001-02-21 14:04     ` lvm
2001-02-21 14:11       ` Patrick Caulfield
2001-02-21 15:34         ` Chris Mason
2001-02-21 16:05           ` lvm
2001-02-21 16:12           ` Patrick Caulfield
2001-02-21 16:44     ` Andreas Dilger
2001-02-21 17:07       ` Chris Mason
2001-02-21 18:55         ` Andreas Dilger
2001-02-21 19:17           ` Chris Mason
2001-02-21 23:23             ` Andreas Dilger
2001-02-22 17:12               ` Chris Mason [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-05-20  6:31 [linux-lvm] Snapshot of ReiserFS Dietmar Stein
2001-02-19 16:11 [linux-lvm] snapshot of Reiserfs lvm
2001-02-19 16:12 ` Joe Thornber
2001-02-19 17:04   ` Christoph Hellwig
2001-02-19 16:59     ` Joe Thornber

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=2725910000.982861923@tiny \
    --to=mason@suse.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).