mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hildo.Biersma@morganstanley.com
To: Pete Zaitcev <zaitcev@redhat.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: close return value
Date: Fri, 19 Jul 2002 07:31:54 -0400 (EDT)	[thread overview]
Message-ID: <15671.63658.675586.540958@axolotl.ms.com> (raw)
In-Reply-To: <20020718195501.A21027@devserv.devel.redhat.com>

>>>>> "Pete" == Pete Zaitcev <zaitcev@redhat.com> writes:

>> Date: Thu, 18 Jul 2002 16:09:51 -0400 (EDT)
>> From: Hildo.Biersma@morganstanley.com

Pete> The problem with errors from close() is that NOTHING SMART can be
Pete> done by the application when it receives it. And application can:
>> 
Pete> a) print a message "Your data are lost, have a nice day\n".
Pete> b) loop retrying close() until it works.
Pete> c) do (a) then (b).
>> 
>> I must disagree with you.  We run the Andrew File System (AFS), which
>> has client-side caching with write-on-close semantics.  If an error
>> occurs goes wrong at close() time, a well-written application can
>> actually do something useful - such as sending an alert, or letting
>> the user know the action failed.

Pete> The above is an example of an application covering up for
Pete> a filesystem that breaks the general expactions for the
Pete> operating environment. Remember your precursor with a broken
Pete> driver who received his beating a couple of months ago.
Pete> He also had an appliction which processed his errors from
Pete> close just fine. A workaround can be done in every specific
Pete> instance, but it does not make this practice any smarter.

I agree in general, but you should realize that there are valid
reasons why Unix filesystem semantics are sometimes violated.

We have slightly over 8,000 Unix hosts using the same networked
filesystem against the same set of file-servers.  This is only
feasible if you minimize the number of client<->server interactions.

This is done in two ways:
- persistent (disk-based) client-side caching, where the server will
  let a client know if a file is updated and needs to be evicted from
  the client's cache
- close-on-write semantics for files

Pete> What AFS designers should have done if they had a brain larger
Pete> than a pea was:

Pete>  1. Make close to block indefinitely, retrying writes.
Pete>     Allow overlapping writes, let clients to sort it out.

None of these things work, as security may be denied, a volume may be
taken off-line, or hvaing overlppaing writes from clients increases
the amount of client<->server interaction.

Pete>  2. Provide an ioctl to flush writes before close() or
Pete>     make fsync() work right. Your "smart" applications have had
Pete>     to use that, so that no ambiguity existed between tearing down
Pete>     the descriptor and writing out the data.

This is provided - sync, fsync, msync all work.

Pete> This way, naive applications such as cat and cc would
Pete> continue to work. There is no reason to penalize them just
Pete> because some application _could_ possibly post idiotic alerts
Pete> (Abort, Retry, Fail).

That's work the trade-offs come in.  The AFS designers found that
relaxing the Unix filesystem semantics vastly improves scalability.

Many of the high-performance filesystems (not XFS, the _really_
high-performance filesystems) that you run on supercomputers also
vioilate Unix semantics in various ways.  Yes, that breaks na\"ive
apps, but that trade-off is generally accepted.

  reply	other threads:[~2002-07-19 11:28 UTC|newest]

Thread overview: 82+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20020712162306$aa7d@traf.lcs.mit.edu>
     [not found] ` <mit.lcs.mail.linux-kernel/20020712162306$aa7d@traf.lcs.mit.edu>
2002-07-15 15:22   ` [ANNOUNCE] Ext3 vs Reiserfs benchmarks Patrick J. LoPresti
2002-07-15 17:31     ` Chris Mason
2002-07-15 18:33     ` Matthias Andree
     [not found]     ` <20020715173337$acad@traf.lcs.mit.edu>
     [not found]       ` <mit.lcs.mail.linux-kernel/20020715173337$acad@traf.lcs.mit.edu>
2002-07-15 19:13         ` Patrick J. LoPresti
2002-07-15 20:55           ` Matthias Andree
2002-07-15 21:23             ` Patrick J. LoPresti
2002-07-15 21:38               ` Thunder from the hill
2002-07-16 12:31                 ` Matthias Andree
2002-07-16 15:53                   ` Thunder from the hill
2002-07-16 19:26                     ` Matthias Andree
2002-07-16 19:38                       ` Thunder from the hill
2002-07-16 23:22                         ` close return value (was Re: [ANNOUNCE] Ext3 vs Reiserfs benchmarks) Zack Weinberg
2002-07-17  1:03                           ` Alan Cox
2002-07-16 23:52                             ` close return value David S. Miller
2002-07-17  1:35                               ` Alan Cox
2002-07-17  0:20                                 ` David S. Miller
2002-07-17  1:05                                   ` Linus Torvalds
2002-07-17  1:05                                     ` David S. Miller
2002-07-17  1:23                                       ` Linus Torvalds
2002-07-17 11:51                                         ` Matthias Andree
2002-07-17 17:23                                           ` Andries Brouwer
2002-07-20  8:00                                         ` Florian Weimer
2002-07-20 16:45                                           ` Linus Torvalds
2002-07-26  0:06                                             ` EFAULT vs. SIGSEGV [was Re: close return value] Pavel Machek
2002-07-26 14:01                                               ` (no subject) Alexis Deruelle
     [not found]                                   ` <mailman.1026868201.10433.linux-kernel2news@redhat.com>
2002-07-18  0:01                                     ` close return value Pete Zaitcev
2002-07-18  0:10                                       ` Thunder from the hill
     [not found]                                       ` <mit.lcs.mail.linux-kernel/200207180001.g6I015f02681@devserv.devel.redhat.com>
2002-07-18 14:42                                         ` Patrick J. LoPresti
2002-07-18 15:13                                           ` Richard B. Johnson
2002-07-18 15:32                                             ` Sandy Harris
2002-07-18 23:47                                           ` Albert D. Cahalan
2002-07-19 16:12                                             ` Patrick J. LoPresti
2002-07-19 16:24                                               ` Joseph Malicki
2002-07-19 18:48                                                 ` Patrick J. LoPresti
2002-07-19 19:25                                                   ` Lars Marowsky-Bree
2002-07-19 19:30                                                     ` Arnaldo Carvalho de Melo
2002-07-19 19:45                                                       ` Joseph Malicki
2002-07-19 19:55                                                         ` Arnaldo Carvalho de Melo
2002-07-20 18:25                                                         ` Bernd Eckenfels
2002-07-20 23:06                                                         ` Sandy Harris
2002-07-20 14:42                                                 ` Andries Brouwer
2002-07-18 20:09                                       ` Hildo.Biersma
2002-07-18 23:55                                         ` Pete Zaitcev
2002-07-19 11:31                                           ` Hildo.Biersma [this message]
2002-07-19 16:16                                             ` Pete Zaitcev
2002-07-23 22:19                                           ` Bill Davidsen
2002-07-17  0:10                             ` close return value (was Re: [ANNOUNCE] Ext3 vs Reiserfs benchmarks) Zack Weinberg
2002-07-17  1:45                               ` Alan Cox
2002-07-17 18:24                                 ` Zack Weinberg
2002-07-22 16:42                                 ` Rogier Wolff
2002-07-17  8:00                               ` Lars Marowsky-Bree
2002-07-17 15:49                                 ` Thunder from the hill
2002-07-17  2:22                             ` Elladan
2002-07-17  2:54                               ` Thunder from the hill
2002-07-17  3:00                                 ` Elladan
2002-07-17  3:10                                   ` Thunder from the hill
2002-07-17  3:31                                     ` Elladan
2002-07-17  4:17                               ` Stevie O
2002-07-17  4:38                                 ` Elladan
2002-07-17 14:39                                   ` Andreas Schwab
2002-07-17 16:49                                     ` Elladan
2002-07-17 17:43                                       ` Linus Torvalds
2002-07-17 22:07                                         ` Elladan
2002-07-18  9:48                                         ` Ketil Froyn
2002-07-17 17:17                                   ` Andries Brouwer
2002-07-17 17:51                                     ` Richard Gooch
2002-07-17  7:34                               ` close return value (was Re: [ANNOUNCE] Ext3 vs Reiserfs benchmarks Kai Henningsen
2002-07-15 21:59               ` Ketil Froyn
2002-07-15 23:08                 ` Matti Aarnio
2002-07-16 12:33                   ` Matthias Andree
2002-07-15 22:55             ` Alan Cox
2002-07-15 21:58               ` Matthias Andree
2002-07-15 21:14           ` Chris Mason
2002-07-15 21:31             ` Patrick J. LoPresti
2002-07-15 22:12               ` Richard A Nelson
2002-07-16  1:02               ` Lawrence Greenfield
     [not found]                 ` <mit.lcs.mail.linux-kernel/200207160102.g6G12BiH022986@lin2.andrew.cmu.edu>
2002-07-16  1:43                   ` Patrick J. LoPresti
2002-07-16  1:56                     ` Thunder from the hill
2002-07-16 12:47                     ` Matthias Andree
2002-07-16 21:09                     ` James Antill
2002-07-16 12:35             ` Matthias Andree
2002-07-16  7:07     ` Dax Kelson

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=15671.63658.675586.540958@axolotl.ms.com \
    --to=hildo.biersma@morganstanley.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zaitcev@redhat.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

all inboxes | Powered by JetHome®