Re: PBHGetVInfoSync result changed in Snow Leopard?
Re: PBHGetVInfoSync result changed in Snow Leopard?
- Subject: Re: PBHGetVInfoSync result changed in Snow Leopard?
- From: Timo Naroska <email@hidden>
- Date: Thu, 10 Sep 2009 22:18:40 +0200
Hi Jim,
thanks for the quick response. I'm seeing the issue on our own
'AdobeDrive' filesystem type.
I haven't encountered it on any of the standard macosx file systems,
yet.
Free space on the mounted server is about 190 GB. df reports:
Filesystem 512-blocks Used Available Capacity
Mounted on
versioncue://10.32.176.82:51000 404627472 1453416 403174056
1% /Users/tnaroska/Documents/Adobe Drive/DEV-MASTER
PBHGetVInfoSync() on Snow Leopard reports both ioVAlBlkSiz and
ioVNmAlBlks = 0.
For the same mounted volume on Leopard I get ioVAlBlkSiz = 679 and
ioVNmAlBlks = 3161600.
This is all i386 code.
I also ran FSMegaInfo on the Volume:
statfs 'Documents/Adobe Drive/DEV-MASTER/'
f_bsize = 4096 (4 KB)
f_iosize = 65536 (64 KB)
f_blocks = 50578434 (192 GB)
f_bfree = 50396757 (192 GB)
f_bavail = 50396757 (192 GB)
f_files = 65535
f_ffree = 65533
f_fsid.val[0] = 0x2e000004
f_fsid.val[1] = 0x00000016
f_owner = 501 (tnaroska)
f_reserved1 = 0
f_type = 22 (???)
f_flags = 0x0000001c
f_fstypename = 'AdobeDriveCS5'
f_mntonname = '/Users/tnaroska/Documents/Adobe Drive/DEV-MASTER'
f_mntfromname = 'versioncue://10.32.176.82:51000'
Thanks,
Timo
On 10.09.2009, at 20:57, Jim Luther wrote:
Timo,
The values returned in ioVAlBlkSiz and ioVNmAlBlks are derived from
f_bsize and f_blocks returned by statfs(2). Derived because
ioVAlBlkSiz is (UInt32) and ioVNmAlBlks is (UInt16) while f_bsize is
uint32_t and f_blocks is uint64_t, so we try to come up with munged
values that work up on up to 2 GB volumes (larger volumes get capped
values).
Could you give me a little more information about the volume you are
seeing this on and your code?
- What filesystem type is the volume you're seeing this with? Use the
mount(8) command with no arguments to see the list of filesystems. The
type will be hfs, nfs, msdos, etc.
- What does "df <path-to-volume>" show you for the volume?
- What architecture is your code (ppc or i386)?
Thanks.
Jim
On Sep 10, 2009, at 9:42 AM, Timo Naroska wrote:
Hi All,
we encountered a problem with Carbon based applications when
accessing our custom File System on Snow Leopard.
The applications in question use the (deprecated) PBHGetVInfoSync()
call to retrieve a kind of "optimal I/O size".
The specific value returned by PBHGetVInfoSync() is in
volumeParam.ioVAlBlkSiz. It appears that on Leopard there is
some random non-zero value returned. At least I was not able to
determine how the returned value relates to any
information that my kernel driver returns either in vfs_getattr or
in the vfsstatfs structure.
However on Snow Leopard the call always returns zero in ioVAlBlkSiz
which results in infinite loops in the applications
as they are using the value as increment in read/write file loops.
I see that PBHGetVInfoSync() is long deprecated and that the apps
not checking for zero values is bad style, but the question
remains which volume attributes in the unix kernel world are used to
determine ioVAlBlkSiz and whether the change in Snow
Leopard is as designed or a bug?
Any help appreciated,
Timo
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden