[OpenAFS-devel] [Win32] smb_ReceiveTran2QFSInfo, disk free problem

Kevin Rowland krowland@nd.edu
Tue, 3 Sep 2002 10:56:44 -0500 (EST)


Hello,

Has anyone already (successfully) implemented a fix for displaying the 
correct disk usage/free statistic when clicking on the properties of a 
drive mapped into AFS?

I found the thread in March that proposed wrapping part of the 
smb_tran2QFSInfo_t struct in #pragma pack(push, 2) so that the compiler 
would pack on the 2 byte boundary instead of the default (4?). However, no 
solution was offered WRT smb3.c where the numbers are hardcoded:

long smb_ReceiveTran2QFSInfo(smb_vc_t *vcp, smb_tran2Packet_t *p, 
smb_packet_t *op)
{

...snip...

        switch (p->parmsp[0]) {
        case 1:
                /* alloc info */
                qi.u.allocInfo.FSID = 0;
                qi.u.allocInfo.sectorsPerAllocUnit = 1;
                qi.u.allocInfo.totalAllocUnits = 0x7fffffff;
                qi.u.allocInfo.availAllocUnits = 0x3fffffff;
                qi.u.allocInfo.bytesPerSector = 1024;
                break;


I'm trying to set up a call to to pioctl doing a 'VIOCGETVOLSTAT' but am 
running into what appears to be an access problem... not sure yet. (pioctl 
returns -1 and errno gets set to 13 [0xd])

Anyway, has anyone done this or have any suggestions?

Thanks for any info!

-- kevin

/------------------------------------------------------------------\
| Kevin Rowland                   Office of Information Technology |
| Sr. Systems Engineer            University of Notre Dame         |
|                                                                  |
| pgpKeyID: 0x83C89CCE                                             |
| fingerprint: 7750 F81A BBD9 8487 18DC  5312 154E FCBA 83C8 9CCE  |
| http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x83C89CCE     |
\------------------------------------------------------------------/