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: mlelstv%serpens.de@localhost (Michael van Elst)
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, 1 Jan 2023 18:35:34 -0000 (UTC)

 kre%munnari.OZ.AU@localhost (Robert Elz) writes:
 
 > 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.
 
 The size only exists in the cached vnode after opening the device
 (determined by specfs, and only for real disks, not wedges that
 don't support DIOCGPARTINFO). FFS returns data from the vnode for
 stat() but tmpfs keeps its own size value in its own tmpfs_node
 structure that specfs doesn't know about.
 
 Not sure where the information gets lost with NFS.
 


Home | Main Index | Thread Index | Old Index