mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Oeser <ingo.oeser@informatik.tu-chemnitz.de>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] make distclean tries to delete dirs in tmpfs
Date: Thu, 10 May 2001 09:33:37 +0200	[thread overview]
Message-ID: <20010510093337.R754@nightmaster.csn.tu-chemnitz.de> (raw)
In-Reply-To: <20010509204434.Q754@nightmaster.csn.tu-chemnitz.de> <9dcgc8$ora$1@cesium.transmeta.com>
In-Reply-To: <9dcgc8$ora$1@cesium.transmeta.com>; from hpa@zytor.com on Wed, May 09, 2001 at 03:29:28PM -0700

On Wed, May 09, 2001 at 03:29:28PM -0700, H. Peter Anvin wrote:
> By author:    Ingo Oeser <ingo.oeser@informatik.tu-chemnitz.de>
> > make distclean deletes anything with size 0. This includes
> > directories, while making the kernel in tmpfs or ramfs.
> Wouldn't it be better to fix tmpfs/ramfs to report something sensible,
> even if it's artificial?

No, because it gives it as arguments to "rm" (which only deletes
files by defintion) and not to "rm -rf" (which also deletes
directories).

Not excluding directories from the arguments to "rm" is the BUG.
All my scripts always do that, just the kernel Makefile doesn't.

And it might even be faster, because we don't have to do all the
other tests, if it's not an directory ;-)

> N.B.: X/KDE will not run on a ramfs, because it reports as a size-zero
> filesystem in "df".  Switching to tmpfs solved that for me.

This is partially a ramfs BUG, because filesystems are supposed
to do accounting ;-)

OTOH, querying the available space before transfers says NOTHING
about the sucess of an operation. kfm is not the only application
running and the fs might do delayed allocation.

Applications should not check for free space, they should try to
allocate it (and maybe touch it, if we are not IO bound) and
watch for ENOSPC instead. 

Then we truncate all written stuff to the extend, where it made
sense, delete the whole file if it has become size 0 and emit an
error telling the user, that we had not enough disk space at this
time to succeed.

We don't check for available memory either, so why do it on disk?

It made sense in DOS times, but doesn't do anymore. It's only
relevant to the administrator to tell him, that we need a bigger
disk ;-)

Regards

Ingo Oeser
-- 
10.+11.03.2001 - 3. Chemnitzer LinuxTag <http://www.tu-chemnitz.de/linux/tag>
         <<<<<<<<<<<<     been there and had much fun   >>>>>>>>>>>>

      reply	other threads:[~2001-05-10 12:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-09 18:44 Ingo Oeser
2001-05-09 22:29 ` H. Peter Anvin
2001-05-10  7:33   ` Ingo Oeser [this message]

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=20010510093337.R754@nightmaster.csn.tu-chemnitz.de \
    --to=ingo.oeser@informatik.tu-chemnitz.de \
    --cc=hpa@zytor.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

all inboxes | Powered by JetHome®