public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: jmerkey <jmerkey@utah-nac.org>
To: Andrew Morton <akpm@osdl.org>
Cc: Nico Schottelius <nico-kernel@schottelius.org>,
	linux-kernel@vger.kernel.org
Subject: Re: Why is one sync() not enough?
Date: Tue, 14 Jun 2005 21:39:33 -0600	[thread overview]
Message-ID: <42AFA2F5.6010707@utah-nac.org> (raw)
In-Reply-To: <20050614215032.35d44e93.akpm@osdl.org>



There are cases where bitmaps can dirty themselves in the FS's (I have 
had to deal with several of these issues in 2.6) after a sync,
and I have found that:

#
# sync
# sync
#

is required on ext2 in some situations due to some race conditions with 
remote and local clients using device based FS's, so
there are some holes -- and comments in ext2 and several other FS's seem 
to bear this assumption out.

:-)

Jeff

Andrew Morton wrote:

>Nico Schottelius <nico-kernel@schottelius.org> wrote:
>  
>
>>Hello again!
>>
>>When my system shuts down and init calls sync() and after that
>>umount and then reboot, the filesystem is left in an unclean state.
>>
>>If I do sync() two times (one before umount, one after umount) it
>>seems to work.
>>
>>    
>>
>
>That's a bug.
>
>The standards say that sync() is supposed to "start" I/O, or something
>similarly vague and waffly.  The Linux implementation of sync() has always
>started all I/O and then waited upon all of it before returning from
>sync().
>
>And umount() itself will sync everything to disk, so the additional sync()
>calls should be unnecessary.
>
>That being said, if umount was leaving dirty filesystems then about 1000000
>people would be complaining.  So there's something unusual about your
>setup.
>
>What filesystem?  What kernel version?  Any unusual bind mounts, loopback
>mounts, etc?  There must be something there...
>-
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at  http://www.tux.org/lkml/
>
>  
>


  reply	other threads:[~2005-06-15  5:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-14  9:41 Why is one sync() not enough? Nico Schottelius
2005-06-14 12:58 ` Martin Waitz
2005-06-14 15:58   ` Jesper Juhl
2005-06-14 18:36     ` Valdis.Kletnieks
2005-06-15  6:19     ` Nico Schottelius
2005-06-15  4:50 ` Andrew Morton
2005-06-15  3:39   ` jmerkey [this message]
2005-06-15  8:20   ` Bernd Eckenfels
2005-06-15 10:55   ` Nico Schottelius
2005-06-15 19:41     ` Andrew Morton
2005-06-15  8:17 ` Helge Hafting
2005-06-15  9:28   ` Denis Vlasenko
2005-06-15  9:43     ` Coywolf Qi Hunt

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=42AFA2F5.6010707@utah-nac.org \
    --to=jmerkey@utah-nac.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nico-kernel@schottelius.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox