xfs
[Top] [All Lists]

libgdbm open & xfs problems

To: linux-xfs@xxxxxxxxxxx
Subject: libgdbm open & xfs problems
From: Andrei Pelinescu-Onciul <pelinescu-onciul@xxxxxxxxxxxx>
Date: Fri, 06 Jul 2001 16:06:50 +0200
Sender: owner-linux-xfs@xxxxxxxxxxx

I have encountered a strange problem trying to  build a nis database on
a xfs partition. For some values of  sunit and swidth I cannot build the
database.

For example:
echo "test test" |  /usr/lib/yp/makedbm - /tmp/x

fails with makedbm: Cannot open /tmp/x~.
I've traced it down to a call to gdbm_open which fails. 

The strange thing is that if I mount the xfs filesystem with noalign, or
I use  mkfs.xfs with sunit=0 and swidth=0 it works.

It works also for mkfs.xfs -f -d sunit=128,swidth=256, but it does not
work for 
 mkfs.xfs -f -d sunit=128,swidth=384.

I tested it with 2.4.2-xfs, 2.4.6-pre3-xfs and 2.4.7-pre3-xfs.
I use libgdbm 1.7.3.


ltrace /usr/lib/yp/makedbm /tmp/test /var/tmp/x
[...]
fopen("/tmp/test", "r")                           = 0x0804b2b8
calloc(1, 13)                                     = 0x0804b428
sprintf("/var/tmp/x~", "%s~", "/var/tmp/x")       = 11
gdbm_open(0x0804b428, 0, 19, 384, 0)              = 0
(here it fails, gdbm_open should return non-null)


strace /usr/lib/yp/makedbm /tmp/test /var/tmp/x
[...]
open("/tmp/test", O_RDONLY)             = 3
open("/var/tmp/x~", O_RDWR|O_CREAT, 0600) = 4
fstat64(4, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
fcntl64(0x4, 0x6, 0xbffffb54, 0xbffffb64) = 0
old_mmap(NULL, 200704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x4014b000
fsync(4)                                = 0
fcntl64(0x4, 0x6, 0xbffffadc, 0x40000)  = 0
close(4)                                = 0
munmap(0x4014b000, 200704)              = 0
write(2, "makedbm: Cannot open /var/tmp/x~"
[...]



Andrei

<Prev in Thread] Current Thread [Next in Thread>