public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@clusterfs.com>
To: Peter Hartley <pdh@utter.chaos.org.uk>
Cc: linux-kernel@vger.kernel.org
Subject: Re: setrlimit and RLIM_INFINITY causing fsck failure, 2.4.18
Date: Tue, 19 Mar 2002 07:15:54 -0700	[thread overview]
Message-ID: <20020319141554.GL470@turbolinux.com> (raw)
In-Reply-To: <006701c1cf6d$d9701230$2701230a@electronic>

On Mar 19, 2002  17:45 -0000, Peter Hartley wrote:
> In particular, this means that an e2fsck 1.27 built against such a glibc
> will fail with SIGXFS every time on any block device bigger than 2Gbytes.
> This is because:
> 
>  * e2fsck calls setrlimit(RLIMIT_FSIZE, RLIM_INFINITY) in
>    an attempt to unset the limit. RLIM_INFINITY here is
>    0xFFFFFFFF. This is IMO the Right Thing.

It is only the right thing if the original limit was not 0xFFFFFFFF.
Otherwise, it is just adding to the problem, because the problem only
happens when you try to SET the limit.

> Surely the only Right Things to do in the kernel are (a) invent a new
> setrlimit call that corrects the RLIM_INFINITY value, or (b) have the
> current setrlimit call correct the RLIM_INFINITY value unconditionally.

(c) rlimit should not apply to block devices.

There were patches for this floating around, and I thought they made it
into 2.4.18, but they did not.

I do agree that we should also fix "setrlimit" to do the 0x7FFFFFFF to
0xFFFFFFFF correction.

Cheers, Andreas
--
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert


  reply	other threads:[~2002-03-19 18:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-19 17:45 setrlimit and RLIM_INFINITY causing fsck failure, 2.4.18 Peter Hartley
2002-03-19 14:15 ` Andreas Dilger [this message]
2002-03-19 18:20   ` Peter Hartley
2002-03-19 18:44     ` Alan Cox
2002-03-20 10:12       ` [PATCH] " Peter Hartley
2002-03-19 18:30   ` Alan Cox
2002-03-19 18:17 ` Alan Cox
2002-03-20  0:10 ` Theodore Tso
2002-03-20  2:04   ` Benjamin LaHaise
2002-03-20 10:09   ` Peter Hartley

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=20020319141554.GL470@turbolinux.com \
    --to=adilger@clusterfs.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pdh@utter.chaos.org.uk \
    /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