linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: torvalds@transmeta.com (Linus Torvalds)
To: linux-kernel@vger.kernel.org
Subject: Re: intermediate summary of ext3-2.4-0.9.4 thread
Date: Fri, 3 Aug 2001 18:34:14 +0000 (UTC)	[thread overview]
Message-ID: <9keqr6$egl$1@penguin.transmeta.com> (raw)
In-Reply-To: <01080315090600.01827@starship> <Pine.GSO.4.21.0108031400590.3272-100000@weyl.math.psu.edu>

In article <Pine.GSO.4.21.0108031400590.3272-100000@weyl.math.psu.edu>,
Alexander Viro  <viro@math.psu.edu> wrote:
>
>
>On Fri, 3 Aug 2001, Daniel Phillips wrote:
>
>> Are you saying that there may not be a ".." some of the time?  Or just 
>> that it may spontaneously be relinked?  If it does spontaneously change 
>> it doesn't matter, you have still made sure there is access by at least 
>> one path.
>> 
>> The trouble with doing this in userland is, the locked chain of dcache 
>> entries isn't there.
>
>There is no _locked_ chain. And if you want to grab the locks on all
>ancestors - think again. It means sorting the inodes by address _and_
>relocking if any of them had been moved while you were locking the
>previous ones. I absolutely refuse to add such crap to the tree and I
>seriously suspect that Linus and Alan will do the same.

Note that while there is no "absoilutely correct" thing here, I think
the right thing to do (as in "do what the user _expects_ you to do")
would be fairly simple to implement with a simple

	fsync(int fd)
	{
		dentry = fdget(fd);
		do_fsync(dentry);
		for (;;) {
			tmp = dentry;
			dentry = dentry->d_parent;
			if (dentry == tmp)
				break;
			do_fdatasync(dentry);
		}
	}

Add dcount increments as needed (and they _are_ needed, to make sure
that we don't hold on to a dentry while the child has been moved
somewhere else and the dentry now has a zero count). And we only need to
sync up to the closest mount-point, not the global root.

Does this guarantee that we fsync the whole path in the presense of
concurrent renames? No. That's a user problem, why should we care? He
should fsync his other renames too, he didn't ask us to fsync them.

And we don't care about any other paths that the file may have. We're
syncing the path that the user opened, and no others. Again, if the user
opened another path, he should have synced _that_ one.

		Linus

  parent reply	other threads:[~2001-08-03 18:35 UTC|newest]

Thread overview: 77+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <0108030507330F.00440@starship>
     [not found] ` <Pine.GSO.4.21.0108022312211.1494-100000@weyl.math.psu.edu>
2001-08-03 13:09   ` intermediate summary of ext3-2.4-0.9.4 thread Daniel Phillips
2001-08-03 14:43     ` Horst von Brand
2001-08-03 17:49     ` Mike Castle
2001-08-04  3:23       ` Daniel Phillips
2001-08-03 18:08     ` Alexander Viro
2001-08-03 18:26       ` Daniel Phillips
2001-08-03 18:53         ` Alexander Viro
2001-08-03 20:50           ` Daniel Phillips
2001-08-04  3:43           ` Matthias Andree
2001-08-03 18:34       ` Linus Torvalds [this message]
2001-08-03 22:01         ` [PATCH] 2.4.8-pre3 fsync entire path (+reiserfs fsync semantic change patch) Chris Wedgwood
2001-08-03 22:33           ` Alexander Viro
2001-08-03 23:16             ` Chris Wedgwood
2001-08-03 23:23               ` Alexander Viro
2001-08-04  3:53                 ` Matthias Andree
2001-08-04  5:48                   ` Alexander Viro
2001-08-03 22:45           ` Alexander Viro
2001-08-03 23:09             ` Chris Wedgwood
2001-08-03 23:15               ` Alexander Viro
2001-08-03 23:20                 ` Chris Wedgwood
2001-08-03 23:25                   ` Alexander Viro
2001-08-03 23:35                     ` Chris Wedgwood
2001-08-03 23:41                       ` Alexander Viro
2001-08-03 23:46                         ` Chris Wedgwood
2001-08-03 23:53                           ` Alexander Viro
2001-08-04  7:45                             ` [PATCH] 2.4.8-pre3 fsync entire path (+reiserfs fsync semanticchange patch) Hans Reiser
2001-08-04 18:31                               ` Chris Wedgwood
2001-08-05  1:47                                 ` Alexander Viro
2001-08-08 17:22                                   ` [PATCH] 2.4.8-pre3 fsync entire path (+reiserfs fsync semanticchangepatch) Hans Reiser
2001-08-03 23:42                       ` [PATCH] 2.4.8-pre3 fsync entire path (+reiserfs fsync semantic change patch) Alan Cox
2001-08-03 23:44                         ` Chris Wedgwood
2001-08-04  1:08           ` Andrew Morton
2001-08-04  1:19             ` Chris Wedgwood
2001-08-04  1:45               ` Andrew Morton
2001-08-04  4:04                 ` Matthias Andree
2001-08-04 18:30                   ` Chris Wedgwood
2001-08-05 12:15                     ` Matthias Andree
2001-08-05 12:32                       ` Chris Wedgwood
2001-08-05 13:02                         ` Matti Aarnio
2001-08-04 21:07                   ` Andrew Morton
2001-08-04 21:07               ` Andrew Morton
2001-08-05  7:25                 ` Chris Wedgwood
2001-08-09 13:25                 ` Matthias Andree
2001-08-04 17:35           ` Jan Harkes
2001-08-04 18:18             ` Chris Wedgwood
2001-08-06 15:02           ` Chris Mason
2001-08-06 20:48             ` Chris Wedgwood
2001-08-03 22:29       ` Anton Altaparmakov
2001-08-03 23:06         ` Chris Wedgwood
2001-08-06 15:23         ` looking for resources for designing loopback filesystem dave-mlist
2001-08-06 16:11           ` Ville Herva
2001-08-03 18:36   ` intermediate summary of ext3-2.4-0.9.4 thread Matthias Andree
2001-08-03 19:16     ` Alexander Viro
2001-08-04  3:40       ` fdatasync(2) is also there (was: intermediate summary of ext3-2.4-0.9.4 thread) Matthias Andree
2001-08-05  0:28         ` Mike Castle
2001-08-03 20:25 intermediate summary of ext3-2.4-0.9.4 thread Sam James
     [not found] <0108030354130E.00440@starship>
     [not found] ` <200108030207.f7326OpR003086@sleipnir.valparaiso.cl>
2001-08-03 18:34   ` Matthias Andree
  -- strict thread matches above, loose matches on Subject: below --
2001-07-26  7:34 ext3-2.4-0.9.4 Andrew Morton
2001-08-01 16:02 ` ext3-2.4-0.9.4 Stephen C. Tweedie
2001-08-02  9:03   ` ext3-2.4-0.9.4 Matthias Andree
2001-08-02 17:26     ` ext3-2.4-0.9.4 Daniel Phillips
2001-08-02 17:37       ` intermediate summary of ext3-2.4-0.9.4 thread Matthias Andree
2001-08-02 18:35         ` Alexander Viro
2001-08-02 18:47           ` Matthias Andree
2001-08-02 22:18             ` Andreas Dilger
2001-08-02 23:11               ` Matthias Andree
     [not found]               ` <5.1.0.14.2.20010803025916.053e2ec0@pop.cus.cam.ac.uk>
2001-08-03  9:16                 ` Matthias Andree
     [not found]             ` <5.1.0.14.2.20010803002501.00ada0e0@pop.cus.cam.ac.uk>
     [not found]               ` <20010803021406.A9845@emma1.emma.line.org>
2001-08-03 16:20                 ` Jan Harkes
2001-08-03 22:48                 ` Andreas Dilger
2001-08-02 19:47         ` Bill Rugolsky Jr.
2001-08-03 18:22           ` Matthias Andree
     [not found]         ` <Pine.LNX.4.33.0108030051070.1703-100000@fogarty.jakma.org>
     [not found]           ` <20010803021642.B9845@emma1.emma.line.org>
2001-08-03  7:03             ` Eric W. Biederman
2001-08-03  8:39               ` Matthias Andree
2001-08-03  9:57                 ` Christoph Hellwig
2001-08-04  7:55                 ` Eric W. Biederman
2001-08-03  8:30         ` Stephen C. Tweedie
2001-08-03 18:28           ` Matthias Andree
2001-08-03  8:50         ` David Weinehall
2001-08-03 18:31           ` Matthias Andree
2001-08-03 19:59           ` Albert D. Cahalan
2001-08-03 19:54             ` Gregory Maxwell

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='9keqr6$egl$1@penguin.transmeta.com' \
    --to=torvalds@transmeta.com \
    --cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).