NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/57134: st_size of stat on vnd raw partition sometimes is 0, causing newfs to fail



The following reply was made to PR kern/57134; it has been noted by GNATS.

From: Robert Elz <kre%munnari.OZ.AU@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: kern/57134: st_size of stat on vnd raw partition sometimes is 0, causing newfs to fail
Date: Sun, 01 Jan 2023 20:42:53 +0700

     Date:        Sun,  1 Jan 2023 10:50:02 +0000 (UTC)
     From:        "J. Hannken-Illjes" <hannken%mailbox.org@localhost>
     Message-ID:  <20230101105002.EBBD91A923A%mollari.NetBSD.org@localhost>
 
   |  This has nothing to do with "st_size", I hope it is
   |  undefined for devices but I'm not a POSIX expert.
 
 It is unspecified for devices, which allows implementations to do
 whatever they like (and which means portable applications, of which
 newfs is not intended to be one, should not depend upon the info).
 
 
   |  Should fix PR kern/57134: st_size of stat on vnd raw partition sometimes
   |  is 0, causing newfs to fail
 
 It very likely will, as newfs uses the size from getdiskinfo() (from the
 fsck sources) if st_size of the device is 0.
 
 So that should fix the immediate problem.
 
 It doesn't explain why st_size on a vnd device returns the underlying
 file size when its inode is on a UFS2 filesystem, but doesn't when it
 is on a tmpfs or NFS filesystem.   That would be nice to discover.
 
 kre
 


Home | Main Index | Thread Index | Old Index