linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Howells <dhowells@cambridge.redhat.com>
To: Jan Harkes <jaharkes@cs.cmu.edu>
Cc: David Howells <dhowells@cambridge.redhat.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] AFS filesystem for Linux (2/2)
Date: Mon, 07 Oct 2002 10:14:19 +0100	[thread overview]
Message-ID: <8883.1033982059@warthog.cambridge.redhat.com> (raw)
In-Reply-To: Message from Jan Harkes <jaharkes@cs.cmu.edu>  of "Fri, 04 Oct 2002 13:36:24 EDT." <20021004173624.GA14499@ravel.coda.cs.cmu.edu>


> Last time I checked, yes. Callbacks should be sent only when the file is
> closed.

Sent by whom?

The client doesn't send callbacks. The server breaks all the callbacks on a
file whenever the contents or metadata of that file are changed. Closing has
nothing to do with it as far as the server is concerned (indeed, there is no
close).

> But local modification are per definition more up-to-date because you
> haven't closed the file yet. It is very much a problem of how you do your
> caching. I'm trying to tell you AFS has a well defined consistency model
> called session semantics. That directly influenzes every decision you make
> wrt. to caching and everything I've seen up until now shows me that you're
> simply implementing an NFS client that happens to speak to AFS servers.

I'm trying to follow the AFS architecture guide, without sacrificing too much
to cache coherency problems - which it sounds like Coda has... You've said it
requires user intervention (automated maybe) to fix up files for which the
cache has become inconsistent with respect to the server.

The difference is between Write-Back and Write-Through caching (to use h/w CPU
caching terminology). What I'm looking at doing is using Write-Through
caching, but I could make it configurable.

As I've said, Write-Back caching has more tricky security issues, particularly
when more than one user is changing a file on a client, given that the file
can't be "opened" with the server.

> Actually AFS is most definitely a stateful filesystem and as such has
> the concept of an open file.

Check the AFS fileserver API. There is no open call (and no close call). You
_can't_ "open" the file on the server. All you can do is fetch/store data or
metadata which gets you a short-term guarantee that you'll be told if what you
have is invalidated. (Admittedly, there are also calls for creating/destroying
various sorts of files, but they aren't pertinent to this discussion).

Thus, every time you access the file, your credentials have to be effectively
rechecked (the fileserver may cache granted permissions, but that's an
optimisation).

Furthermore, whilst the fileserver will inform you if the mode bits on a vnode
are changed, and probably when the ACL is changed on a directory, it won't
inform you when group ACEs of that ACL are changed in the protection
server. Therefore, the access rights granted to any particular set of
credentials may change without a client knowing about it - even if it still
holds a valid unbroken lease.

My point is that it can't be assumed that security details negotiated at
client-side open will still be valid come the first operation on that file.

> First of all, typical write-write sharing is extremely low, otherwise
> Coda wouldn't have even worked with it's optimistic replication and
> caching. Second of all permission changes are even rarer.

Rare isn't the same as impossible. If it can happen, it has to be considered
and has to be catered for.

> - We either succeed in writing the file when the person who lost access
>   closed before the last writer who still had access. Big deal, he had
>   access when he opened the file, and it is next to impossible to tell
>   wheter his close arrived before or after the permission was taken away
>   except when every operation is somehow given an absolute linear
>   ordering in time. Generally too expensive on a distributed system
>   with clients that may come and go as they please.

So someone else submits the now denied user's changes, thus allowing them to
bypass security... I'm not arguing that you're necessarily wrong. Some
compromise has to be made, and without being able to account to the server for
every one who has made a change to the data being submitted, and perform full
database style rollback and re-execute, the options are limited.

> - Or the person who lost access is the last one to close the file and
>   trigger the writeback. In this case the servers will deny the write
>   operation and the client will declare a conflict on that object and
>   switch to disconnected mode. Someone who has write permission can
>   repair the conflict.

This is not an option I can use.

> Actually, for any unmodified data there is only one copy. Once it is
> modified there are two (the dirty page and the logged change), why would
> there be a third, I don't care about the copy in the backing file...

You listed three (not including RAM): swap, logfile, underlying file.

> It has the advantage that even if you pull the powercord, we can still
> recover the last consistent set of metadata and from that validate both the
> data in the cache files, and revalidate everything against the servers,
> which we already need for the disconnected operation.

Does your cache run in synchronous mode with respect to the disc?

It may be that I can improve matters in my caching by using a journal... and
the VM/VFS has hooks for use by journalling filesystems such as EXT3.

David

  reply	other threads:[~2002-10-07  9:08 UTC|newest]

Thread overview: 316+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <7146.1033580256@warthog.cambridge.redhat.com>
2002-10-03  0:36 ` [PATCH] AFS filesystem for Linux (2/2) Linus Torvalds
2002-10-03  9:05   ` David Howells
2002-10-03 16:53     ` Jan Harkes
2002-10-03 17:45       ` Jan Harkes
2002-10-03 21:46       ` David Howells
2002-10-04  8:13       ` David Howells
     [not found]       ` <15381.1033681790@warthog.cambridge.redhat.com>
2002-10-04 14:02         ` Jan Harkes
2002-10-04 14:40           ` Trond Myklebust
2002-10-04 15:35             ` David Howells
2002-10-04 15:53               ` Trond Myklebust
2002-10-04 15:56                 ` David Howells
2002-10-04 16:03                   ` Trond Myklebust
2002-10-04 16:17                     ` David Howells
2002-10-04 17:04                       ` Trond Myklebust
2002-10-04 17:29                         ` David Howells
2002-10-07 14:14                         ` David Howells
2002-10-07 14:54                           ` Trond Myklebust
2002-10-07 15:36                             ` David Howells
2002-10-04 16:30               ` Andreas Dilger
2002-10-04 15:34           ` David Howells
2002-10-04 16:07             ` Jan Harkes
2002-10-04 16:56               ` David Howells
2002-10-04 17:36                 ` Jan Harkes
2002-10-07  9:14                   ` David Howells [this message]
2002-10-06 16:49     ` Troy Benjegerdes
2002-10-07  9:16       ` David Howells
2002-10-04 14:11   ` [patch] [kkern] " Patrick Audley
2001-05-14 19:19 LANANA: To Pending Device Number Registrants H. Peter Anvin
2001-05-14 19:36 ` Jeff Garzik
2001-05-14 19:57   ` H. Peter Anvin
2001-05-14 20:04     ` Jeff Garzik
2001-05-14 20:09     ` Alan Cox
2001-05-14 20:24       ` Jeff Garzik
2001-05-14 20:27         ` H. Peter Anvin
2001-05-14 22:21           ` Alan Cox
2001-05-14 23:43             ` Jan Niehusmann
2001-05-14 23:48               ` Alan Cox
2001-05-14 20:29         ` Linus Torvalds
2001-05-14 20:55           ` Neil Brown
2001-05-14 21:20             ` Alan Cox
2001-05-14 21:37               ` Neil Brown
2001-05-14 21:24             ` Jeff Garzik
2001-05-14 21:33               ` Neil Brown
2001-05-15  6:41             ` Linus Torvalds
2001-05-15  8:57               ` Alan Cox
2001-05-15  9:08                 ` Linus Torvalds
2001-05-15  9:26                   ` Alan Cox
2001-05-15  9:49                     ` Alexander Viro
2001-05-15  9:51                       ` Alan Cox
2001-05-15 10:12                         ` Alexander Viro
2001-05-15 10:36                           ` Alan Cox
2001-05-15 15:16                         ` Linus Torvalds
2001-05-15 20:55                           ` Alan Cox
2001-05-15 15:10                     ` Linus Torvalds
2001-05-15 15:29                       ` Alexander Viro
2001-05-15 17:21                       ` James Simmons
2001-05-15 17:25                         ` Alexander Viro
2001-05-15 17:29                           ` James Simmons
2001-05-15 17:32                             ` Alexander Viro
2001-05-15 17:44                               ` James Simmons
2001-05-15 18:18                                 ` Ingo Oeser
2001-05-15 18:36                                   ` James Simmons
2001-05-15 18:42                                 ` Alexander Viro
2001-05-16  8:29                                 ` Helge Hafting
2001-05-16 17:16                                   ` James Simmons
2001-05-15 21:46                               ` Chip Salzenberg
2001-05-15 21:50                                 ` James Simmons
2001-05-15 18:04                             ` Linus Torvalds
2001-05-15 18:58                               ` Johannes Erdfelt
2001-05-15 19:17                                 ` Linus Torvalds
2001-05-15 19:23                                   ` H. Peter Anvin
2001-05-15 19:43                                   ` Johannes Erdfelt
2001-05-15 21:58                                     ` Chip Salzenberg
2001-05-16  8:51                                     ` Helge Hafting
2001-05-17 10:20                                     ` Pavel Machek
2001-05-18 17:32                                       ` Johannes Erdfelt
2001-05-19 10:21                                         ` Pavel Machek
2001-05-19  8:18                                     ` Kai Henningsen
2001-05-17 20:40                                 ` Kai Henningsen
2001-05-17 22:46                                   ` Johannes Erdfelt
2001-05-15 20:03                               ` James Simmons
2001-05-15 20:06                                 ` H. Peter Anvin
2001-05-15 20:28                                   ` James Simmons
2001-05-15 21:20                                     ` Nicolas Pitre
2001-05-15 21:28                                       ` James Simmons
2001-05-15 21:31                                         ` H. Peter Anvin
2001-05-15 21:43                                         ` Johannes Erdfelt
2001-05-15 21:49                                           ` James Simmons
2001-05-16  7:05                                           ` Kai Henningsen
2001-05-15 22:07                                         ` Alan Cox
2001-05-16  7:11                                         ` Kai Henningsen
2001-05-16  7:43                                           ` Alexander Viro
2001-05-16  9:45                                             ` Malcolm Beattie
2001-05-16  0:59                                       ` Daniel Phillips
2001-05-16  1:34                                         ` Nicolas Pitre
2001-05-16  1:51                                           ` Jonathan Lundell
2001-05-16 11:34                                         ` Erik Mouw
2001-05-17 17:07                                         ` Eric W. Biederman
2001-05-17 19:30                                           ` Jeff Randall
2001-05-16  7:17                                       ` Kai Henningsen
2001-05-15 20:14                                 ` Alexander Viro
2001-05-15 20:30                                   ` H. Peter Anvin
2001-05-15 20:41                                     ` Alexander Viro
2001-05-15 20:51                                       ` Linus Torvalds
2001-05-16  1:01                                         ` Daniel Phillips
2001-05-16  1:04                                           ` H. Peter Anvin
2001-05-15 20:37                                   ` Linus Torvalds
2001-05-15 20:56                                     ` Jeff Garzik
2001-05-15 21:22                                     ` James Simmons
2001-05-17 10:42                                     ` Pavel Machek
2001-05-18 18:32                                       ` James Simmons
2001-05-19 10:23                                         ` no ioctls for serial ports? [was Re: LANANA: To Pending Device Number Registrants] Pavel Machek
2001-05-19 19:00                                           ` Linus Torvalds
2001-05-19 19:17                                             ` Pavel Machek
2001-05-19 19:35                                               ` Linus Torvalds
2001-05-19 19:43                                                 ` Pavel Machek
2001-05-19 20:31                                                   ` Tim Jansen
2001-05-19 23:57                                                 ` Alexander Viro
2001-05-20  7:18                                                   ` no ioctls for serial ports? [was Re: LANANA: To Pending DeviceNumber Registrants] Abramo Bagnara
2001-05-20  7:41                                                     ` Alexander Viro
2001-05-20  8:30                                                       ` no ioctls for serial ports? [was Re: LANANA: To Pending DeviceNumberRegistrants] Abramo Bagnara
2001-05-20 10:09                                                         ` Alexander Viro
2001-05-20  0:01                                               ` no ioctls for serial ports? [was Re: LANANA: To Pending Device Number Registrants] Alexander Viro
2001-05-20 11:17                                                 ` handling network using filesystem [was Re: no ioctls for serial ports?] Pavel Machek
2001-05-20  9:53                                               ` no ioctls for serial ports? [was Re: LANANA: To Pending Device Num Kai Henningsen
2001-05-20 13:40                                                 ` Alexander Viro
2001-05-20 14:27                                                   ` Tim Jansen
2001-05-20 14:30                                                   ` no ioctls for serial ports? [was Re: LANANA: To Pending DeviceNum Abramo Bagnara
2001-05-20 14:45                                                     ` Alexander Viro
2001-05-20 15:00                                                       ` Abramo Bagnara
2001-05-20 15:18                                                         ` Alexander Viro
2001-05-20 15:40                                                           ` Abramo Bagnara
2001-05-20 16:01                                                             ` Alexander Viro
2001-05-20 15:26                                                       ` Jakob Østergaard
2001-05-20 15:42                                                         ` Alexander Viro
2001-05-21 17:45                                                       ` Oliver Xymoron
2001-05-21 18:14                                                         ` Alexander Viro
2001-05-21 18:37                                                           ` Oliver Xymoron
2001-05-21 18:49                                                             ` Alexander Viro
2001-05-21 19:08                                                               ` Oliver Xymoron
2001-05-22  5:56                                                   ` no ioctls for serial ports? [was Re: LANANA: To Pending Device Num Pavel Machek
2001-05-19 20:11                                             ` no ioctls for serial ports? [was Re: LANANA: To Pending DeviceNumber Registrants] Abramo Bagnara
2001-05-15 20:57                                   ` LANANA: To Pending Device Number Registrants James Simmons
2001-05-17 20:33                                   ` Kai Henningsen
2001-05-15 20:17                                 ` H. Peter Anvin
2001-05-15 21:59                                 ` Chip Salzenberg
2001-05-15 22:51                                   ` James Simmons
2001-05-15 21:22                               ` Jan Harkes
2001-05-15 21:39                               ` Martin Dalecki
2001-05-15 18:02                       ` Ingo Oeser
2001-05-15 19:31                       ` Richard Gooch
2001-05-15 19:37                         ` H. Peter Anvin
2001-05-15 20:10                         ` Alan Cox
2001-05-15 21:41                         ` Richard Gooch
2001-05-15 21:47                           ` Alexander Viro
2001-05-15 22:14                           ` Alan Cox
2001-05-15 22:24                           ` Richard Gooch
2001-05-15 22:27                             ` H. Peter Anvin
2001-05-15 22:38                             ` Alexander Viro
2001-05-15 22:28                           ` Richard Gooch
2001-05-15 22:32                             ` H. Peter Anvin
2001-05-15 22:33                             ` Alan Cox
2001-05-16  7:21                           ` Geert Uytterhoeven
2001-05-16 18:22                           ` Richard Gooch
2001-05-16 19:36                             ` H. Peter Anvin
2001-05-16 20:01                             ` Richard Gooch
2001-05-16 20:05                               ` H. Peter Anvin
2001-05-16 20:18                               ` Linus Torvalds
2001-05-16 20:44                               ` Richard Gooch
2001-05-16 20:54                               ` Richard Gooch
2001-05-16 21:36                                 ` H. Peter Anvin
2001-05-16 22:11                                   ` Ingo Oeser
2001-05-16 22:13                                     ` H. Peter Anvin
2001-05-16 22:21                                       ` Jens Axboe
2001-05-16 23:03                                     ` Richard Gooch
2001-05-16 23:25                                       ` H. Peter Anvin
2001-05-16 23:37                                       ` Richard Gooch
2001-05-16 23:38                                         ` H. Peter Anvin
2001-05-16 23:41                                         ` Richard Gooch
2001-05-16 23:43                                           ` H. Peter Anvin
2001-05-16 23:49                                           ` Richard Gooch
2001-05-16 23:55                                             ` H. Peter Anvin
2001-05-17 21:12                                             ` Kai Henningsen
2001-05-17 21:06                               ` Kai Henningsen
2001-05-16 23:51                             ` Alan Cox
2001-05-16 23:58                             ` Richard Gooch
2001-05-17  0:12                               ` H. Peter Anvin
2001-05-17  0:24                               ` Alan Cox
2001-05-17  1:35                               ` Jeff Garzik
2001-05-17  9:33                                 ` Guest section DW
2001-05-15 20:58                       ` Alan Cox
2001-05-15 21:42                       ` Chip Salzenberg
2001-05-15 21:46                         ` Alexander Viro
2001-05-15 21:57                           ` H. Peter Anvin
2001-05-15 22:07                             ` Chip Salzenberg
2001-05-15 22:11                               ` H. Peter Anvin
2001-05-15 22:18                           ` Alan Cox
2001-05-15 21:40                     ` Chip Salzenberg
2001-05-15 22:12                       ` Alan Cox
2001-05-15 22:19                         ` H. Peter Anvin
2001-05-15 22:28                           ` Alan Cox
2001-05-15 22:34                             ` H. Peter Anvin
2001-05-15 23:39                         ` Chip Salzenberg
2001-05-16 20:37                           ` Alan Cox
2001-05-15 22:49                       ` James Simmons
2001-05-15 23:22                       ` Kenneth Johansson
2001-05-15  9:28                   ` Alan Cox
2001-05-15 15:15                     ` Linus Torvalds
2001-05-15 15:19                       ` Jeff Garzik
2001-05-15 15:45                         ` Linus Torvalds
2001-05-15 17:27                           ` James Simmons
2001-05-15 17:43                             ` Linus Torvalds
2001-05-15 18:04                               ` Jeff Garzik
2001-05-15 18:15                                 ` Linus Torvalds
2001-05-15 19:36                                   ` Jonathan Lundell
2001-05-15 20:18                                     ` Linus Torvalds
2001-05-15 20:26                                       ` Dan Hollis
2001-05-15 22:14                                         ` Miles Lane
2001-05-15 21:29                                       ` Alex Bligh - linux-kernel
2001-05-15 21:36                                         ` Linus Torvalds
2001-05-15 22:03                                         ` Jeff Mahoney
2001-05-15 22:42                                         ` Andreas Dilger
2001-05-15 21:51                                       ` Mark Frazer
2001-05-15 22:35                                       ` Bob Glamm
2001-05-16  0:56                                       ` Jonathan Lundell
2001-05-16  2:31                                         ` Andrew Morton
2001-05-16  6:56                                         ` Jonathan Lundell
2001-05-16  8:02                                           ` Vojtech Pavlik
2001-05-16 12:20                                           ` Bogdan Costescu
2001-05-16 14:37                                           ` Jonathan Lundell
2001-05-16 14:57                                             ` Vojtech Pavlik
2001-05-16 15:24                                             ` Jonathan Lundell
2001-05-16  7:24                                       ` Geert Uytterhoeven
2001-05-16 23:26                                         ` Alan Cox
2001-05-16 23:31                                           ` H. Peter Anvin
2001-05-16 23:53                                             ` Linus Torvalds
2001-05-17  0:21                                             ` Alan Cox
2001-05-17  7:57                                               ` Geert Uytterhoeven
2001-05-17 16:26                                               ` James Simmons
2001-05-17  6:43                                             ` Thomas Sailer
2001-05-17 16:58                                               ` Tim Jansen
2001-05-17 17:18                                                 ` James Simmons
2001-05-17 17:29                                                   ` Geert Uytterhoeven
2001-05-17 17:41                                                   ` Tim Jansen
2001-05-17 22:03                                                 ` Oliver Neukum
2001-05-16 23:52                                           ` Linus Torvalds
2001-05-17  1:26                                           ` Joel Becker
2001-05-16 16:04                                       ` Michael Meissner
2001-05-16 21:36                                         ` Andreas Dilger
2001-05-18  2:18                                     ` Jonathan Lundell
2001-05-19 17:36                                       ` Jonathan Lundell
2001-05-20  9:37                                         ` Eric W. Biederman
2001-05-20 14:16                                         ` Chris Wedgwood
2001-05-20 15:54                                         ` Jonathan Lundell
2001-05-20 15:57                                         ` Jonathan Lundell
2001-05-19 17:45                                       ` Jonathan Lundell
2001-05-19  8:42                                     ` Kai Henningsen
2001-05-17 21:23                                   ` Kai Henningsen
2001-05-15 19:33                                 ` Kai Henningsen
2001-05-16  7:25                                 ` Geert Uytterhoeven
2001-05-15 18:19                               ` James Simmons
2001-05-15 20:23                               ` Alan Cox
2001-05-15 20:28                                 ` H. Peter Anvin
2001-05-15 21:52                               ` Andreas Dilger
2001-05-15 20:02                             ` Dan Hollis
2001-05-15 11:44               ` Neil Brown
2001-05-15 15:34                 ` Linus Torvalds
2001-05-16  1:00                   ` Daniel Phillips
2001-05-16 12:58                     ` Jens Axboe
2001-05-16  3:25                   ` Neil Brown
2001-05-15 15:51               ` John Fremlin
2001-05-14 21:09           ` Andi Kleen
2001-05-14 21:11           ` Rik van Riel
2001-05-14 21:23             ` Alan Cox
2001-05-15  0:33               ` Rik van Riel
2001-05-16  9:04                 ` Ingo Oeser
2001-05-14 21:16           ` Alan Cox
2001-05-14 22:05             ` Alexander Viro
2001-05-14 22:30               ` Alan Cox
2001-05-14 22:48                 ` Alexander Viro
2001-05-14 22:46                   ` Alan Cox
2001-05-14 22:53                     ` Alexander Viro
2001-05-14 22:54                       ` H. Peter Anvin
2001-05-14 23:00                         ` Alexander Viro
2001-05-14 22:58                           ` Alan Cox
2001-05-14 23:29                             ` Alexander Viro
2001-05-15  4:20                             ` God
2001-05-15  7:48                             ` 2.4 " bert hubert
2001-05-15  8:54                               ` Alan Cox
2001-05-15  9:09                                 ` bert hubert
2001-05-14 23:39                           ` LANANA: " Richard Gooch
2001-05-14 23:18                         ` Arjan van de Ven
2001-05-14 23:20                           ` Alan Cox
2001-05-15 18:57                           ` Kai Henningsen
2001-05-15  5:56                         ` Oliver Neukum
2001-05-15  5:59                           ` H. Peter Anvin
2001-05-14 22:55                       ` Alan Cox
2001-05-14 23:11                         ` Dan Hollis
2001-05-14 23:19                           ` Alan Cox
2001-05-14 23:23                         ` Alexander Viro
2001-05-15  1:10                         ` Keith Owens
2001-05-15  4:12                 ` LANANA: Getting out of hand? God
2001-05-15  4:30                   ` Linus Torvalds
2001-05-15  5:17                     ` Linus Torvalds
2001-05-15  8:24                     ` Geert Uytterhoeven
2001-05-15  8:48                     ` Alan Cox
2001-05-15 21:16                     ` Martin Dalecki
2001-05-14 23:01               ` Interrupted sound with 2.4.4-ac6 Hermann Himmelbauer
2001-05-14 23:34           ` LANANA: To Pending Device Number Registrants Richard Gooch
2001-05-14 21:18         ` Alan Cox
2001-05-14 23:32     ` Richard Gooch
2001-05-14 20:09 ` Richard Gooch
2001-05-14 20:14   ` Jeff Garzik
2001-05-15 17:37 ` Pavel Machek
2001-05-17 11:32   ` Alan Cox
2001-05-16 15:58 ` Kurt Garloff

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=8883.1033982059@warthog.cambridge.redhat.com \
    --to=dhowells@cambridge.redhat.com \
    --cc=jaharkes@cs.cmu.edu \
    --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).