tech-kern archive

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

Re: vnode_has_large_blocks() (vnd.c rev 1.255)



mlelstv%serpens.de@localhost (Michael van Elst) writes:

>>AFAIK getdisksize() returns the parameters of the vnd device, not the
>>backing store.

>It's called on sc_vp, that's the vnode opened for the backing store.

And that is the problem. The VREG vnode doesn't implement the disk ioctls
necessary to make getdisksize() work. You would need to find out the
vnode of the block device used by the mount. Unfortunately that's private
to the filesystem and may not even exist (e.g. for things like tmpfs).

I'm about to commit a change that uses mnt_stat.f_iosize instead. For
backing store on FFS that at least allows the faster method for virtual
disks with sectors of at least the fragment size, and I don't think we
can safely do smaller I/O.

On the other hand you are right, this could be decided per request.

-- 
-- 
                                Michael van Elst
Internet: mlelstv%serpens.de@localhost
                                "A potential Snark may lurk in every tree."


Home | Main Index | Thread Index | Old Index