tech-net archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Subtle NFS incompatibility with SunOS 4.1.1 on 68K
On Mar 29, 2020, at 12:01 AM, Michael van Elst <mlelstv%serpens.de@localhost> wrote:
>
> On Sat, Mar 28, 2020 at 04:58:41PM -0700, Chris Hanson wrote:
>>>
>>> I'd like to see what st_blksize value you get when you stat() a file
>>> on the SunOS client. Unfortunately there is no stat(1) program, maybe
>>> adb can help and you can get the result of:
>>>
>>> | fstat (4, 0xdfffe54) = 0
>>
>> I can always mount an NFS directory served by Linux and compile something there. (I did that to build gas and gcc, which work for building stuff via NetBSD-served NFS.)
>
> Yes, check what st_blksize is reported by Linux and what write() size
> you get there.
NFS from NetBSD (with my hack mentioned earlier):
ferrari% ./stat ~/projects/stat/stat.c
stat("/home/cmh/projects/stat/stat.c")
stat.st_blksize = 65536 (0x10000)
stat.st_blocks = 16 (0x10)
NFS from Linux:
ferrari% ./stat /mnt2/projects/stat/stat.c
stat("/mnt2/projects/stat/stat.c")
stat.st_blksize = 4096 (0x1000)
stat.st_blocks = 8 (0x8)
And below is a trace of assembling hello.c with cwd on NFS from Linux.
— Chris
ferrari% trace /bin/as -o hello.o -mc68020 /tmp/ccom.09488.1.s
open ("/usr/lib/ld.so", 0, 021044) = 3
read (3, "".., 32) = 32
mmap (0, 139264, 0x5, 0x80000002, 3, 0) = 0xdddc000
mmap (0xddfc000, 8192, 0x7, 0x80000012, 3, 24576) = 0xddfc000
munmap (0xdde2000, 106496) = 0
open ("/dev/zero", 0, 021152) = 4
getrlimit (3, 0xdfffdb4) = 0
mmap (0xde00000, 8192, 0x3, 0x80000012, 4, 0) = 0xde00000
close (3) = 0
getuid () = 1000
getgid () = 100
open ("/etc/ld.so.cache", 0, 01570000140) = 3
fstat (3, 0xdfffd24) = 0
mmap (0, 8192, 0x1, 0x80000001, 3, 0) = 0xddf8000
close (3) = 0
open ("/usr/lib/libc.so.0.15.2", 0, 01567347332) = 3
read (3, "".., 32) = 32
mmap (0, 409600, 0x5, 0x80000002, 3, 0) = 0xdd76000
mmap (0xddd6000, 16384, 0x7, 0x80000012, 3, 385024) = 0xddd6000
close (3) = 0
open ("/usr/lib/libdl.so.1.0", 0, 01567347162) = 3
read (3, "".., 32) = 32
mmap (0, 139264, 0x5, 0x80000002, 3, 0) = 0xdd52000
mmap (0xdd72000, 8192, 0x7, 0x80000012, 3, 8192) = 0xdd72000
close (3) = 0
close (4) = 0
sigblock (0x2) = 0
sigvec (2, 0xdfffe70, 0xdfffe64) = 0
sigvec (2, 0xdfffe34, 0) = 0
sigsetmask (0) = 0x2
open ("/tmp/ccom.09488.1.s", 0, 0666) = 3
open ("hello.o", 03001, 0666) = 4
close (4) = 0
getpagesize () = 8192
brk (0x474d4) = 0
brk (0x494d4) = 0
brk (0x4d4d4) = 0
ioctl (3, 0x40125401, 0xdfffd74) = -1 ENOTTY (Inappropriate ioctl for device)
fstat (3, 0xdfffda8) = 0
brk (0x5f4d4) = 0
read (3, "LL0:\n\t.data\n\t.text\n\t.proc\n|#PROC".., 65536) = 354
read (3, "", 65536) = 0
lseek (3, 0, 0) = 0
open ("hello.o", 03001, 0666) = 4
fstat (4, 0xdfffe30) = 0
getpid () = 9492
stat ("/tmp/as68XXa09492", 0xdfffe30) = -1 ENOENT (No such file or directory)
open ("/tmp/as68XXa09492", 03001, 0666) = 5
open ("/tmp/as68XXa09492", 01001, 0666) = 6
lseek (6, 0, 2) = 0
lseek (6, 60, 0) = 60
brk (0x614d4) = 0
read (3, "LL0:\n\t.data\n\t.text\n\t.proc\n|#PROC".., 65536) = 354
ioctl (5, 0x40125401, 0xdfffc38) = -1 ENOTTY (Inappropriate ioctl for device)
fstat (5, 0xdfffc6c) = 0
brk (0x734d4) = 0
read (3, "", 65536) = 0
write (5, "".., 24) = 24
close (5) = 0
close (6) = 0
open ("/tmp/as68XXa09492", 0, 0666) = 5
ioctl (5, 0x40125401, 0xdfffd74) = -1 ENOTTY (Inappropriate ioctl for device)
fstat (5, 0xdfffda8) = 0
read (5, "".., 65536) = 24
lseek (5, 0, 1) = 24
lseek (5, 60, 0) = 60
lseek (4, 88, 0) = 88
write (4, "".., 58) = 58
lseek (4, 128, 0) = 128
write (4, "".., 4) = 4
close (5) = 0
unlink ("/tmp/as68XXa09492") = 0
lseek (4, 0, 0) = 0
write (4, "".., 32) = 32
lseek (4, 72, 0) = 72
write (4, "Hello, world!\n\0", 15) = 15
lseek (4, 32, 0) = 32
write (4, "".., 36) = 36
close (0) = 0
close (1) = 0
close (2) = 0
close (3) = 0
close (4) = 0
exit (0) = ?
Home |
Main Index |
Thread Index |
Old Index