Linux MIPS Architecture development
 help / color / mirror / Atom feed
* RE: Does e2fsprogs-1.26 work on mips?
@ 2002-03-25 10:52 Peter Hartley
  2002-03-25 17:07 ` H . J . Lu
  0 siblings, 1 reply; 10+ messages in thread
From: Peter Hartley @ 2002-03-25 10:52 UTC (permalink / raw)
  To: 'H . J . Lu', Andrew Morton
  Cc: tytso, linux-mips, linux kernel, GNU C Library

H J Lu wrote:
> I look at the glibc code. It uses a constant RLIM_INFINITY for a given
> arch. The user always passes (~0UL) to glibc on x86. glibc will check
> if the kernel supports the new getrlimit at the run time. If it
> doesn't, glibc will adjust the RLIM_INFINITY for setrlimit. I 
> don't see
> how glibc 2.2.5 compiled under kernel 2.2 will fail under 2.4 due to
> this unless glibc is misconfigureed or miscompiled.

It's not a question of which kernel glibc is compiled under, it's a question
of which version of the kernel headers (/usr/include/{linux,asm}) glibc is
compiled against.

A glibc, even the newest glibc, *compiled against 2.2 headers* cannot know
about the new getrlimit, so the run-time test cannot be compiled and is not
used. Such a glibc subsequently breaks fsck if run under a 2.4 kernel.

Recompile your glibc against 2.4 headers and you should get a glibc and fsck
that work if run under either a 2.2 or 2.4 kernel.

The necessary kernel patch to fix this mess is in the latest -pre-ac (thanks
Alan).

	Peter

^ permalink raw reply	[flat|nested] 10+ messages in thread
* RE: Does e2fsprogs-1.26 work on mips?
@ 2002-03-25 19:00 Peter Hartley
  0 siblings, 0 replies; 10+ messages in thread
From: Peter Hartley @ 2002-03-25 19:00 UTC (permalink / raw)
  To: linux-mips, linux kernel, GNU C Library

H J Lu wrote:
> What are you talking about? It doesn't matter which kernel header
> is used. glibc doesn't even use /usr/include/asm/resource.h nor
> should any user space applications.

It's not about /usr/include/asm/resource.h, it's about
/usr/include/asm/unistd.h, where the syscall numbers are defined.

This is presumably what the "#ifdef __NR_ugetrlimit" in
sysdeps/unix/sysv/linux/i386/getrlimit.c is meant to be testing against --
nothing in the glibc-2.2.5 distribution itself defines that symbol. Surely a
Linux glibc doesn't compile without the target system's linux/* and asm/*
headers?

2.4's /usr/include/asm/unistd.h defines __NR_ugetrlimit but 2.2's doesn't.

	Peter

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Does e2fsprogs-1.26 work on mips?
@ 2002-03-23 22:07 H . J . Lu
  2002-03-24  0:21 ` Andrew Morton
  0 siblings, 1 reply; 10+ messages in thread
From: H . J . Lu @ 2002-03-23 22:07 UTC (permalink / raw)
  To: Andrew Morton; +Cc: tytso, linux-mips

I got

[root@localhost e2fsprogs-1.26]# ./e2fsck/e2fsck -f /dev/hda1
e2fsck 1.26 (3-Feb-2002)
Pass 1: Checking inodes, blocks, and sizes
File size limit exceeded

on Linux/mipsel. /dev/hda1 is a 7GB ext3 partition. e2fsprogs-1.23
works fine. Strace

open("/dev/hda1", O_RDWR|O_LARGEFILE)   = 4
fstat(4, {st_mode=S_IFBLK|0660, st_rdev=makedev(3, 1), ...}) = 0
setrlimit(RLIMIT_FSIZE, {rlim_cur=-1, rlim_max=-1}) = 0
getrlimit(RLIMIT_FSIZE, {rlim_cur=-1, rlim_max=-1}) = 0
lseek(4, 1024, SEEK_SET)                = 1024
read(4, "\0\200\22\0b\357$\0\304\330\1\0\230\211\36\0\35\322\21"..., 1024) =
102
4
lseek(4, 4096, SEEK_SET)                = 4096
read(4, "\2\0\0\0\3\0\0\0\4\0\0\0\0\0\365?\2\0\0\0\0\0\0\0\0\0\0"..., 4096) =
40
96
time(NULL)                              = 1016919001
lseek(4, 1072, SEEK_SET)                = 1072
write(4, "\331\363", 2)                 = 2
lseek(4, 1120, SEEK_SET)                = 1120
write(4, "\2\0", 2)                     = 2
lseek(4, 4096, SEEK_SET)                = 4096
write(4, "\2\0\0\0\3\0\0\0\4\0\0\0\0\0\365?\2\0\0\0\0\0\0\0\0\0\0"..., 4096) =
4
096
lseek(4, 134217728, SEEK_SET)           = 134217728
write(4, "\0\200\22\0b\357$\0\304\330\1\0\230\211\36\0\35\322\21"..., 1024) =
10
24
lseek(4, 134221824, SEEK_SET)           = 134221824
write(4, "\2\0\0\0\3\0\0\0\4\0\0\0\0\0\365?\2\0\0\0\0\0\0\0\0\0\0"..., 4096) =
4
096
lseek(4, 402653184, SEEK_SET)           = 402653184
write(4, "\0\200\22\0b\357$\0\304\330\1\0\230\211\36\0\35\322\21"..., 1024) =
10
24
lseek(4, 402657280, SEEK_SET)           = 402657280
write(4, "\2\0\0\0\3\0\0\0\4\0\0\0\0\0\365?\2\0\0\0\0\0\0\0\0\0\0"..., 4096) =
4
096
lseek(4, 671088640, SEEK_SET)           = 671088640
write(4, "\0\200\22\0b\357$\0\304\330\1\0\230\211\36\0\35\322\21"..., 1024) =
10
24
lseek(4, 671092736, SEEK_SET)           = 671092736
write(4, "\2\0\0\0\3\0\0\0\4\0\0\0\0\0\365?\2\0\0\0\0\0\0\0\0\0\0"..., 4096) =
4
096
lseek(4, 939524096, SEEK_SET)           = 939524096
write(4, "\0\200\22\0b\357$\0\304\330\1\0\230\211\36\0\35\322\21"..., 1024) =
10
24
lseek(4, 939528192, SEEK_SET)           = 939528192
write(4, "\2\0\0\0\3\0\0\0\4\0\0\0\0\0\365?\2\0\0\0\0\0\0\0\0\0\0"..., 4096) =
4
096
lseek(4, 1207959552, SEEK_SET)          = 1207959552
write(4, "\0\200\22\0b\357$\0\304\330\1\0\230\211\36\0\35\322\21"..., 1024) =
10
24
lseek(4, 1207963648, SEEK_SET)          = 1207963648
write(4, "\2\0\0\0\3\0\0\0\4\0\0\0\0\0\365?\2\0\0\0\0\0\0\0\0\0\0"..., 4096) =
4
096
_llseek(4, 18446744072770027520, [3355443200], SEEK_SET) = 0
write(4, "\0\200\22\0b\357$\0\304\330\1\0\230\211\36\0\35\322\21"..., 1024) =
10
24
_llseek(4, 18446744072770031616, [3355447296], SEEK_SET) = 0
write(4, "\2\0\0\0\3\0\0\0\4\0\0\0\0\0\365?\2\0\0\0\0\0\0\0\0\0\0"..., 4096) =
4
096
_llseek(4, 18446744073038462976, [3623878656], SEEK_SET) = 0
write(4, "\0\200\22\0b\357$\0\304\330\1\0\230\211\36\0\35\322\21"..., 1024) =
10
24
_llseek(4, 18446744073038467072, [3623882752], SEEK_SET) = 0
write(4, "\2\0\0\0\3\0\0\0\4\0\0\0\0\0\365?\2\0\0\0\0\0\0\0\0\0\0"..., 4096) =
4
096
_llseek(4, 18446744071696285696, [6576668672], SEEK_SET) = 0
write(4, "\0\200\22\0b\357$\0\304\330\1\0\230\211\36\0\35\322\21"..., 1024) =
-1
 EFBIG (File too large)
--- SIGXFSZ (File size limit exceeded) ---
+++ killed by SIGXFSZ +++

Any ideas?


H.J.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2002-03-26 11:03 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-03-25 10:52 Does e2fsprogs-1.26 work on mips? Peter Hartley
2002-03-25 17:07 ` H . J . Lu
  -- strict thread matches above, loose matches on Subject: below --
2002-03-25 19:00 Peter Hartley
2002-03-23 22:07 H . J . Lu
2002-03-24  0:21 ` Andrew Morton
     [not found]   ` <20020323221627.A10953@lucon.org>
     [not found]     ` <3C9D7A42.B106C62D@zip.com.au>
2002-03-24  9:28       ` H . J . Lu
2002-03-25  5:31         ` Theodore Tso
2002-03-25  5:43           ` Andrew Morton
2002-03-26  6:54             ` Theodore Tso
2002-03-26 10:51               ` Paul Mackerras

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox