All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jeff V. Merkey" <jmerkey@drdos.com>
To: linux-kernel@vger.kernel.org, jmerkey@comcast.net
Subject: 2.6.9-rc2-mm4 stat -f sickness
Date: Mon, 04 Oct 2004 14:46:39 -0600	[thread overview]
Message-ID: <4161B6AF.1010705@drdos.com> (raw)

In 2.6.9-rc2-mm4 the command "stat -f /dev/<device>" always returns
EXT2_SUPER_MAGIC and other bogus information even if other filesystems
are mounted on the device.  

Trace info attached.   Reported mount info, strace info, and stat -f
info included.

mount info

/dev/hda3 on / type ext3 (rw)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
usbdevfs on /proc/bus/usb type usbdevfs (rw)
/dev/hda1 on /boot type ext3 (rw)
none on /dev/shm type tmpfs (rw)
/dev/sda1 on /pfs type dsfs (rw)
/dev/sda2 on /storage type dsfs (rw)

df -h (df says .....)

Filesystem            Size  Used Avail Use% Mounted on
/dev/hda3             9.7G  7.2G  2.0G  79% /
/dev/hda1             190M  9.5M  171M   6% /boot
none                  1.5G     0  1.5G   0% /dev/shm
/dev/sda1             936G  936G     0 100% /pfs
/dev/sda2             936G  936G     0 100% /storage

stat -f /dev/sda1 (bogus info)
 
  File: "/dev/sda1"
    ID: 0        Namelen: 255     Type: ext2/ext3
Blocks: Total: 2520130    Free: 651513     Available: 523496     Size: 4096
Inodes: Total: 1281696    Free: 878949    

strace of stat -f /dev/sda1 (bogus info)

execve("/usr/bin/stat", ["stat", "-f", "/dev/sda1"], [/* 26 vars */]) = 0
uname({sys="Linux", node="datascout4", ...}) = 0
brk(0)                                  = 0x8052000
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=123802, ...}) = 0
old_mmap(NULL, 123802, PROT_READ, MAP_PRIVATE, 3, 0) = 0x37fcc000
close(3)                                = 0
open("/lib/libselinux.so.1", O_RDONLY)  = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\350\261"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=60776, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x37fcb000
old_mmap(0x47898000, 64532, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x37fbb000
old_mmap(0x37fc9000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xd000) = 0x37fc9000
close(3)                                = 0
open("/lib/tls/libc.so.6", O_RDONLY)    = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300\v\327"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1455084, ...}) = 0
old_mmap(0x46d5c000, 1158124, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x37ea0000
old_mmap(0x37fb5000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x115000) = 0x37fb5000
old_mmap(0x37fb9000, 7148, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x37fb9000
close(3)                                = 0
mprotect(0x37fb5000, 8192, PROT_READ)   = 0
mprotect(0x38000000, 4096, PROT_READ)   = 0
set_thread_area({entry_number:-1 -> 6, base_addr:0x37fcbae0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
munmap(0x37fcc000, 123802)              = 0
brk(0)                                  = 0x8052000
brk(0x8073000)                          = 0x8073000
open("/proc/mounts", O_RDONLY)          = 3
fstat64(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x37fea000
read(3, "rootfs / rootfs rw 0 0\n/dev/root"..., 1024) = 285
read(3, "", 1024)                       = 0
close(3)                                = 0
munmap(0x37fea000, 4096)                = 0
open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=40263984, ...}) = 0
mmap2(NULL, 2097152, PROT_READ, MAP_PRIVATE, 3, 0) = 0x37ca0000
close(3)                                = 0
statfs64("/dev/sda1", 84, {f_type="EXT2_SUPER_MAGIC", f_bsize=4096, f_blocks=2520130, f_bfree=651513, f_bavail=523496, f_files=1281696, f_ffree=878950, f_fsid={0, 0}, f_namelen=255, f_frsize=4096}) = 0
fstat64(1, {st_mode=S_IFREG|0644, st_size=2718, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x37c9f000
write(1, "  File: \"/dev/sda1\"\n    ID: 0   "..., 189  File: "/dev/sda1"
    ID: 0        Namelen: 255     Type: ext2/ext3
Blocks: Total: 2520130    Free: 651513     Available: 523496     Size: 4096
Inodes: Total: 1281696    Free: 878950    
) = 189
close(1)                                = 0
munmap(0x37c9f000, 4096)                = 0
exit_group(0)                           = ?


Get the can of RAID.  Monster bugs.



Jeff


             reply	other threads:[~2004-10-04 21:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-04 20:46 Jeff V. Merkey [this message]
2004-10-04 21:35 ` 2.6.9-rc2-mm4 stat -f sickness Russell King

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=4161B6AF.1010705@drdos.com \
    --to=jmerkey@drdos.com \
    --cc=jmerkey@comcast.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.