Value: TheseCells
Type: REG_MULTI_SZ
NSIS: <not set>
When Kerberos v5 is being used, TheseCells provides a
***************
*** 7534,7552 ****
A.2.1.2 Selection of
! effective values for domain specific configuration
During
login to domain X, where X is the domain passed into NPLogonNotify as
lpAuthentInfo->LogonDomainName or the string 'LOCALHOST' if
! lpAuthentInfo->LogonDomainName equals the name of the computer, the
! following keys will be looked up.
1.
--- 7821,7840 ----
A.2.1.2 Selection of effective values for
! domain specific configuration
During
login to domain X, where X is the domain passed into NPLogonNotify as
lpAuthentInfo->LogonDomainName or the string 'LOCALHOST' if
! lpAuthentInfo->LogonDomainName equals the name of the computer, the following
! keys will be looked up.
1.
***************
*** 7576,7588 ****
this rule are stated below.
A.2.1.3 Exceptions to
! A.2.1.2
To
retain backwards compatibility, the following exceptions are made to 2.1.2.
--- 7864,7876 ----
this rule are stated below.
A.2.1.3 Exceptions to A.2.1.2
To
retain backwards compatibility, the following exceptions are made to 2.1.2.
***************
*** 7615,7639 ****
setting this value.
A.3.
! AFS Credentials System Tray Tool parameters
Affects
the behavior of afscreds.exe
Regkey:
! [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]
--- 7903,7930 ----
setting this value.
A.3. AFS Credentials
! System Tray Tool parameters
Affects
the behavior of afscreds.exe
Regkey:
! [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]
***************
*** 7641,7647 ****
Value: Gateway
Type: REG_SZ
--- 7932,7938 ----
Value: Gateway
Type: REG_SZ
***************
*** 7655,7661 ****
Value: Cell
Type: REG_SZ
--- 7946,7952 ----
Value: Cell
Type: REG_SZ
***************
*** 7668,7681 ****
Regkey:
[HKLM\SOFTWARE\OpenAFS\Client]
! [HKCU\SOFTWARE\OpenAFS\Client]
Regkey:
[HKLM\SOFTWARE\OpenAFS\Client]
! [HKCU\SOFTWARE\OpenAFS\Client]
***************
*** 7683,7697 ****
Value: ShowTrayIcon
Type: DWORD {0, 1}
Default: 1
Function: InitApp(), Main_OnCheckTerminate()
! This value is used to determine whether or not a shortcut
! should be maintained in the user's Start Menu->Programs->Startup
! folder.
This value used to be stored at
[HKLM\Software\TransarcCorporation\AFS Client\AfsCreds].
The current user value is checked first; if it does not
--- 7975,7989 ----
Value: ShowTrayIcon
Type: DWORD {0, 1}
Default: 1
Function: InitApp(), Main_OnCheckTerminate()
! This value is used to determine whether or not a
! shortcut should be maintained in the user's Start
! Menu->Programs->Startup folder.
This value used to be stored at
[HKLM\Software\TransarcCorporation\AFS Client\AfsCreds].
The current user value is checked first; if it does not
***************
*** 7702,7709 ****
Value: EnableKFW
Type: DWORD {0, 1}
--- 7994,8001 ----
Value: EnableKFW
Type: DWORD {0, 1}
***************
*** 7733,7749 ****
href="mailto:user/admin@REALM">user/admin@REALM " are
! interpreted as the same user identity within the cell. To enable both
! names to be sent to the server by AFSCreds or Integrated Logon, set this value
! to 1.
! Value:
Use524
Type: DWORD {0, 1}
Default: 0
--- 8025,8041 ----
href="mailto:user/admin@REALM">user/admin@REALM " are
! interpreted as the same user identity within the cell. To enable both names
! to be sent to the server by AFSCreds or Integrated Logon, set this value to
! 1.
! Value:
Use524
Type: DWORD {0, 1}
Default: 0
***************
*** 7759,7767 ****
Value: AfscredsShortcutParams
Type: REG_SZ
Default: "-A -M -N -Q"
Function: Shortcut_FixStartup
--- 8051,8060 ----
Value:
! AfscredsShortcutParams
Type: REG_SZ
Default: "-A -M -N -Q"
Function: Shortcut_FixStartup
***************
*** 7786,7798 ****
Regkey:
! [HKCU\SOFTWARE\OpenAFS\Client]
Regkey:
! [HKCU\SOFTWARE\OpenAFS\Client]
***************
*** 7801,7807 ****
Value: Authentication Cell
Type: REG_SZ
--- 8095,8101 ----
Value: Authentication Cell
Type: REG_SZ
***************
*** 7814,7826 ****
Regkey:
! [HKCU\SOFTWARE\OpenAFS\Client\Reminders]
Regkey:
! [HKCU\SOFTWARE\OpenAFS\Client\Reminders]
***************
*** 7829,7835 ****
Value: "afs cell name"
Type: DWORD {0, 1}
--- 8124,8130 ----
Value: "afs cell name"
Type: DWORD {0, 1}
***************
*** 7844,7856 ****
Regkey:
! [HKCU\SOFTWARE\OpenAFS\Client\Active Maps]
Regkey:
! [HKCU\SOFTWARE\OpenAFS\Client\Active Maps]
***************
*** 7859,7865 ****
Value: "upper case drive letter"
Type: DWORD {0, 1}
--- 8155,8161 ----
Value: "upper case drive letter"
Type: DWORD {0, 1}
***************
*** 7872,7884 ****
Regkey:
! [HKCU\SOFTWARE\OpenAFS\Client\Mappings]
Regkey:
! [HKCU\SOFTWARE\OpenAFS\Client\Mappings]
***************
*** 7887,7893 ****
Value: "upper case drive letter"
Type: REG_SZ
--- 8184,8190 ----
Value: "upper case drive letter"
Type: REG_SZ
***************
*** 7900,7921 ****
A.4 OpenAFS Client Service Environment
! Variables
Variable: AFS_RPC_ENCRYPT
Values: "OFF" disables the use of
--- 8197,8219 ----
A.4 OpenAFS Client Service Environment Variables
Variable: AFS_RPC_ENCRYPT
Values: "OFF" disables the use of
***************
*** 7926,7932 ****
Variable: AFS_RPC_PROTSEQ
Values:
--- 8224,8230 ----
Variable: AFS_RPC_PROTSEQ
Values:
Index: openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/toc.htm
diff -c openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/toc.htm:1.2.6.38 openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/toc.htm:1.2.6.39
*** openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/toc.htm:1.2.6.38 Tue Oct 7 18:10:01 2008
--- openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/toc.htm Fri Nov 7 19:06:52 2008
***************
*** 1,41 ****
!
!
! OpenAFS for Windows 1.5.54 Table of Contents
!
!
!
!
!
!
!
!
--- 426,2222 ----
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
+ mso-style-priority:99;
+ mso-style-qformat:yes;
mso-style-parent:"";
! mso-padding-alt:0in 5.4pt 0in 5.4pt;
! mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
! font-family:"Times New Roman","serif";}
!
!
Index: openafs/src/WINNT/install/NSIS/CellServDB
diff -c openafs/src/WINNT/install/NSIS/CellServDB:1.6.4.5 openafs/src/WINNT/install/NSIS/CellServDB:1.6.4.6
*** openafs/src/WINNT/install/NSIS/CellServDB:1.6.4.5 Wed Apr 23 23:08:31 2008
--- openafs/src/WINNT/install/NSIS/CellServDB Fri Nov 7 21:29:26 2008
***************
*** 1,4 ****
! >grand.central.org #GCO Public CellServDB 23 Apr 2008
18.92.0.108 #grand-opening.mit.edu
128.2.203.61 #penn.central.org
130.237.48.87 #andrew.e.kth.se
--- 1,4 ----
! >grand.central.org #GCO Public CellServDB 07 Nov 2008
18.92.0.108 #grand-opening.mit.edu
128.2.203.61 #penn.central.org
130.237.48.87 #andrew.e.kth.se
***************
*** 11,19 ****
193.170.243.12 #baloo.oeaw.ac.at
193.170.243.14 #akela.oeaw.ac.at
>cgv.tugraz.at #CGV cell
! 129.27.224.133 #phobos.cgv.tugraz.at
! 129.27.224.134 #deimos.cgv.tugraz.at
! 129.27.224.210 #trinculo.cgv.tugraz.at
>itp.tugraz.at #Institute of Theoretical and Computational Physics, TU Graz, Aus
129.27.161.7 #faepafs1.tu-graz.ac.at
129.27.161.15 #faepafs2.tu-graz.ac.at
--- 11,19 ----
193.170.243.12 #baloo.oeaw.ac.at
193.170.243.14 #akela.oeaw.ac.at
>cgv.tugraz.at #CGV cell
! 129.27.218.30 #phobos.cgv.tugraz.at
! 129.27.218.31 #deimos.cgv.tugraz.at
! 129.27.218.32 #trinculo.cgv.tugraz.at
>itp.tugraz.at #Institute of Theoretical and Computational Physics, TU Graz, Aus
129.27.161.7 #faepafs1.tu-graz.ac.at
129.27.161.15 #faepafs2.tu-graz.ac.at
***************
*** 44,49 ****
--- 44,51 ----
129.129.190.142 #afs02.psi.ch
>extundo.com #Simon Josefsson's cell
195.42.214.241 #slipsten.extundo.com
+ >freedaemon.com #Free Daemon Consulting, Oklahoma City, OK, USA
+ 66.210.104.254 #afs0.freedaemon.com
>membrain.com #membrain.com
66.93.118.125 #stormy
130.85.24.11 #weasel
***************
*** 57,64 ****
195.113.0.36 #asterix.ruk.cuni.cz
195.113.0.37 #obelix.ruk.cuni.cz
195.113.0.40 #sal.ruk.cuni.cz
>desy.de #Deutsches Elektronen-Synchrotron
! 131.169.40.62 #vayu.desy.de
131.169.244.60 #solar00.desy.de
>gppc.de #GPP Chemnitz mbH
213.187.92.33 #gpp1.gppc.de
--- 59,75 ----
195.113.0.36 #asterix.ruk.cuni.cz
195.113.0.37 #obelix.ruk.cuni.cz
195.113.0.40 #sal.ruk.cuni.cz
+ >ics.muni.cz #Masaryk university
+ 147.251.3.11 #grond.ics.muni.cz
+ 147.251.3.15 #nimloth.ics.muni.cz
+ 147.251.3.19 #sirion.ics.muni.cz
+ >zcu.cz #University of West Bohemia, Czech Republic
+ 147.228.10.18 #sauron.zcu.cz
+ 147.228.52.10 #oknos.zcu.cz
+ 147.228.52.17 #nic.zcu.cz
>desy.de #Deutsches Elektronen-Synchrotron
! 131.169.2.19 #afsdb2.desy.de
! 131.169.2.20 #afsdb3.desy.de
131.169.244.60 #solar00.desy.de
>gppc.de #GPP Chemnitz mbH
213.187.92.33 #gpp1.gppc.de
***************
*** 155,160 ****
--- 166,175 ----
129.219.10.70 #authen1.asu.edu
129.219.10.72 #authen3.asu.edu
129.219.100.16 #authen4.asu.edu
+ >mars.asu.edu #Mars Space Flight Facility - ASU Mars Research
+ 149.169.146.57 #kdc1.mars.asu.edu
+ 149.169.146.58 #kdc2.mars.asu.edu
+ 149.169.146.59 #kdc3.mars.asu.edu
>eecs.berkeley.edu #University of California, Berkeley - EECS Dept.
128.32.139.34 #greed.eecs.berkeley.edu
128.32.139.35 #gluttony.eecs.berkeley.edu
***************
*** 223,242 ****
129.186.6.243 #afsdb-2.iastate.edu
129.186.142.243 #afsdb-3.iastate.edu
>athena.mit.edu #MIT/Athena cell
! 18.7.1.66 #paris.mit.edu.
! 18.7.1.74 #chimera.mit.edu.
! 18.158.0.37 #prill.mit.edu.
>dev.mit.edu #MIT/IS Development cell
! 18.7.1.70 #wham.mit.edu.
! 18.92.1.219 #click.mit.edu.
! 18.92.1.220 #whirr.mit.edu.
>net.mit.edu #MIT/Network Group cell
18.7.7.73 #gracie.mit.edu
18.7.21.95 #george.mit.edu
>sipb.mit.edu #MIT/SIPB cell
! 18.181.0.19 #reynelda.mit.edu.
! 18.181.0.22 #rosebud.mit.edu.
! 18.181.0.23 #ronald-ann.mit.edu.
>soap.mit.edu #MIT School Of Architecture & Planning
18.89.1.204 #crypt.mit.edu
18.89.1.209 #grotto.mit.edu
--- 238,257 ----
129.186.6.243 #afsdb-2.iastate.edu
129.186.142.243 #afsdb-3.iastate.edu
>athena.mit.edu #MIT/Athena cell
! 18.7.1.66 #paris.mit.edu
! 18.7.1.74 #chimera.mit.edu
! 18.158.0.37 #prill.mit.edu
>dev.mit.edu #MIT/IS Development cell
! 18.7.1.70 #wham.mit.edu
! 18.92.1.219 #click.mit.edu
! 18.92.1.220 #whirr.mit.edu
>net.mit.edu #MIT/Network Group cell
18.7.7.73 #gracie.mit.edu
18.7.21.95 #george.mit.edu
>sipb.mit.edu #MIT/SIPB cell
! 18.181.0.19 #reynelda.mit.edu
! 18.181.0.22 #rosebud.mit.edu
! 18.181.0.23 #ronald-ann.mit.edu
>soap.mit.edu #MIT School Of Architecture & Planning
18.89.1.204 #crypt.mit.edu
18.89.1.209 #grotto.mit.edu
***************
*** 342,351 ****
141.211.43.104 #linat04.grid.umich.edu
>citi.umich.edu #Center for Information Technology Integration
141.211.133.5 #babylon.citi.umich.edu
- >lsa.umich.edu #University of Michigan - College of LS&A
- 141.211.211.53 #gerow.lsa.umich.edu
- 141.211.211.72 #collines.lsa.umich.edu
- 141.211.211.153 #hodges.lsa.umich.edu
>sph.umich.edu #University of Michigan -- School of Public Health
141.211.51.137 #afssph7.sph.umich.edu
141.211.51.139 #afssph0.sph.umich.edu
--- 357,362 ----
***************
*** 377,382 ****
--- 388,395 ----
144.92.13.16 #moe.cae.wisc.edu
>hep.wisc.edu #University of Wisconsin -- High Energy Physics
128.104.28.219 #anise.hep.wisc.edu
+ 144.92.180.7 #rosemary.hep.wisc.edu
+ 144.92.180.30 #fennel.hep.wisc.edu
>physics.wisc.edu #Univ. of Wisconsin-Madison, Physics Department
128.104.160.13 #kendra.physics.wisc.edu
128.104.160.14 #fray.physics.wisc.edu
***************
*** 398,403 ****
--- 411,418 ----
>grif.fr #GRIF cell
192.54.208.18 #node03.datagrid.cea.fr
>in2p3.fr #IN2P3 production cell
+ 134.158.104.11 #ccafsdb01.in2p3.fr
+ 134.158.104.12 #ccafsdb02.in2p3.fr
134.158.232.11 #ccafsdb1.in2p3.fr
134.158.232.12 #ccafsdb2.in2p3.fr
134.158.232.13 #ccafsdb3.in2p3.fr
***************
*** 431,436 ****
--- 446,453 ----
128.55.128.250 #mars.nersc.gov
128.55.128.252 #alfred.nersc.gov
128.55.128.254 #lurch.nersc.gov
+ >doe.atomki.hu #Institute of Nuclear Research (MTA ATOMKI), Debrecen, Hungary
+ 193.6.179.31 #afs.doe.atomki.hu
>bme.hu #Budapest University of Technology and Economics
152.66.241.6 #afs.iit.bme.hu
>kfki.hu #Research Institute for Nuclear and Particle Physics - Budapest,H
***************
*** 474,479 ****
--- 491,498 ----
>pi.infn.it #INFN, Sezione di Pisa
131.114.134.26 #unknownhost.pi.infn.it
192.84.133.50 #aix1.pi.infn.it
+ >roma3.infn.it #Istituto Nazionale di Fisica Nucleare (INFN), Italia
+ 193.205.159.17 #afsrm3.roma3.infn.it
>psm.it #Progetto San Marco, Universita' di Roma-1
151.100.1.65 #atlante.psm.uniroma1.it
>tgrid.it #CASPUR-CILEA-CINECA Grid Cell
***************
*** 514,522 ****
>slackers.net #The Slackers' Network
199.4.150.159 #alexandria.slackers.net
>tproa.net #The People's Republic of Ames
! 72.13.4.23 #service-3.tproa.net
! 72.13.4.24 #service-4.tproa.net
! 72.13.4.25 #service-5.tproa.net
>interdose.net #Interdose Ltd. & Co. KG, Germany
80.190.171.42 #bfd9000.tow5.interdose.net
217.111.69.188 #bfd9001.z2.interdose.net
--- 533,541 ----
>slackers.net #The Slackers' Network
199.4.150.159 #alexandria.slackers.net
>tproa.net #The People's Republic of Ames
! 204.11.35.83 #service-3.tproa.net
! 204.11.35.84 #service-4.tproa.net
! 204.11.35.85 #service-5.tproa.net
>interdose.net #Interdose Ltd. & Co. KG, Germany
80.190.171.42 #bfd9000.tow5.interdose.net
217.111.69.188 #bfd9001.z2.interdose.net
***************
*** 544,552 ****
--- 563,576 ----
128.2.120.138 #kurma.sys.hackish.org
>idahofuturetruck.org #University of Idaho hybrid vehicle development
12.18.238.210 #dsle210.fsr.net
+ >mrow.org #MROW.ORG and RITLUG Cell
+ 88.198.46.111 #mrow.org
+ 129.21.205.119 #mirror.rit.edu
>mrph.org #Mrph
66.207.133.1 #sanber.mrph.org
128.2.99.209 #hernandarias.mrph.org
+ >mstacm.org #Missouri Science & Technology - ACM
+ 131.151.88.2 #acmwork.device.mst.edu
>nimlabs.org #Nimlabs, Ink. Cell.
18.238.1.103 #olfin.nimlabs.org
18.238.1.105 #caerbanog.nimlabs.org
***************
*** 567,582 ****
130.237.24.104 #afs2.hallf.kth.se
>isk.kth.se #Royal Institute of Technology, ISK
130.237.209.5 #afsdb2.isk.kth.se
- 130.237.209.9 #afsdb3.isk.kth.se
130.237.216.17 #afsdb1.isk.kth.se
>it.kth.se #Royal Institute of Technology, IT
130.237.212.15 #ptah.it.kth.se
130.237.212.16 #toth.it.kth.se
130.237.215.7 #isis.it.kth.se
>md.kth.se #Royal Institute of Technology, MMK
130.237.57.68 #trinity.md.kth.se
130.237.57.72 #morpheus.md.kth.se
- 130.237.67.230 #neo.speech.kth.se
>mech.kth.se #Royal Institute of Technology, MECH
130.237.233.142 #matterhorn.mech.kth.se
130.237.233.143 #castor.mech.kth.se
--- 591,605 ----
130.237.24.104 #afs2.hallf.kth.se
>isk.kth.se #Royal Institute of Technology, ISK
130.237.209.5 #afsdb2.isk.kth.se
130.237.216.17 #afsdb1.isk.kth.se
>it.kth.se #Royal Institute of Technology, IT
130.237.212.15 #ptah.it.kth.se
130.237.212.16 #toth.it.kth.se
130.237.215.7 #isis.it.kth.se
>md.kth.se #Royal Institute of Technology, MMK
+ 130.237.57.21 #euler.md.kth.se
130.237.57.68 #trinity.md.kth.se
130.237.57.72 #morpheus.md.kth.se
>mech.kth.se #Royal Institute of Technology, MECH
130.237.233.142 #matterhorn.mech.kth.se
130.237.233.143 #castor.mech.kth.se
***************
*** 627,629 ****
--- 650,655 ----
194.36.2.5 #afs3.hep.man.ac.uk
>rl.ac.uk #Rutherford Appleton Lab, England
130.246.183.164 #wallace.cc.rl.ac.uk
+ 130.246.183.203 #afs1.gridpp.rl.ac.uk
+ 130.246.183.204 #afs2.gridpp.rl.ac.uk
+ 130.246.183.205 #afs3.gridpp.rl.ac.uk
Index: openafs/src/WINNT/install/NSIS/OpenAFS.nsi
diff -c openafs/src/WINNT/install/NSIS/OpenAFS.nsi:1.88.4.20 openafs/src/WINNT/install/NSIS/OpenAFS.nsi:1.88.4.21
*** openafs/src/WINNT/install/NSIS/OpenAFS.nsi:1.88.4.20 Tue Jul 15 19:59:33 2008
--- openafs/src/WINNT/install/NSIS/OpenAFS.nsi Thu Oct 16 21:41:37 2008
***************
*** 50,56 ****
VIAddVersionKey "ProductVersion" ${AFS_VERSION}
VIAddVersionKey "FileVersion" ${AFS_VERSION}
VIAddVersionKey "FileDescription" "OpenAFS for Windows Installer"
! VIAddVersionKey "LegalCopyright" "(C)2000-2007"
!ifdef DEBUG
VIAddVersionKey "PrivateBuild" "Checked/Debug"
!endif ; End DEBUG
--- 50,56 ----
VIAddVersionKey "ProductVersion" ${AFS_VERSION}
VIAddVersionKey "FileVersion" ${AFS_VERSION}
VIAddVersionKey "FileDescription" "OpenAFS for Windows Installer"
! VIAddVersionKey "LegalCopyright" "(C)2000-2008"
!ifdef DEBUG
VIAddVersionKey "PrivateBuild" "Checked/Debug"
!endif ; End DEBUG
***************
*** 575,589 ****
!insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afslogon.dll" "$INSTDIR\Client\Program\afslogon.dll" "$INSTDIR"
File "${AFS_CLIENT_BUILDDIR}\afscpcc.exe"
! !ifdef AFSIFS
! SetOutPath "$SYSDIR"
! !ifndef DEBUG
! !insertmacro ReplaceDLL "..\..\afsrdr\objfre_w2K_x86\i386\afsrdr.sys" "$SYSDIR\DRIVERS\afsrdr.sys" "$INSTDIR"
! !else
! !insertmacro ReplaceDLL "..\..\afsrdr\objchk_w2K_x86\i386\afsrdr.sys" "$SYSDIR\DRIVERS\afsrdr.sys" "$INSTDIR"
! !endif
! !endif
!
Call AFSLangFiles
; Get AFS CellServDB file
--- 575,586 ----
!insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afslogon.dll" "$INSTDIR\Client\Program\afslogon.dll" "$INSTDIR"
File "${AFS_CLIENT_BUILDDIR}\afscpcc.exe"
! ; Remove the binaries from the old location if present
! Delete /REBOOTOK "$SYSDIR\afslogon.dll"
! Delete "$SYSDIR\afscpcc.exe"
! Delete "$SYSDIR\afslogon.pdb"
! Delete "$SYSDIR\afscpcc.pdb"
!
Call AFSLangFiles
; Get AFS CellServDB file
***************
*** 790,796 ****
; WinLogon Event Notification
WriteRegDWORD HKLM "Software\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\AfsLogon" "Asynchronous" 0
WriteRegDWORD HKLM "Software\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\AfsLogon" "Impersonate" 1
! WriteRegStr HKLM "Software\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\AfsLogon" "DLLName" "afslogon.dll"
WriteRegStr HKLM "Software\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\AfsLogon" "Logon" "AFS_Logon_Event"
WriteRegStr HKLM "Software\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\AfsLogon" "Logoff" "AFS_Logoff_Event"
WriteRegStr HKLM "Software\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\AfsLogon" "Startup" "AFS_Startup_Event"
--- 787,793 ----
; WinLogon Event Notification
WriteRegDWORD HKLM "Software\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\AfsLogon" "Asynchronous" 0
WriteRegDWORD HKLM "Software\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\AfsLogon" "Impersonate" 1
! WriteRegStr HKLM "Software\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\AfsLogon" "DLLName" "$INSTDIR\Client\Program\afslogon.dll"
WriteRegStr HKLM "Software\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\AfsLogon" "Logon" "AFS_Logon_Event"
WriteRegStr HKLM "Software\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\AfsLogon" "Logoff" "AFS_Logoff_Event"
WriteRegStr HKLM "Software\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\AfsLogon" "Startup" "AFS_Startup_Event"
Index: openafs/src/WINNT/install/wix/CellServDB
diff -c openafs/src/WINNT/install/wix/CellServDB:1.6.4.5 openafs/src/WINNT/install/wix/CellServDB:1.6.4.6
*** openafs/src/WINNT/install/wix/CellServDB:1.6.4.5 Wed Apr 23 23:08:35 2008
--- openafs/src/WINNT/install/wix/CellServDB Fri Nov 7 21:29:30 2008
***************
*** 1,4 ****
! >grand.central.org #GCO Public CellServDB 23 Apr 2008
18.92.0.108 #grand-opening.mit.edu
128.2.203.61 #penn.central.org
130.237.48.87 #andrew.e.kth.se
--- 1,4 ----
! >grand.central.org #GCO Public CellServDB 07 Nov 2008
18.92.0.108 #grand-opening.mit.edu
128.2.203.61 #penn.central.org
130.237.48.87 #andrew.e.kth.se
***************
*** 11,19 ****
193.170.243.12 #baloo.oeaw.ac.at
193.170.243.14 #akela.oeaw.ac.at
>cgv.tugraz.at #CGV cell
! 129.27.224.133 #phobos.cgv.tugraz.at
! 129.27.224.134 #deimos.cgv.tugraz.at
! 129.27.224.210 #trinculo.cgv.tugraz.at
>itp.tugraz.at #Institute of Theoretical and Computational Physics, TU Graz, Aus
129.27.161.7 #faepafs1.tu-graz.ac.at
129.27.161.15 #faepafs2.tu-graz.ac.at
--- 11,19 ----
193.170.243.12 #baloo.oeaw.ac.at
193.170.243.14 #akela.oeaw.ac.at
>cgv.tugraz.at #CGV cell
! 129.27.218.30 #phobos.cgv.tugraz.at
! 129.27.218.31 #deimos.cgv.tugraz.at
! 129.27.218.32 #trinculo.cgv.tugraz.at
>itp.tugraz.at #Institute of Theoretical and Computational Physics, TU Graz, Aus
129.27.161.7 #faepafs1.tu-graz.ac.at
129.27.161.15 #faepafs2.tu-graz.ac.at
***************
*** 44,49 ****
--- 44,51 ----
129.129.190.142 #afs02.psi.ch
>extundo.com #Simon Josefsson's cell
195.42.214.241 #slipsten.extundo.com
+ >freedaemon.com #Free Daemon Consulting, Oklahoma City, OK, USA
+ 66.210.104.254 #afs0.freedaemon.com
>membrain.com #membrain.com
66.93.118.125 #stormy
130.85.24.11 #weasel
***************
*** 57,64 ****
195.113.0.36 #asterix.ruk.cuni.cz
195.113.0.37 #obelix.ruk.cuni.cz
195.113.0.40 #sal.ruk.cuni.cz
>desy.de #Deutsches Elektronen-Synchrotron
! 131.169.40.62 #vayu.desy.de
131.169.244.60 #solar00.desy.de
>gppc.de #GPP Chemnitz mbH
213.187.92.33 #gpp1.gppc.de
--- 59,75 ----
195.113.0.36 #asterix.ruk.cuni.cz
195.113.0.37 #obelix.ruk.cuni.cz
195.113.0.40 #sal.ruk.cuni.cz
+ >ics.muni.cz #Masaryk university
+ 147.251.3.11 #grond.ics.muni.cz
+ 147.251.3.15 #nimloth.ics.muni.cz
+ 147.251.3.19 #sirion.ics.muni.cz
+ >zcu.cz #University of West Bohemia, Czech Republic
+ 147.228.10.18 #sauron.zcu.cz
+ 147.228.52.10 #oknos.zcu.cz
+ 147.228.52.17 #nic.zcu.cz
>desy.de #Deutsches Elektronen-Synchrotron
! 131.169.2.19 #afsdb2.desy.de
! 131.169.2.20 #afsdb3.desy.de
131.169.244.60 #solar00.desy.de
>gppc.de #GPP Chemnitz mbH
213.187.92.33 #gpp1.gppc.de
***************
*** 155,160 ****
--- 166,175 ----
129.219.10.70 #authen1.asu.edu
129.219.10.72 #authen3.asu.edu
129.219.100.16 #authen4.asu.edu
+ >mars.asu.edu #Mars Space Flight Facility - ASU Mars Research
+ 149.169.146.57 #kdc1.mars.asu.edu
+ 149.169.146.58 #kdc2.mars.asu.edu
+ 149.169.146.59 #kdc3.mars.asu.edu
>eecs.berkeley.edu #University of California, Berkeley - EECS Dept.
128.32.139.34 #greed.eecs.berkeley.edu
128.32.139.35 #gluttony.eecs.berkeley.edu
***************
*** 223,242 ****
129.186.6.243 #afsdb-2.iastate.edu
129.186.142.243 #afsdb-3.iastate.edu
>athena.mit.edu #MIT/Athena cell
! 18.7.1.66 #paris.mit.edu.
! 18.7.1.74 #chimera.mit.edu.
! 18.158.0.37 #prill.mit.edu.
>dev.mit.edu #MIT/IS Development cell
! 18.7.1.70 #wham.mit.edu.
! 18.92.1.219 #click.mit.edu.
! 18.92.1.220 #whirr.mit.edu.
>net.mit.edu #MIT/Network Group cell
18.7.7.73 #gracie.mit.edu
18.7.21.95 #george.mit.edu
>sipb.mit.edu #MIT/SIPB cell
! 18.181.0.19 #reynelda.mit.edu.
! 18.181.0.22 #rosebud.mit.edu.
! 18.181.0.23 #ronald-ann.mit.edu.
>soap.mit.edu #MIT School Of Architecture & Planning
18.89.1.204 #crypt.mit.edu
18.89.1.209 #grotto.mit.edu
--- 238,257 ----
129.186.6.243 #afsdb-2.iastate.edu
129.186.142.243 #afsdb-3.iastate.edu
>athena.mit.edu #MIT/Athena cell
! 18.7.1.66 #paris.mit.edu
! 18.7.1.74 #chimera.mit.edu
! 18.158.0.37 #prill.mit.edu
>dev.mit.edu #MIT/IS Development cell
! 18.7.1.70 #wham.mit.edu
! 18.92.1.219 #click.mit.edu
! 18.92.1.220 #whirr.mit.edu
>net.mit.edu #MIT/Network Group cell
18.7.7.73 #gracie.mit.edu
18.7.21.95 #george.mit.edu
>sipb.mit.edu #MIT/SIPB cell
! 18.181.0.19 #reynelda.mit.edu
! 18.181.0.22 #rosebud.mit.edu
! 18.181.0.23 #ronald-ann.mit.edu
>soap.mit.edu #MIT School Of Architecture & Planning
18.89.1.204 #crypt.mit.edu
18.89.1.209 #grotto.mit.edu
***************
*** 342,351 ****
141.211.43.104 #linat04.grid.umich.edu
>citi.umich.edu #Center for Information Technology Integration
141.211.133.5 #babylon.citi.umich.edu
- >lsa.umich.edu #University of Michigan - College of LS&A
- 141.211.211.53 #gerow.lsa.umich.edu
- 141.211.211.72 #collines.lsa.umich.edu
- 141.211.211.153 #hodges.lsa.umich.edu
>sph.umich.edu #University of Michigan -- School of Public Health
141.211.51.137 #afssph7.sph.umich.edu
141.211.51.139 #afssph0.sph.umich.edu
--- 357,362 ----
***************
*** 377,382 ****
--- 388,395 ----
144.92.13.16 #moe.cae.wisc.edu
>hep.wisc.edu #University of Wisconsin -- High Energy Physics
128.104.28.219 #anise.hep.wisc.edu
+ 144.92.180.7 #rosemary.hep.wisc.edu
+ 144.92.180.30 #fennel.hep.wisc.edu
>physics.wisc.edu #Univ. of Wisconsin-Madison, Physics Department
128.104.160.13 #kendra.physics.wisc.edu
128.104.160.14 #fray.physics.wisc.edu
***************
*** 398,403 ****
--- 411,418 ----
>grif.fr #GRIF cell
192.54.208.18 #node03.datagrid.cea.fr
>in2p3.fr #IN2P3 production cell
+ 134.158.104.11 #ccafsdb01.in2p3.fr
+ 134.158.104.12 #ccafsdb02.in2p3.fr
134.158.232.11 #ccafsdb1.in2p3.fr
134.158.232.12 #ccafsdb2.in2p3.fr
134.158.232.13 #ccafsdb3.in2p3.fr
***************
*** 431,436 ****
--- 446,453 ----
128.55.128.250 #mars.nersc.gov
128.55.128.252 #alfred.nersc.gov
128.55.128.254 #lurch.nersc.gov
+ >doe.atomki.hu #Institute of Nuclear Research (MTA ATOMKI), Debrecen, Hungary
+ 193.6.179.31 #afs.doe.atomki.hu
>bme.hu #Budapest University of Technology and Economics
152.66.241.6 #afs.iit.bme.hu
>kfki.hu #Research Institute for Nuclear and Particle Physics - Budapest,H
***************
*** 474,479 ****
--- 491,498 ----
>pi.infn.it #INFN, Sezione di Pisa
131.114.134.26 #unknownhost.pi.infn.it
192.84.133.50 #aix1.pi.infn.it
+ >roma3.infn.it #Istituto Nazionale di Fisica Nucleare (INFN), Italia
+ 193.205.159.17 #afsrm3.roma3.infn.it
>psm.it #Progetto San Marco, Universita' di Roma-1
151.100.1.65 #atlante.psm.uniroma1.it
>tgrid.it #CASPUR-CILEA-CINECA Grid Cell
***************
*** 514,522 ****
>slackers.net #The Slackers' Network
199.4.150.159 #alexandria.slackers.net
>tproa.net #The People's Republic of Ames
! 72.13.4.23 #service-3.tproa.net
! 72.13.4.24 #service-4.tproa.net
! 72.13.4.25 #service-5.tproa.net
>interdose.net #Interdose Ltd. & Co. KG, Germany
80.190.171.42 #bfd9000.tow5.interdose.net
217.111.69.188 #bfd9001.z2.interdose.net
--- 533,541 ----
>slackers.net #The Slackers' Network
199.4.150.159 #alexandria.slackers.net
>tproa.net #The People's Republic of Ames
! 204.11.35.83 #service-3.tproa.net
! 204.11.35.84 #service-4.tproa.net
! 204.11.35.85 #service-5.tproa.net
>interdose.net #Interdose Ltd. & Co. KG, Germany
80.190.171.42 #bfd9000.tow5.interdose.net
217.111.69.188 #bfd9001.z2.interdose.net
***************
*** 544,552 ****
--- 563,576 ----
128.2.120.138 #kurma.sys.hackish.org
>idahofuturetruck.org #University of Idaho hybrid vehicle development
12.18.238.210 #dsle210.fsr.net
+ >mrow.org #MROW.ORG and RITLUG Cell
+ 88.198.46.111 #mrow.org
+ 129.21.205.119 #mirror.rit.edu
>mrph.org #Mrph
66.207.133.1 #sanber.mrph.org
128.2.99.209 #hernandarias.mrph.org
+ >mstacm.org #Missouri Science & Technology - ACM
+ 131.151.88.2 #acmwork.device.mst.edu
>nimlabs.org #Nimlabs, Ink. Cell.
18.238.1.103 #olfin.nimlabs.org
18.238.1.105 #caerbanog.nimlabs.org
***************
*** 567,582 ****
130.237.24.104 #afs2.hallf.kth.se
>isk.kth.se #Royal Institute of Technology, ISK
130.237.209.5 #afsdb2.isk.kth.se
- 130.237.209.9 #afsdb3.isk.kth.se
130.237.216.17 #afsdb1.isk.kth.se
>it.kth.se #Royal Institute of Technology, IT
130.237.212.15 #ptah.it.kth.se
130.237.212.16 #toth.it.kth.se
130.237.215.7 #isis.it.kth.se
>md.kth.se #Royal Institute of Technology, MMK
130.237.57.68 #trinity.md.kth.se
130.237.57.72 #morpheus.md.kth.se
- 130.237.67.230 #neo.speech.kth.se
>mech.kth.se #Royal Institute of Technology, MECH
130.237.233.142 #matterhorn.mech.kth.se
130.237.233.143 #castor.mech.kth.se
--- 591,605 ----
130.237.24.104 #afs2.hallf.kth.se
>isk.kth.se #Royal Institute of Technology, ISK
130.237.209.5 #afsdb2.isk.kth.se
130.237.216.17 #afsdb1.isk.kth.se
>it.kth.se #Royal Institute of Technology, IT
130.237.212.15 #ptah.it.kth.se
130.237.212.16 #toth.it.kth.se
130.237.215.7 #isis.it.kth.se
>md.kth.se #Royal Institute of Technology, MMK
+ 130.237.57.21 #euler.md.kth.se
130.237.57.68 #trinity.md.kth.se
130.237.57.72 #morpheus.md.kth.se
>mech.kth.se #Royal Institute of Technology, MECH
130.237.233.142 #matterhorn.mech.kth.se
130.237.233.143 #castor.mech.kth.se
***************
*** 627,629 ****
--- 650,655 ----
194.36.2.5 #afs3.hep.man.ac.uk
>rl.ac.uk #Rutherford Appleton Lab, England
130.246.183.164 #wallace.cc.rl.ac.uk
+ 130.246.183.203 #afs1.gridpp.rl.ac.uk
+ 130.246.183.204 #afs2.gridpp.rl.ac.uk
+ 130.246.183.205 #afs3.gridpp.rl.ac.uk
Index: openafs/src/WINNT/netidmgr_plugin/afsfuncs.c
diff -c openafs/src/WINNT/netidmgr_plugin/afsfuncs.c:1.1.2.18 openafs/src/WINNT/netidmgr_plugin/afsfuncs.c:1.1.2.21
*** openafs/src/WINNT/netidmgr_plugin/afsfuncs.c:1.1.2.18 Sat Mar 29 23:36:57 2008
--- openafs/src/WINNT/netidmgr_plugin/afsfuncs.c Fri Nov 7 13:19:51 2008
***************
*** 22,28 ****
* SOFTWARE.
*/
! /* $Id: afsfuncs.c,v 1.1.2.18 2008/03/30 03:36:57 jaltman Exp $ */
/* Disable the 'macro redefinition' warning which is getting
triggerred by a redefinition of the ENCRYPT and DECRYPT macros. */
--- 22,28 ----
* SOFTWARE.
*/
! /* $Id: afsfuncs.c,v 1.1.2.21 2008/11/07 18:19:51 jaltman Exp $ */
/* Disable the 'macro redefinition' warning which is getting
triggerred by a redefinition of the ENCRYPT and DECRYPT macros. */
***************
*** 728,741 ****
char *realm,
int LifeTime,
afs_tk_method method,
! time_t * tok_expiration) {
long rc;
CREDENTIALS creds;
struct ktc_principal aserver;
struct ktc_principal aclient;
! char realm_of_user[REALM_SZ]; /* Kerberos realm of user */
! char realm_of_cell[REALM_SZ]; /* Kerberos realm of cell */
char local_cell[MAXCELLCHARS+1];
char Dmycell[MAXCELLCHARS+1];
struct ktc_token atoken;
--- 728,742 ----
char *realm,
int LifeTime,
afs_tk_method method,
! time_t * tok_expiration,
! char *linkedCell) {
long rc;
CREDENTIALS creds;
struct ktc_principal aserver;
struct ktc_principal aclient;
! char realm_of_user[MAXKTCREALMLEN]; /* Kerberos realm of user */
! char realm_of_cell[MAXKTCREALMLEN]; /* Kerberos realm of cell */
char local_cell[MAXCELLCHARS+1];
char Dmycell[MAXCELLCHARS+1];
struct ktc_token atoken;
***************
*** 763,768 ****
--- 764,770 ----
if ( !cell ) cell = "";
if ( !service ) service = "";
+ memset(&ak_cellconfig, 0, sizeof(ak_cellconfig));
memset(RealmName, '\0', sizeof(RealmName));
memset(CellName, '\0', sizeof(CellName));
memset(ServiceName, '\0', sizeof(ServiceName));
***************
*** 784,789 ****
--- 786,795 ----
return(rc);
}
+ if (linkedCell && ak_cellconfig.linkedCell)
+ StringCbCopyA(linkedCell, MAXCELLCHARS,
+ ak_cellconfig.linkedCell);
+
StringCbCopyA(realm_of_cell, sizeof(realm_of_cell),
afs_realm_of_cell(&ak_cellconfig, FALSE));
***************
*** 831,838 ****
pkrb5_cc_get_principal(context, k5cc, &client_principal);
i = krb5_princ_realm(context, client_principal)->length;
! if (i > REALM_SZ-1)
! i = REALM_SZ-1;
StringCchCopyNA(realm_of_user, ARRAYLENGTH(realm_of_user),
krb5_princ_realm(context, client_principal)->data,
i);
--- 837,844 ----
pkrb5_cc_get_principal(context, k5cc, &client_principal);
i = krb5_princ_realm(context, client_principal)->length;
! if (i > MAXKTCREALMLEN-1)
! i = MAXKTCREALMLEN-1;
StringCchCopyNA(realm_of_user, ARRAYLENGTH(realm_of_user),
krb5_princ_realm(context, client_principal)->data,
i);
***************
*** 1061,1067 ****
_reportf(L"Same token already exists");
! return 0;
}
// * Reset the "aclient" structure before we call ktc_SetToken.
--- 1067,1074 ----
_reportf(L"Same token already exists");
! rc = 0;
! goto cleanup;
}
// * Reset the "aclient" structure before we call ktc_SetToken.
***************
*** 1105,1111 ****
if (context)
pkrb5_free_context(context);
! return 0;
}
_reportf(L"SetToken returns code %d", rc);
--- 1112,1118 ----
if (context)
pkrb5_free_context(context);
! goto cleanup;
}
_reportf(L"SetToken returns code %d", rc);
***************
*** 1151,1156 ****
--- 1158,1164 ----
_reportf(L"Kerberos 4 not configured");
if (!bGotCreds && supports_krb4 &&
+ strlen(RealmName) < REALM_SZ &&
(method == AFS_TOKEN_AUTO ||
method == AFS_TOKEN_KRB4)) {
***************
*** 1238,1244 ****
!memcmp(atoken.ticket, btoken.ticket, atoken.ticketLen)) {
/* success! */
! return(0);
}
// Reset the "aclient" structure before we call ktc_SetToken.
--- 1246,1253 ----
!memcmp(atoken.ticket, btoken.ticket, atoken.ticketLen)) {
/* success! */
! rc = 0;
! goto cleanup;
}
// Reset the "aclient" structure before we call ktc_SetToken.
***************
*** 1263,1269 ****
if (rc = ktc_SetToken(&aserver, &atoken, &aclient, 0)) {
afs_report_error(rc, "ktc_SetToken()");
! return(rc);
}
} else if (method == AFS_TOKEN_AUTO ||
method >= AFS_TOKEN_USER) {
--- 1272,1278 ----
if (rc = ktc_SetToken(&aserver, &atoken, &aclient, 0)) {
afs_report_error(rc, "ktc_SetToken()");
! goto cleanup;
}
} else if (method == AFS_TOKEN_AUTO ||
method >= AFS_TOKEN_USER) {
***************
*** 1293,1298 ****
--- 1302,1311 ----
}
}
+ cleanup:
+ if (ak_cellconfig.linkedCell)
+ free(ak_cellconfig.linkedCell);
+
return rc;
}
***************
*** 1303,1309 ****
afs_realm_of_cell(afs_conf_cell *cellconfig, BOOL referral_fallback)
{
char krbhst[MAX_HSTNM]="";
! static char krbrlm[REALM_SZ+1]="";
krb5_context ctx = 0;
char ** realmlist=NULL;
krb5_error_code r = 0;
--- 1316,1322 ----
afs_realm_of_cell(afs_conf_cell *cellconfig, BOOL referral_fallback)
{
char krbhst[MAX_HSTNM]="";
! static char krbrlm[MAXKTCREALMLEN+1]="";
krb5_context ctx = 0;
char ** realmlist=NULL;
krb5_error_code r = 0;
***************
*** 1384,1390 ****
if (strlen(cell) == 0)
StringCbCopyA(cell, (MAXCELLCHARS+1) * sizeof(char), local_cell);
! /* WIN32: cm_SearchCellFile(cell, pcallback, pdata) */
StringCbCopyA(cellconfig->name, (MAXCELLCHARS+1) * sizeof(char), cell);
rc = cm_SearchCellFile(cell, NULL, afs_get_cellconfig_callback,
--- 1397,1403 ----
if (strlen(cell) == 0)
StringCbCopyA(cell, (MAXCELLCHARS+1) * sizeof(char), local_cell);
! /* WIN32: cm_SearchCellFile(cell, newcell, pcallback, pdata) */
StringCbCopyA(cellconfig->name, (MAXCELLCHARS+1) * sizeof(char), cell);
rc = cm_SearchCellFile(cell, NULL, afs_get_cellconfig_callback,
***************
*** 1592,1603 ****
--- 1605,1619 ----
int rc;
ZeroMemory(local_cell, sizeof(local_cell));
+ ZeroMemory(&cellconfig, sizeof(cellconfig));
rc = afs_get_cellconfig(cell, &cellconfig, local_cell);
if (rc)
return FALSE;
realm = afs_realm_of_cell(&cellconfig, FALSE);
+ if (cellconfig.linkedCell)
+ free(cellconfig.linkedCell);
if (realm == NULL)
return FALSE;
Index: openafs/src/WINNT/netidmgr_plugin/afsfuncs.h
diff -c openafs/src/WINNT/netidmgr_plugin/afsfuncs.h:1.1.2.5 openafs/src/WINNT/netidmgr_plugin/afsfuncs.h:1.1.2.6
*** openafs/src/WINNT/netidmgr_plugin/afsfuncs.h:1.1.2.5 Sat May 5 17:14:48 2007
--- openafs/src/WINNT/netidmgr_plugin/afsfuncs.h Fri Nov 7 11:36:03 2008
***************
*** 22,28 ****
* SOFTWARE.
*/
! /* $Id: afsfuncs.h,v 1.1.2.5 2007/05/05 21:14:48 jaltman Exp $ */
#ifndef __KHIMAIRA_AFSFUNCS_H
#define __KHIMAIRA_AFSFUNCS_H
--- 22,28 ----
* SOFTWARE.
*/
! /* $Id: afsfuncs.h,v 1.1.2.6 2008/11/07 16:36:03 jaltman Exp $ */
#ifndef __KHIMAIRA_AFSFUNCS_H
#define __KHIMAIRA_AFSFUNCS_H
***************
*** 50,57 ****
char *realm,
int LifeTime,
afs_tk_method method,
! time_t * tok_expiration /* OUT: expiration time of new
! token */
);
int
--- 50,57 ----
char *realm,
int LifeTime,
afs_tk_method method,
! time_t * tok_expiration,/* OUT: expiration time of new token */
! char *linkedCell /* OUT: name of linkedCell (if any) */
);
int
Index: openafs/src/WINNT/netidmgr_plugin/afsnewcreds.c
diff -c openafs/src/WINNT/netidmgr_plugin/afsnewcreds.c:1.1.2.7 openafs/src/WINNT/netidmgr_plugin/afsnewcreds.c:1.1.2.9
*** openafs/src/WINNT/netidmgr_plugin/afsnewcreds.c:1.1.2.7 Tue Jan 8 12:06:39 2008
--- openafs/src/WINNT/netidmgr_plugin/afsnewcreds.c Fri Nov 7 13:19:51 2008
***************
*** 22,28 ****
* SOFTWARE.
*/
! /* $Id: afsnewcreds.c,v 1.1.2.7 2008/01/08 17:06:39 jaltman Exp $ */
#include
#include
--- 22,28 ----
* SOFTWARE.
*/
! /* $Id: afsnewcreds.c,v 1.1.2.9 2008/11/07 18:19:51 jaltman Exp $ */
#include
#include
***************
*** 1563,1568 ****
--- 1563,1572 ----
SendDlgItemMessage(hwnd, IDC_NCAFS_OBTAIN,
BM_SETCHECK, BST_CHECKED, 0);
+ SendDlgItemMessage(hwnd, IDC_NCAFS_CELL, CB_LIMITTEXT, MAXCELLCHARS-1, 0);
+ SendDlgItemMessage(hwnd, IDC_NCAFS_REALM, CB_LIMITTEXT, MAXKTCREALMLEN-1, 0);
+ SendDlgItemMessage(hwnd, IDC_NCAFS_METHOD, CB_LIMITTEXT, KCDB_MAXCCH_NAME-1, 0);
+
LeaveCriticalSection(&d->cs);
/* the cells and realms combo boxes need to be filled
***************
*** 2654,2660 ****
for(i=0; in_rows; i++) {
int code;
char cell[MAXCELLCHARS];
! char realm[MAXCELLCHARS];
khm_handle ctoken;
FILETIME ft_old;
FILETIME ft_new;
--- 2658,2665 ----
for(i=0; in_rows; i++) {
int code;
char cell[MAXCELLCHARS];
! char realm[MAXKTCREALMLEN];
! char linkedCell[MAXCELLCHARS]="";
khm_handle ctoken;
FILETIME ft_old;
FILETIME ft_new;
***************
*** 2662,2667 ****
--- 2667,2673 ----
khm_size cb;
khm_int32 method = AFS_TOKEN_AUTO;
khm_handle csp_cell = NULL;
+ BOOL bgetLinked = 0;
if (l->rows[i].flags &
(DLGROW_FLAG_DONE | DLGROW_FLAG_DELETED))
***************
*** 2709,2724 ****
method = l->rows[i].method;
}
_report_cs3(KHERR_INFO,
L"Getting tokens for cell %1!S! with realm %2!S! using method %3!d!",
! _cstr(cell),
_cstr(realm),
_int32(method));
_resolve();
/* make the call */
! code = afs_klog(ident, "", cell, realm, 0,
! method, &new_exp);
_report_cs1(KHERR_INFO,
L"klog returns code %1!d!",
--- 2715,2734 ----
method = l->rows[i].method;
}
+ getLinked:
_report_cs3(KHERR_INFO,
L"Getting tokens for cell %1!S! with realm %2!S! using method %3!d!",
! _cstr((bgetLinked ? linkedCell: cell)),
_cstr(realm),
_int32(method));
_resolve();
/* make the call */
! code = afs_klog(ident, "",
! bgetLinked ? linkedCell : cell,
! realm, 0,
! method, &new_exp,
! bgetLinked ? NULL :linkedCell);
_report_cs1(KHERR_INFO,
L"klog returns code %1!d!",
***************
*** 2769,2774 ****
--- 2779,2789 ----
ident_renew_triggered = TRUE;
}
}
+
+ if ( !bgetLinked && linkedCell[0] ) {
+ bgetLinked = TRUE;
+ goto getLinked;
+ }
}
}
Index: openafs/src/WINNT/netidmgr_plugin/afspext.h
diff -c openafs/src/WINNT/netidmgr_plugin/afspext.h:1.1.2.3 openafs/src/WINNT/netidmgr_plugin/afspext.h:1.1.2.4
*** openafs/src/WINNT/netidmgr_plugin/afspext.h:1.1.2.3 Mon Oct 16 09:55:35 2006
--- openafs/src/WINNT/netidmgr_plugin/afspext.h Fri Nov 7 13:19:51 2008
***************
*** 22,28 ****
* SOFTWARE.
*/
! /* $Id: afspext.h,v 1.1.2.3 2006/10/16 13:55:35 jaltman Exp $ */
#ifndef __AFSPLUGIN_EXT_H
#define __AFSPLUGIN_EXT_H
--- 22,28 ----
* SOFTWARE.
*/
! /* $Id: afspext.h,v 1.1.2.4 2008/11/07 18:19:51 jaltman Exp $ */
#ifndef __AFSPLUGIN_EXT_H
#define __AFSPLUGIN_EXT_H
***************
*** 40,47 ****
@{*/
! #define MAXCELLCHARS 64
! #define MAXHOSTCHARS 64
#define MAXHOSTSPERCELL 8
#define TRANSARCAFSDAEMON "TransarcAFSDaemon"
--- 40,47 ----
@{*/
! #define MAXCELLCHARS 256
! #define MAXHOSTCHARS 256
#define MAXHOSTSPERCELL 8
#define TRANSARCAFSDAEMON "TransarcAFSDaemon"
Index: openafs/src/WINNT/netidmgr_plugin/lang/en_us/langres.rc
diff -c openafs/src/WINNT/netidmgr_plugin/lang/en_us/langres.rc:1.1.2.6 openafs/src/WINNT/netidmgr_plugin/lang/en_us/langres.rc:1.1.2.7
*** openafs/src/WINNT/netidmgr_plugin/lang/en_us/langres.rc:1.1.2.6 Thu Apr 12 10:13:48 2007
--- openafs/src/WINNT/netidmgr_plugin/lang/en_us/langres.rc Fri Nov 7 13:19:51 2008
***************
*** 61,71 ****
CONTROL "Obtain &AFS credentials",IDC_NCAFS_OBTAIN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,19,140,12
GROUPBOX "Credential for",IDC_STATIC,7,32,286,54
LTEXT "&Cell",IDC_STATIC,12,41,42,10
! COMBOBOX IDC_NCAFS_CELL,57,38,152,48,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP
LTEXT "&Realm",IDC_STATIC,12,57,42,10
! COMBOBOX IDC_NCAFS_REALM,57,54,152,48,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP
LTEXT "&Method",IDC_STATIC,12,73,42,10
! COMBOBOX IDC_NCAFS_METHOD,57,70,152,48,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "&Add/Update",IDC_NCAFS_ADD_TOKEN,213,38,77,13,BS_NOTIFY
PUSHBUTTON "&Delete",IDC_NCAFS_DELETE_TOKEN,213,70,77,13,BS_NOTIFY
CONTROL "",IDC_NCAFS_TOKENLIST,"SysListView32",LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,7,88,286,71
--- 61,71 ----
CONTROL "Obtain &AFS credentials",IDC_NCAFS_OBTAIN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,19,140,12
GROUPBOX "Credential for",IDC_STATIC,7,32,286,54
LTEXT "&Cell",IDC_STATIC,12,41,42,10
! COMBOBOX IDC_NCAFS_CELL,57,38,152,48,CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP
LTEXT "&Realm",IDC_STATIC,12,57,42,10
! COMBOBOX IDC_NCAFS_REALM,57,54,152,48,CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP
LTEXT "&Method",IDC_STATIC,12,73,42,10
! COMBOBOX IDC_NCAFS_METHOD,57,70,152,48,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "&Add/Update",IDC_NCAFS_ADD_TOKEN,213,38,77,13,BS_NOTIFY
PUSHBUTTON "&Delete",IDC_NCAFS_DELETE_TOKEN,213,70,77,13,BS_NOTIFY
CONTROL "",IDC_NCAFS_TOKENLIST,"SysListView32",LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,7,88,286,71
***************
*** 88,98 ****
CONTROL "Obtain &AFS credentials",IDC_NCAFS_OBTAIN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,7,140,12
GROUPBOX "Credential for",IDC_STATIC,7,18,221,56
LTEXT "&Cell",IDC_STATIC,13,28,42,10
! COMBOBOX IDC_NCAFS_CELL,57,25,109,48,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP
LTEXT "&Realm",IDC_STATIC,13,44,42,10
! COMBOBOX IDC_NCAFS_REALM,57,41,109,48,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP
LTEXT "&Method",IDC_STATIC,13,60,42,10
! COMBOBOX IDC_NCAFS_METHOD,57,57,109,48,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "&Add/Update",IDC_NCAFS_ADD_TOKEN,174,26,50,13,BS_NOTIFY
PUSHBUTTON "&Delete",IDC_NCAFS_DELETE_TOKEN,174,56,50,13,BS_NOTIFY
CONTROL "",IDC_NCAFS_TOKENLIST,"SysListView32",LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,7,75,221,69
--- 88,98 ----
CONTROL "Obtain &AFS credentials",IDC_NCAFS_OBTAIN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,7,140,12
GROUPBOX "Credential for",IDC_STATIC,7,18,221,56
LTEXT "&Cell",IDC_STATIC,13,28,42,10
! COMBOBOX IDC_NCAFS_CELL,57,25,109,48,CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP
LTEXT "&Realm",IDC_STATIC,13,44,42,10
! COMBOBOX IDC_NCAFS_REALM,57,41,109,48,CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP
LTEXT "&Method",IDC_STATIC,13,60,42,10
! COMBOBOX IDC_NCAFS_METHOD,57,57,109,48,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "&Add/Update",IDC_NCAFS_ADD_TOKEN,174,26,50,13,BS_NOTIFY
PUSHBUTTON "&Delete",IDC_NCAFS_DELETE_TOKEN,174,56,50,13,BS_NOTIFY
CONTROL "",IDC_NCAFS_TOKENLIST,"SysListView32",LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,7,75,221,69
Index: openafs/src/WINNT/pthread/pthread.c
diff -c openafs/src/WINNT/pthread/pthread.c:1.11.2.1 openafs/src/WINNT/pthread/pthread.c:1.11.2.2
*** openafs/src/WINNT/pthread/pthread.c:1.11.2.1 Tue Dec 25 18:06:14 2007
--- openafs/src/WINNT/pthread/pthread.c Fri Oct 17 16:24:49 2008
***************
*** 33,38 ****
--- 33,39 ----
#include
#include
#include
+ #include
#include
#include
***************
*** 213,218 ****
--- 214,414 ----
return rc;
}
+ int pthread_rwlock_destroy(pthread_rwlock_t *rwp)
+ {
+ int rc = 0;
+
+ if (rwp != NULL) {
+ pthread_mutex_destroy(&rwp->read_access_completion_mutex);
+ pthread_mutex_destroy(&rwp->write_access_mutex);
+ pthread_cond_destroy(&rwp->read_access_completion_wait);
+ } else {
+ #ifdef PTHREAD_DEBUG
+ DebugBreak();
+ #endif
+ rc = EINVAL;
+ }
+
+ return rc;
+ }
+
+ int pthread_rwlock_init(pthread_rwlock_t *rwp, const pthread_rwlockattr_t *attr)
+ {
+ int rc = 0;
+
+ if (rwp == NULL)
+ return EINVAL;
+
+ rwp->readers = 0;
+
+ rc = pthread_mutex_init(&rwp->write_access_mutex, NULL);
+ if (rc)
+ return rc;
+
+ rc = pthread_mutex_init(&rwp->read_access_completion_mutex, NULL);
+ if (rc)
+ goto error1;
+
+ rc = pthread_cond_init(&rwp->read_access_completion_wait, NULL);
+ if (rc == 0)
+ return 0; /* success */
+
+ pthread_mutex_destroy(&rwp->read_access_completion_mutex);
+
+ error1:
+ pthread_mutex_destroy(&rwp->write_access_mutex);
+
+ return rc;
+ }
+
+ int pthread_rwlock_wrlock(pthread_rwlock_t *rwp)
+ {
+ int rc = 0;
+
+ if (rwp == NULL)
+ return EINVAL;
+
+ if ((rc = pthread_mutex_lock(&rwp->write_access_mutex)) != 0)
+ return rc;
+
+ if ((rc = pthread_mutex_lock(&rwp->read_access_completion_mutex)) != 0)
+ {
+ pthread_mutex_unlock(&rwp->write_access_mutex);
+ return rc;
+ }
+
+ while (rc == 0 && rwp->readers > 0) {
+ rc = pthread_cond_wait( &rwp->read_access_completion_wait,
+ &rwp->read_access_completion_mutex);
+ }
+
+ pthread_mutex_unlock(&rwp->read_access_completion_mutex);
+
+ if (rc)
+ pthread_mutex_unlock(&rwp->write_access_mutex);
+
+ return rc;
+ }
+
+ int pthread_rwlock_rdlock(pthread_rwlock_t *rwp)
+ {
+ int rc = 0;
+
+ if (rwp == NULL)
+ return EINVAL;
+
+ if ((rc = pthread_mutex_lock(&rwp->write_access_mutex)) != 0)
+ return rc;
+
+ if ((rc = pthread_mutex_lock(&rwp->read_access_completion_mutex)) != 0)
+ {
+ pthread_mutex_unlock(&rwp->write_access_mutex);
+ return rc;
+ }
+
+ rwp->readers++;
+
+ pthread_mutex_unlock(&rwp->read_access_completion_mutex);
+
+ pthread_mutex_unlock(&rwp->write_access_mutex);
+
+ return rc;
+
+ }
+
+ int pthread_rwlock_tryrdlock(pthread_rwlock_t *rwp)
+ {
+ int rc = 0;
+
+ if (rwp == NULL)
+ return EINVAL;
+
+ if ((rc = pthread_mutex_trylock(&rwp->write_access_mutex)) != 0)
+ return rc;
+
+ if ((rc = pthread_mutex_trylock(&rwp->read_access_completion_mutex)) != 0) {
+ pthread_mutex_unlock(&rwp->write_access_mutex);
+ return rc;
+ }
+
+ rwp->readers++;
+
+ pthread_mutex_unlock(&rwp->read_access_completion_mutex);
+
+ pthread_mutex_unlock(&rwp->write_access_mutex);
+
+ return rc;
+ }
+
+ int pthread_rwlock_trywrlock(pthread_rwlock_t *rwp)
+ {
+ int rc = 0;
+
+ if (rwp == NULL)
+ return EINVAL;
+
+ if ((rc = pthread_mutex_trylock(&rwp->write_access_mutex)) != 0)
+ return rc;
+
+ if ((rc = pthread_mutex_trylock(&rwp->read_access_completion_mutex)) != 0)
+ {
+ pthread_mutex_unlock(&rwp->write_access_mutex);
+ return rc;
+ }
+
+ if (rwp->readers > 0)
+ rc = EBUSY;
+
+ pthread_mutex_unlock(&rwp->read_access_completion_mutex);
+
+ if (rc)
+ pthread_mutex_unlock(&rwp->write_access_mutex);
+
+ return rc;
+ }
+
+ int pthread_rwlock_unlock(pthread_rwlock_t *rwp)
+ {
+ int rc = 0;
+
+ if (rwp == NULL)
+ return EINVAL;
+
+ rc = pthread_mutex_trylock(&rwp->write_access_mutex);
+ if (rc != EDEADLK)
+ {
+ /* unlock a read lock */
+ if (rc == 0)
+ pthread_mutex_unlock(&rwp->write_access_mutex);
+
+ if ((rc = pthread_mutex_lock(&rwp->read_access_completion_mutex)) != 0)
+ {
+ pthread_mutex_unlock(&rwp->write_access_mutex);
+ return rc;
+ }
+
+ if (rwp->readers <= 0)
+ {
+ rc = EINVAL;
+ }
+ else
+ {
+ if (--rwp->readers == 0)
+ pthread_cond_broadcast(&rwp->read_access_completion_wait);
+ }
+
+ pthread_mutex_unlock(&rwp->read_access_completion_mutex);
+ }
+ else
+ {
+ /* unlock a write lock */
+ rc = pthread_mutex_unlock(&rwp->write_access_mutex);
+ }
+
+ return rc;
+ }
+
+
/*
* keys is used to keep track of which keys are currently
* in use by the threads library. pthread_tsd_mutex is used
Index: openafs/src/WINNT/pthread/pthread.def
diff -c openafs/src/WINNT/pthread/pthread.def:1.2 openafs/src/WINNT/pthread/pthread.def:1.2.2.1
*** openafs/src/WINNT/pthread/pthread.def:1.2 Mon Apr 24 10:25:12 2006
--- openafs/src/WINNT/pthread/pthread.def Fri Oct 17 16:24:49 2008
***************
*** 26,28 ****
--- 26,35 ----
pthread_attr_setdetachstate @24
pthread_exit @25
DllMain @26
+ pthread_rwlock_destroy @27
+ pthread_rwlock_init @28
+ pthread_rwlock_rdlock @29
+ pthread_rwlock_wrlock @30
+ pthread_rwlock_tryrdlock @31
+ pthread_rwlock_trywrlock @32
+ pthread_rwlock_unlock @33
Index: openafs/src/WINNT/pthread/pthread.h
diff -c openafs/src/WINNT/pthread/pthread.h:1.2 openafs/src/WINNT/pthread/pthread.h:1.2.32.1
*** openafs/src/WINNT/pthread/pthread.h:1.2 Sat Nov 4 05:03:05 2000
--- openafs/src/WINNT/pthread/pthread.h Fri Oct 17 16:24:49 2008
***************
*** 31,36 ****
--- 31,37 ----
typedef int pthread_condattr_t;
typedef int pthread_mutexattr_t;
+ typedef int pthread_rwlockattr_t;
typedef int pthread_key_t;
typedef void *pthread_t;
***************
*** 56,61 ****
--- 57,69 ----
struct rx_queue waiting_threads;
} pthread_cond_t;
+ typedef struct {
+ pthread_mutex_t write_access_mutex;
+ pthread_mutex_t read_access_completion_mutex;
+ pthread_cond_t read_access_completion_wait;
+ int readers;
+ } pthread_rwlock_t;
+
#define PTHREAD_ONCE_INIT {0,1}
extern int pthread_cond_broadcast(pthread_cond_t *cond);
***************
*** 69,79 ****
--- 77,97 ----
extern int pthread_join(pthread_t target_thread, void **status);
extern int pthread_key_create(pthread_key_t *keyp, void (*destructor)(void *value));
extern int pthread_key_delete(pthread_key_t key);
+
extern int pthread_mutex_destroy(pthread_mutex_t *mp);
extern int pthread_mutex_init(pthread_mutex_t *mp, const pthread_mutexattr_t *attr);
extern int pthread_mutex_lock(pthread_mutex_t *mp);
extern int pthread_mutex_trylock(pthread_mutex_t *mp);
extern int pthread_mutex_unlock(pthread_mutex_t *mp);
+
+ extern int pthread_rwlock_destroy(pthread_rwlock_t *rwp);
+ extern int pthread_rwlock_init(pthread_rwlock_t *rwp, const pthread_rwlockattr_t *attr);
+ extern int pthread_rwlock_rdlock(pthread_rwlock_t *rwp);
+ extern int pthread_rwlock_wrlock(pthread_rwlock_t *rwp);
+ extern int pthread_rwlock_tryrdlock(pthread_rwlock_t *rwp);
+ extern int pthread_rwlock_trywrlock(pthread_rwlock_t *rwp);
+ extern int pthread_rwlock_unlock(pthread_rwlock_t *rwp);
+
extern int pthread_once(pthread_once_t *once_control, void (*init_routine)(void));
extern int pthread_setspecific(pthread_key_t key, const void *value);
extern pthread_t pthread_self(void);
Index: openafs/src/afs/afs.h
diff -c openafs/src/afs/afs.h:1.85.2.10 openafs/src/afs/afs.h:1.85.2.14
*** openafs/src/afs/afs.h:1.85.2.10 Mon Sep 22 15:35:26 2008
--- openafs/src/afs/afs.h Sat Nov 8 11:34:42 2008
***************
*** 187,193 ****
afs_int32 uid; /* user id making the request */
afs_int32 busyCount; /* how many busies we've seen so far */
afs_int32 flags; /* things like O_SYNC, O_NONBLOCK go here */
! char initd; /* if non-zero, non-uid fields meaningful */
char accessError; /* flags for overriding error return code */
char volumeError; /* encountered a missing or busy volume */
char networkError; /* encountered network problems */
--- 187,193 ----
afs_int32 uid; /* user id making the request */
afs_int32 busyCount; /* how many busies we've seen so far */
afs_int32 flags; /* things like O_SYNC, O_NONBLOCK go here */
! char initd; /* if non-zero, Error fields meaningful */
char accessError; /* flags for overriding error return code */
char volumeError; /* encountered a missing or busy volume */
char networkError; /* encountered network problems */
***************
*** 562,568 ****
--- 562,572 ----
#define CUnlinkedDel 0x00040000
#define CVFlushed 0x00080000
#define CCore1 0x00100000 /* osf1 core file; not same as CCore above */
+ #ifdef AFS_LINUX22_ENV
+ #define CPageWrite 0x00200000 /* to detect vm deadlock - linux */
+ #else
#define CWritingUFS 0x00200000 /* to detect vm deadlock - used by sgi */
+ #endif
#define CCreating 0x00400000 /* avoid needless store after open truncate */
#define CPageHog 0x00800000 /* AIX - dumping large cores is a page hog. */
#define CDCLock 0x02000000 /* Vnode lock held over call to GetDownD */
***************
*** 1001,1006 ****
--- 1005,1014 ----
afs_int32 fid; /* is adc->index, the cache file number */
afs_inode_t inode; /* is adc->f.inode, the inode number of the cac\
he file */
+ #if defined(LINUX_USE_FH)
+ struct fid fh; /* Opaque file handle */
+ int fh_type; /* Opaque file handle type */
+ #endif
afs_int32 page;
afs_int32 accesstime;
struct buffer *hashNext;
***************
*** 1023,1028 ****
--- 1031,1040 ----
afs_inode_t inode; /* Unix inode for this chunk */
afs_int32 chunkBytes; /* Num bytes in this chunk */
char states; /* Has this chunk been modified? */
+ #if defined(LINUX_USE_FH)
+ struct fid fh; /* File handle */
+ int fh_type; /* File handle type */
+ #endif
};
#endif
Index: openafs/src/afs/afs_analyze.c
diff -c openafs/src/afs/afs_analyze.c:1.22.14.9 openafs/src/afs/afs_analyze.c:1.22.14.12
*** openafs/src/afs/afs_analyze.c:1.22.14.9 Fri Aug 22 14:52:57 2008
--- openafs/src/afs/afs_analyze.c Mon Oct 27 19:53:44 2008
***************
*** 14,20 ****
#include "afs/param.h"
RCSID
! ("$Header: /cvs/openafs/src/afs/afs_analyze.c,v 1.22.14.9 2008/08/22 18:52:57 shadow Exp $");
#include "afs/stds.h"
#include "afs/sysincludes.h" /* Standard vendor system headers */
--- 14,20 ----
#include "afs/param.h"
RCSID
! ("$Header: /cvs/openafs/src/afs/afs_analyze.c,v 1.22.14.12 2008/10/27 23:53:44 shadow Exp $");
#include "afs/stds.h"
#include "afs/sysincludes.h" /* Standard vendor system headers */
***************
*** 255,275 ****
areq->skipserver[i] = 1;
}
if (tvp->serverHost[i] &&
! !(tvp->serverHost[i]->addr->sa_flags &
SRVR_ISDOWN)) {
areq->skipserver[i] = 1;
}
}
afs_PutVolume(tvp, READ_LOCK);
}
}
! for (i = 0; i < MAXHOSTS; i++) {
! if (areq->skipserver[i] == 0) {
! serversleft = 1;
! break;
! }
! }
! return serversleft;
}
--- 255,276 ----
areq->skipserver[i] = 1;
}
if (tvp->serverHost[i] &&
! (tvp->serverHost[i]->addr->sa_flags &
SRVR_ISDOWN)) {
areq->skipserver[i] = 1;
}
}
afs_PutVolume(tvp, READ_LOCK);
+ for (i = 0; i < MAXHOSTS; i++) {
+ if (tvp->serverHost[i] && areq->skipserver[i] == 0) {
+ serversleft = 1;
+ break;
+ }
+ }
+ return serversleft;
}
}
! return 1;
}
Index: openafs/src/afs/afs_buffer.c
diff -c openafs/src/afs/afs_buffer.c:1.22.4.1 openafs/src/afs/afs_buffer.c:1.22.4.3
*** openafs/src/afs/afs_buffer.c:1.22.4.1 Thu Dec 13 14:18:29 2007
--- openafs/src/afs/afs_buffer.c Sat Nov 8 11:34:42 2008
***************
*** 11,17 ****
#include "afs/param.h"
RCSID
! ("$Header: /cvs/openafs/src/afs/afs_buffer.c,v 1.22.4.1 2007/12/13 19:18:29 shadow Exp $");
#include "afs/sysincludes.h"
#include "afsincludes.h"
--- 11,17 ----
#include "afs/param.h"
RCSID
! ("$Header: /cvs/openafs/src/afs/afs_buffer.c,v 1.22.4.3 2008/11/08 16:34:42 shadow Exp $");
#include "afs/sysincludes.h"
#include "afsincludes.h"
***************
*** 232,238 ****
--- 232,242 ----
MReleaseWriteLock(&tb->lock);
return NULL;
}
+ #if defined(LINUX_USE_FH)
+ tfile = afs_CFileOpen(&adc->f.fh, adc->f.fh_type);
+ #else
tfile = afs_CFileOpen(adc->f.inode);
+ #endif
code =
afs_CFileRead(tfile, tb->page * AFS_BUFFER_PAGESIZE, tb->data,
AFS_BUFFER_PAGESIZE);
***************
*** 344,350 ****
if (lp->dirty) {
/* see DFlush for rationale for not getting and locking the dcache */
! tfile = afs_CFileOpen(lp->inode);
afs_CFileWrite(tfile, lp->page * AFS_BUFFER_PAGESIZE, lp->data,
AFS_BUFFER_PAGESIZE);
lp->dirty = 0;
--- 348,358 ----
if (lp->dirty) {
/* see DFlush for rationale for not getting and locking the dcache */
! #if defined(LINUX_USE_FH)
! tfile = afs_CFileOpen(&lp->fh, lp->fh_type);
! #else
! tfile = afs_CFileOpen(lp->inode);
! #endif
afs_CFileWrite(tfile, lp->page * AFS_BUFFER_PAGESIZE, lp->data,
AFS_BUFFER_PAGESIZE);
lp->dirty = 0;
***************
*** 354,360 ****
--- 362,373 ----
/* Now fill in the header. */
lp->fid = adc->index;
+ #if defined(LINUX_USE_FH)
+ memcpy(&lp->fh, &adc->f.fh, sizeof(struct fid));
+ lp->fh_type = adc->f.fh_type;
+ #else
lp->inode = adc->f.inode;
+ #endif
lp->page = apage;
lp->accesstime = timecounter++;
FixupBucket(lp); /* move to the right hash bucket */
***************
*** 430,440 ****
return AFS_BUFFER_PAGESIZE * bp->page + (int)(((char *)ap) - bp->data);
}
! /* 1/1/91 - I've modified the hash function to take the page as well
* as the *fid, so that lookup will be a bit faster. That presents some
* difficulties for Zap, which now has to have some knowledge of the nature
* of the hash function. Oh well. This should use the list traversal
* method of DRead...
*/
void
DZap(struct dcache *adc)
--- 443,458 ----
return AFS_BUFFER_PAGESIZE * bp->page + (int)(((char *)ap) - bp->data);
}
! /*!
! * Zap one dcache entry: destroy one FID's buffers.
! *
! * 1/1/91 - I've modified the hash function to take the page as well
* as the *fid, so that lookup will be a bit faster. That presents some
* difficulties for Zap, which now has to have some knowledge of the nature
* of the hash function. Oh well. This should use the list traversal
* method of DRead...
+ *
+ * \param adc The dcache entry to be zapped.
*/
void
DZap(struct dcache *adc)
***************
*** 486,492 ****
--- 504,514 ----
* we cannot lock afs_xdcache). In addition, we cannot obtain
* a dcache lock while holding the tb->lock of the same file
* since that can deadlock with DRead/DNew */
+ #if defined(LINUX_USE_FH)
+ tfile = afs_CFileOpen(&tb->fh, tb->fh_type);
+ #else
tfile = afs_CFileOpen(tb->inode);
+ #endif
afs_CFileWrite(tfile, tb->page * AFS_BUFFER_PAGESIZE,
tb->data, AFS_BUFFER_PAGESIZE);
tb->dirty = 0; /* Clear the dirty flag */
Index: openafs/src/afs/afs_cell.c
diff -c openafs/src/afs/afs_cell.c:1.34.4.7 openafs/src/afs/afs_cell.c:1.34.4.9
*** openafs/src/afs/afs_cell.c:1.34.4.7 Sun Jan 27 20:39:18 2008
--- openafs/src/afs/afs_cell.c Sat Nov 8 11:34:42 2008
***************
*** 14,20 ****
#include "afs/param.h"
RCSID
! ("$Header: /cvs/openafs/src/afs/afs_cell.c,v 1.34.4.7 2008/01/28 01:39:18 shadow Exp $");
#include "afs/stds.h"
#include "afs/sysincludes.h" /* Standard vendor system headers */
--- 14,20 ----
#include "afs/param.h"
RCSID
! ("$Header: /cvs/openafs/src/afs/afs_cell.c,v 1.34.4.9 2008/11/08 16:34:42 shadow Exp $");
#include "afs/stds.h"
#include "afs/sysincludes.h" /* Standard vendor system headers */
***************
*** 50,55 ****
--- 50,58 ----
char *cellname;
} afsdb_req;
+ /*!
+ * Terminate the AFSDB handler, used on shutdown.
+ */
void
afs_StopAFSDB()
{
***************
*** 61,66 ****
--- 64,77 ----
}
}
+ /*!
+ * \brief Entry point for user-space AFSDB request handler.
+ * Reads cell data from kerlenMsg and add new cell, or alias.
+ * \param acellName Cell name. If a cell is found, it's name will be filled in here.
+ * \param acellNameLen Cell name length.
+ * \param kernelMsg Buffer containing data about host count, time out, and cell hosts ids.
+ * \return 0 for success, < 0 for error.
+ */
int
afs_AFSDBHandler(char *acellName, int acellNameLen, afs_int32 * kernelMsg)
{
***************
*** 135,140 ****
--- 146,156 ----
return 0;
}
+ /*!
+ * \brief Query the AFSDB handler and wait for response.
+ * \param acellName
+ * \return 0 for success. < 0 is error.
+ */
static int
afs_GetCellHostsAFSDB(char *acellName)
{
***************
*** 168,173 ****
--- 184,194 ----
}
#endif
+
+ /*!
+ * Look up AFSDB for given cell name and create locally.
+ * \param acellName Cell name.
+ */
void
afs_LookupAFSDB(char *acellName)
{
***************
*** 194,204 ****
--- 215,237 ----
*/
struct cell_name *afs_cellname_head; /* Export for kdump */
+ #if defined(LINUX_USE_FH)
+ struct fid afs_cellname_fh;
+ int afs_cellname_fh_type;
+ static int afs_cellname_fh_set;
+ #else
static ino_t afs_cellname_inode;
static int afs_cellname_inode_set;
+ #endif
static int afs_cellname_dirty;
static afs_int32 afs_cellnum_next;
+ /*!
+ * Create a new cell name, optional cell number.
+ * \param name Name of cell.
+ * \param cellnum Cellname number.
+ * \return Initialized structure.
+ */
static struct cell_name *
afs_cellname_new(char *name, afs_int32 cellnum)
{
***************
*** 220,225 ****
--- 253,263 ----
return cn;
}
+ /*!
+ * Look up a cell name by id.
+ * \param cellnum
+ * \return
+ */
static struct cell_name *
afs_cellname_lookup_id(afs_int32 cellnum)
{
***************
*** 232,237 ****
--- 270,280 ----
return NULL;
}
+ /*!
+ * Look up a cell name.
+ * \param name Cell name.
+ * \return
+ */
static struct cell_name *
afs_cellname_lookup_name(char *name)
{
***************
*** 244,249 ****
--- 287,296 ----
return NULL;
}
+ /*!
+ * Note that this cell name was referenced somewhere.
+ * \param cn
+ */
static void
afs_cellname_ref(struct cell_name *cn)
{
***************
*** 253,260 ****
--- 300,317 ----
}
}
+ /*!
+ * \brief Load the list of cells from given inode.
+ * \param inode Source inode.
+ * \param lookupcode
+ * \return 0 for success. < 0 for error.
+ */
int
+ #if defined(LINUX_USE_FH)
+ afs_cellname_init(struct fid *fh, int fh_type, int lookupcode)
+ #else
afs_cellname_init(ino_t inode, int lookupcode)
+ #endif
{
struct osi_file *tfile;
int cc, off = 0;
***************
*** 273,286 ****
--- 330,353 ----
return lookupcode;
}
+ #if defined(LINUX_USE_FH)
+ tfile = osi_UFSOpen_fh(fh, fh_type);
+ #else
tfile = osi_UFSOpen(inode);
+ #endif
if (!tfile) {
ReleaseWriteLock(&afs_xcell);
return EIO;
}
+ #if defined(LINUX_USE_FH)
+ memcpy(&afs_cellname_fh, fh, sizeof(struct fid));
+ afs_cellname_fh_type = fh_type;
+ afs_cellname_fh_set = 1;
+ #else
afs_cellname_inode = inode;
afs_cellname_inode_set = 1;
+ #endif
while (1) {
afs_int32 cellnum, clen, magic;
***************
*** 331,336 ****
--- 398,406 ----
return 0;
}
+ /*!
+ * Write in-kernel list of cells to disk.
+ */
int
afs_cellname_write(void)
{
***************
*** 338,344 ****
--- 408,418 ----
struct cell_name *cn;
int off;
+ #if defined(LINUX_USE_FH)
+ if (!afs_cellname_dirty || !afs_cellname_fh_set)
+ #else
if (!afs_cellname_dirty || !afs_cellname_inode_set)
+ #endif
return 0;
if (afs_initState != 300)
return 0;
***************
*** 346,352 ****
--- 420,430 ----
ObtainWriteLock(&afs_xcell, 693);
afs_cellname_dirty = 0;
off = 0;
+ #if defined(LINUX_USE_FH)
+ tfile = osi_UFSOpen_fh(&afs_cellname_fh, afs_cellname_fh_type);
+ #else
tfile = osi_UFSOpen(afs_cellname_inode);
+ #endif
if (!tfile) {
ReleaseWriteLock(&afs_xcell);
return EIO;
***************
*** 401,406 ****
--- 479,489 ----
static afs_int32 afs_cellalias_index;
static int afs_CellOrAliasExists_nl(char *aname); /* Forward declaration */
+ /*!
+ * Look up cell alias by alias name.
+ * \param alias
+ * \return Found struct or NULL.
+ */
static struct cell_alias *
afs_FindCellAlias(char *alias)
{
***************
*** 412,417 ****
--- 495,505 ----
return tc;
}
+ /*!
+ * Get cell alias by index (starting at 0).
+ * \param index Cell index.
+ * \return Found struct or null.
+ */
struct cell_alias *
afs_GetCellAlias(int index)
{
***************
*** 426,437 ****
--- 514,537 ----
return tc;
}
+
+ /*!
+ * Put back a cell alias returned by Find or Get.
+ * \param a Alias.
+ * \return
+ */
void
afs_PutCellAlias(struct cell_alias *a)
{
return;
}
+ /*!
+ * Create new cell alias entry and update dynroot vnode.
+ * \param alias
+ * \param cell
+ * \return
+ */
afs_int32
afs_NewCellAlias(char *alias, char *cell)
{
***************
*** 485,490 ****
--- 585,594 ----
static char *afs_thiscell;
afs_int32 afs_cellindex; /* Export for kdump */
+ /*!
+ * Bump given cell up to the front of the LRU queue.
+ * \param c Cell to set.
+ */
static void
afs_UpdateCellLRU(struct cell *c)
{
***************
*** 494,499 ****
--- 598,608 ----
ReleaseWriteLock(&afs_xcell);
}
+ /*!
+ * Look up cell information in AFSDB if timeout expired
+ * \param ac Cell to be refreshed.
+ * \return
+ */
static void
afs_RefreshCell(struct cell *ac)
{
***************
*** 503,508 ****
--- 612,625 ----
afs_LookupAFSDB(ac->cellName);
}
+ /*!
+ * Execute a callback for each existing cell, without a lock on afs_xcell.
+ * Iterate on CellLRU, and execute a callback for each cell until given arguments are met.
+ * \see afs_TraverseCells
+ * \param cb Traversal callback for each cell.
+ * \param arg Callback arguments.
+ * \return Found data or NULL.
+ */
static void *
afs_TraverseCells_nl(void *(*cb) (struct cell *, void *), void *arg)
{
***************
*** 528,533 ****
--- 645,657 ----
return ret;
}
+ /*!
+ * Execute a callback for each existing cell, with a lock on afs_xcell.
+ * \see afs_TraverseCells_nl
+ * \param cb Traversal callback for each cell.
+ * \param arg
+ * \return Found data or NULL.
+ */
void *
afs_TraverseCells(void *(*cb) (struct cell *, void *), void *arg)
{
***************
*** 540,545 ****
--- 664,675 ----
return ret;
}
+ /*!
+ * Useful traversal callback: Match by name.
+ * \param cell
+ * \param arg Cell name (compared with cell->cellName).
+ * \return Returns found cell or NULL.
+ */
static void *
afs_choose_cell_by_name(struct cell *cell, void *arg)
{
***************
*** 551,556 ****
--- 681,692 ----
}
}
+ /*!
+ * Useful traversal callback: Match by handle.
+ * \param cell
+ * \param arg Cell handle (compared with cell->cellHandle).
+ * \return Returns found cell or NULL.
+ */
static void *
afs_choose_cell_by_handle(struct cell *cell, void *arg)
{
***************
*** 562,591 ****
--- 698,759 ----
}
}
+ /*!
+ * Useful traversal callback: Match by cell number.
+ * \param cell
+ * \param arg Cell number (compared with cell->cellNum).
+ * \return Returns found cell or NULL.
+ */
static void *
afs_choose_cell_by_num(struct cell *cell, void *arg)
{
return (cell->cellNum == *((afs_int32 *) arg)) ? cell : NULL;
}
+ /*!
+ * Useful traversal callback: Match by index.
+ * \param cell
+ * \param arg Cell index (compared with cell->cellIndex).
+ * \return Returns found cell or NULL.
+ */
static void *
afs_choose_cell_by_index(struct cell *cell, void *arg)
{
return (cell->cellIndex == *((afs_int32 *) arg)) ? cell : NULL;
}
+ /*!
+ * Return a cell with a given name, if it exists. No lock version.
+ * Does not check AFSDB.
+ * \param acellName Cell name.
+ * \param locktype Type of lock to be used (not used).
+ * \return
+ */
static struct cell *
afs_FindCellByName_nl(char *acellName, afs_int32 locktype)
{
return afs_TraverseCells_nl(&afs_choose_cell_by_name, acellName);
}
+ /*!
+ * Return a cell with a given name, if it exists.It uses locks.
+ * Does not check AFSDB.
+ * \param acellName Cell name.
+ * \param locktype Type of lock to be used.
+ * \return
+ */
static struct cell *
afs_FindCellByName(char *acellName, afs_int32 locktype)
{
return afs_TraverseCells(&afs_choose_cell_by_name, acellName);
}
+ /*!
+ * Same as FindCellByName but tries AFSDB if not found.
+ * \param acellName Cell name.
+ * \param locktype Type of lock to be used.
+ * \return
+ */
struct cell *
afs_GetCellByName(char *acellName, afs_int32 locktype)
{
***************
*** 605,610 ****
--- 773,784 ----
return tc;
}
+ /*!
+ * Return a cell with a given cell number.
+ * \param cellnum Cell number.
+ * \param locktype Lock to be used.
+ * \return
+ */
struct cell *
afs_GetCell(afs_int32 cellnum, afs_int32 locktype)
{
***************
*** 624,629 ****
--- 798,809 ----
return tc;
}
+ /*!
+ * Same as GetCell, but does not try to refresh the data.
+ * \param cellnum Cell number.
+ * \param locktype What lock should be used.
+ * \return
+ */
struct cell *
afs_GetCellStale(afs_int32 cellnum, afs_int32 locktype)
{
***************
*** 637,642 ****
--- 817,828 ----
return tc;
}
+ /*!
+ * Return a cell with a given index number (starting at 0). Update CellLRU as well.
+ * \param index
+ * \param locktype Type of lock used.
+ * \return
+ */
struct cell *
afs_GetCellByIndex(afs_int32 index, afs_int32 locktype)
{
***************
*** 648,653 ****
--- 834,845 ----
return tc;
}
+ /*!
+ * Return a cell with a given handle..
+ * \param index
+ * \param locktype Type of lock used.
+ * \return
+ */
struct cell *
afs_GetCellByHandle(void *handle, afs_int32 locktype)
{
***************
*** 659,670 ****
--- 851,872 ----
return tc;
}
+ /*!
+ * Return primary cell, if any.
+ * \param locktype Type of lock used.
+ * \return
+ */
struct cell *
afs_GetPrimaryCell(afs_int32 locktype)
{
return afs_GetCellByName(afs_thiscell, locktype);
}
+ /*!
+ * Returns true if the given cell is the primary cell.
+ * \param cell
+ * \return
+ */
int
afs_IsPrimaryCell(struct cell *cell)
{
***************
*** 682,687 ****
--- 884,894 ----
}
}
+ /*!
+ * Returns afs_IsPrimaryCell(afs_GetCell(cellnum)).
+ * \param cellnum
+ * \return
+ */
int
afs_IsPrimaryCellNum(afs_int32 cellnum)
{
***************
*** 697,702 ****
--- 904,914 ----
return primary;
}
+ /*!
+ * Set the primary cell name to the given cell name.
+ * \param acellName Cell name.
+ * \return 0 for success, < 0 for error.
+ */
afs_int32
afs_SetPrimaryCell(char *acellName)
{
***************
*** 708,713 ****
--- 920,936 ----
return 0;
}
+ /*!
+ * Create or update a cell entry.
+ * \param acellName Name of cell.
+ * \param acellHosts Array of hosts that this cell has.
+ * \param aflags Cell flags.
+ * \param linkedcname
+ * \param fsport File server port.
+ * \param vlport Volume server port.
+ * \param timeout Cell timeout value, 0 means static AFSDB entry.
+ * \return
+ */
afs_int32
afs_NewCell(char *acellName, afs_int32 * acellHosts, int aflags,
char *linkedcname, u_short fsport, u_short vlport, int timeout)
***************
*** 780,788 ****
}
tc->states |= aflags;
tc->timeout = timeout;
!
memset((char *)tc->cellHosts, 0, sizeof(tc->cellHosts));
for (i = 0; i < MAXCELLHOSTS; i++) {
struct server *ts;
afs_uint32 temp = acellHosts[i];
if (!temp)
--- 1003,1012 ----
}
tc->states |= aflags;
tc->timeout = timeout;
!
memset((char *)tc->cellHosts, 0, sizeof(tc->cellHosts));
for (i = 0; i < MAXCELLHOSTS; i++) {
+ /* Get server for each host and link this cell in.*/
struct server *ts;
afs_uint32 temp = acellHosts[i];
if (!temp)
***************
*** 790,800 ****
ts = afs_GetServer(&temp, 1, 0, tc->vlport, WRITE_LOCK, NULL, 0);
ts->cell = tc;
ts->flags &= ~SRVR_ISGONE;
tc->cellHosts[i] = ts;
afs_PutServer(ts, WRITE_LOCK);
}
afs_SortServers(tc->cellHosts, MAXCELLHOSTS); /* randomize servers */
!
if (newc) {
struct cell_name *cn;
--- 1014,1026 ----
ts = afs_GetServer(&temp, 1, 0, tc->vlport, WRITE_LOCK, NULL, 0);
ts->cell = tc;
ts->flags &= ~SRVR_ISGONE;
+ /* Set the server as a host of the new cell. */
tc->cellHosts[i] = ts;
afs_PutServer(ts, WRITE_LOCK);
}
afs_SortServers(tc->cellHosts, MAXCELLHOSTS); /* randomize servers */
!
! /* New cell: Build and add to LRU cell queue. */
if (newc) {
struct cell_name *cn;
***************
*** 836,841 ****
--- 1062,1070 ----
* afs_CellNumValid: check if a cell number is valid (also set the used flag)
*/
+ /*!
+ * Perform whatever initialization is necessary.
+ */
void
afs_CellInit()
{
***************
*** 850,855 ****
--- 1079,1087 ----
afs_cellalias_index = 0;
}
+ /*!
+ * Called on shutdown, should deallocate memory, etc.
+ */
void
shutdown_cell()
{
***************
*** 880,885 ****
--- 1112,1122 ----
}
}
+ /*!
+ * Remove a server from a cell's server list.
+ * \param srvp Server to be removed.
+ * \return
+ */
void
afs_RemoveCellEntry(struct server *srvp)
{
***************
*** 908,913 ****
--- 1145,1155 ----
ReleaseWriteLock(&tc->lock);
}
+ /*!
+ * Check if the given name exists as a cell or alias. Does not lock afs_xcell.
+ * \param aname
+ * \return
+ */
static int
afs_CellOrAliasExists_nl(char *aname)
{
***************
*** 929,934 ****
--- 1171,1181 ----
return 0;
}
+ /*!
+ * Check if the given name exists as a cell or alias. Locks afs_xcell.
+ * \param aname
+ * \return
+ */
int
afs_CellOrAliasExists(char *aname)
{
***************
*** 941,946 ****
--- 1188,1198 ----
return ret;
}
+ /*!
+ * Check if a cell number is valid (also set the used flag).
+ * \param cellnum
+ * \return 1 - true, 0 - false
+ */
int
afs_CellNumValid(afs_int32 cellnum)
{
Index: openafs/src/afs/afs_chunkops.h
diff -c openafs/src/afs/afs_chunkops.h:1.7 openafs/src/afs/afs_chunkops.h:1.7.4.1
*** openafs/src/afs/afs_chunkops.h:1.7 Wed Aug 17 12:16:50 2005
--- openafs/src/afs/afs_chunkops.h Sat Nov 8 11:34:42 2008
***************
*** 55,62 ****
--- 55,66 ----
#if defined(AFS_SUN57_64BIT_ENV) || defined(AFS_SGI62_ENV)
void *(*open) (ino_t ainode);
#else
+ #if defined(LINUX_USE_FH)
+ void *(*open) (struct fid *fh, int fh_type);
+ #else
void *(*open) (afs_int32 ainode);
#endif
+ #endif
int (*truncate) (struct osi_file * fp, afs_int32 len);
int (*fread) (struct osi_file * fp, int offset, void *buf, afs_int32 len);
int (*fwrite) (struct osi_file * fp, afs_int32 offset, void *buf,
***************
*** 84,90 ****
--- 88,98 ----
};
/* Ideally we should have used consistent naming - like COP_OPEN, COP_TRUNCATE, etc. */
+ #if defined(LINUX_USE_FH)
+ #define afs_CFileOpen(fh, fh_type) (void *)(*(afs_cacheType->open))(fh, fh_type)
+ #else
#define afs_CFileOpen(inode) (void *)(*(afs_cacheType->open))(inode)
+ #endif
#define afs_CFileTruncate(handle, size) (*(afs_cacheType->truncate))((handle), size)
#define afs_CFileRead(file, offset, data, size) (*(afs_cacheType->fread))(file, offset, data, size)
#define afs_CFileWrite(file, offset, data, size) (*(afs_cacheType->fwrite))(file, offset, data, size)
Index: openafs/src/afs/afs_conn.c
diff -c openafs/src/afs/afs_conn.c:1.14.8.4 openafs/src/afs/afs_conn.c:1.14.8.7
*** openafs/src/afs/afs_conn.c:1.14.8.4 Mon Sep 22 15:29:54 2008
--- openafs/src/afs/afs_conn.c Mon Oct 20 12:40:48 2008
***************
*** 14,20 ****
#include "afs/param.h"
RCSID
! ("$Header: /cvs/openafs/src/afs/afs_conn.c,v 1.14.8.4 2008/09/22 19:29:54 shadow Exp $");
#include "afs/stds.h"
#include "afs/sysincludes.h" /* Standard vendor system headers */
--- 14,20 ----
#include "afs/param.h"
RCSID
! ("$Header: /cvs/openafs/src/afs/afs_conn.c,v 1.14.8.7 2008/10/20 16:40:48 shadow Exp $");
#include "afs/stds.h"
#include "afs/sysincludes.h" /* Standard vendor system headers */
***************
*** 52,57 ****
--- 52,68 ----
unsigned int VNOSERVERS = 0;
+
+ /**
+ * Try setting up a connection to the server containing the specified fid.
+ * Gets the volume, checks if it's up and does the connection by server address.
+ *
+ * @param afid
+ * @param areq Request filled in by the caller.
+ * @param locktype Type of lock that will be used.
+ *
+ * @return The conn struct, or NULL.
+ */
struct conn *
afs_Conn(register struct VenusFid *afid, register struct vrequest *areq,
afs_int32 locktype)
***************
*** 66,71 ****
--- 77,83 ----
struct srvAddr *sa1p;
AFS_STATCNT(afs_Conn);
+ /* Get fid's volume. */
tv = afs_GetVolume(afid, areq, READ_LOCK);
if (!tv) {
if (areq) {
***************
*** 132,137 ****
--- 144,162 ----
} /*afs_Conn */
+ /**
+ * Connects to a server by it's server address.
+ *
+ * @param sap Server address.
+ * @param aport Server port.
+ * @param acell
+ * @param tu Connect as this user.
+ * @param force_if_down
+ * @param create
+ * @param locktype Specifies type of lock to be used for this function.
+ *
+ * @return The new connection.
+ */
struct conn *
afs_ConnBySA(struct srvAddr *sap, unsigned short aport, afs_int32 acell,
struct unixuser *tu, int force_if_down, afs_int32 create,
***************
*** 148,153 ****
--- 173,179 ----
}
ObtainSharedLock(&afs_xconn, 15);
+ /* Get conn by port and user. */
for (tc = sap->conns; tc; tc = tc->next) {
if (tc->user == tu && tc->port == aport) {
break;
***************
*** 155,160 ****
--- 181,187 ----
}
if (!tc && !create) {
+ /* Not found and can't create a new one. */
ReleaseSharedLock(&afs_xconn);
return NULL;
}
***************
*** 187,193 ****
afs_ActivateServer(sap);
ConvertWToSLock(&afs_xconn);
! }
tc->refCount++;
if (tu->states & UTokensBad) {
--- 214,220 ----
afs_ActivateServer(sap);
ConvertWToSLock(&afs_xconn);
! } /* end of if (!tc) */
tc->refCount++;
if (tu->states & UTokensBad) {
***************
*** 251,270 ****
if (csec)
rxs_Release(csec);
ConvertWToSLock(&afs_xconn);
! }
ReleaseSharedLock(&afs_xconn);
return tc;
}
! /*
! * afs_ConnByHost
! *
* forceConnectFS is set whenever we must recompute the connection. UTokensBad
* is true only if we know that the tokens are bad. We thus clear this flag
* when we get a new set of tokens..
* Having force... true and UTokensBad true simultaneously means that the tokens
* went bad and we're supposed to create a new, unauthenticated, connection.
*/
struct conn *
afs_ConnByHost(struct server *aserver, unsigned short aport, afs_int32 acell,
--- 278,304 ----
if (csec)
rxs_Release(csec);
ConvertWToSLock(&afs_xconn);
! } /* end of if (tc->forceConnectFS)*/
ReleaseSharedLock(&afs_xconn);
return tc;
}
! /**
* forceConnectFS is set whenever we must recompute the connection. UTokensBad
* is true only if we know that the tokens are bad. We thus clear this flag
* when we get a new set of tokens..
* Having force... true and UTokensBad true simultaneously means that the tokens
* went bad and we're supposed to create a new, unauthenticated, connection.
+ *
+ * @param aserver Server to connect to.
+ * @param aport Connection port.
+ * @param acell The cell where all of this happens.
+ * @param areq The request.
+ * @param aforce Force connection?
+ * @param locktype Type of lock to be used.
+ *
+ * @return The established connection.
*/
struct conn *
afs_ConnByHost(struct server *aserver, unsigned short aport, afs_int32 acell,
***************
*** 313,318 ****
--- 347,364 ----
} /*afs_ConnByHost */
+ /**
+ * Connect by multiple hosts.
+ * Try to connect to one of the hosts from the ahosts array.
+ *
+ * @param ahosts Multiple hosts to connect to.
+ * @param aport Connection port.
+ * @param acell The cell where all of this happens.
+ * @param areq The request.
+ * @param locktype Type of lock to be used.
+ *
+ * @return The established connection or NULL.
+ */
struct conn *
afs_ConnByMHosts(struct server *ahosts[], unsigned short aport,
afs_int32 acell, register struct vrequest *areq,
***************
*** 337,342 ****
--- 383,393 ----
} /*afs_ConnByMHosts */
+ /**
+ * Decrement reference count to this connection.
+ * @param ac
+ * @param locktype
+ */
void
afs_PutConn(register struct conn *ac, afs_int32 locktype)
{
***************
*** 345,354 ****
} /*afs_PutConn */
! /* for multi homed clients, an RPC may timeout because of a
! client network interface going down. We need to reopen new
! connections in this case
! */
void
ForceNewConnections(struct srvAddr *sap)
{
--- 396,408 ----
} /*afs_PutConn */
! /**
! * For multi homed clients, a RPC may timeout because of a
! * client network interface going down. We need to reopen new
! * connections in this case.
! *
! * @param sap Server address.
! */
void
ForceNewConnections(struct srvAddr *sap)
{
Index: openafs/src/afs/afs_dcache.c
diff -c openafs/src/afs/afs_dcache.c:1.64.4.11 openafs/src/afs/afs_dcache.c:1.64.4.13
*** openafs/src/afs/afs_dcache.c:1.64.4.11 Mon Sep 22 15:35:26 2008
--- openafs/src/afs/afs_dcache.c Sat Nov 8 11:34:42 2008
***************
*** 14,20 ****
#include "afs/param.h"
RCSID
! ("$Header: /cvs/openafs/src/afs/afs_dcache.c,v 1.64.4.11 2008/09/22 19:35:26 shadow Exp $");
#include "afs/sysincludes.h" /*Standard vendor system headers */
#include "afsincludes.h" /*AFS-based standard headers */
--- 14,20 ----
#include "afs/param.h"
RCSID
! ("$Header: /cvs/openafs/src/afs/afs_dcache.c,v 1.64.4.13 2008/11/08 16:34:42 shadow Exp $");
#include "afs/sysincludes.h" /*Standard vendor system headers */
#include "afsincludes.h" /*AFS-based standard headers */
***************
*** 38,85 ****
* --------------------- Exported definitions ---------------------
*/
/* For split cache */
! afs_int32 afs_blocksUsed_0; /*1K blocks in cache - in theory is zero */
! afs_int32 afs_blocksUsed_1; /*1K blocks in cache */
! afs_int32 afs_blocksUsed_2; /*1K blocks in cache */
afs_int32 afs_pct1 = -1;
afs_int32 afs_pct2 = -1;
afs_uint32 afs_tpct1 = 0;
afs_uint32 afs_tpct2 = 0;
afs_uint32 splitdcache = 0;
! afs_lock_t afs_xdcache; /*Lock: alloc new disk cache entries */
! afs_int32 afs_freeDCList; /*Free list for disk cache entries */
! afs_int32 afs_freeDCCount; /*Count of elts in freeDCList */
! afs_int32 afs_discardDCList; /*Discarded disk cache entries */
! afs_int32 afs_discardDCCount; /*Count of elts in discardDCList */
! struct dcache *afs_freeDSList; /*Free list for disk slots */
! struct dcache *afs_Initial_freeDSList; /*Initial list for above */
! ino_t cacheInode; /*Inode for CacheItems file */
! struct osi_file *afs_cacheInodep = 0; /* file for CacheItems inode */
! struct afs_q afs_DLRU; /*dcache LRU */
afs_int32 afs_dhashsize = 1024;
! afs_int32 *afs_dvhashTbl; /*Data cache hash table */
! afs_int32 *afs_dchashTbl; /*Data cache hash table */
! afs_int32 *afs_dvnextTbl; /*Dcache hash table links */
! afs_int32 *afs_dcnextTbl; /*Dcache hash table links */
! struct dcache **afs_indexTable; /*Pointers to dcache entries */
! afs_hyper_t *afs_indexTimes; /*Dcache entry Access times */
! afs_int32 *afs_indexUnique; /*dcache entry Fid.Unique */
! unsigned char *afs_indexFlags; /*(only one) Is there data there? */
! afs_hyper_t afs_indexCounter; /*Fake time for marking index
* entries */
! afs_int32 afs_cacheFiles = 0; /*Size of afs_indexTable */
! afs_int32 afs_cacheBlocks; /*1K blocks in cache */
! afs_int32 afs_cacheStats; /*Stat entries in cache */
! afs_int32 afs_blocksUsed; /*Number of blocks in use */
! afs_int32 afs_blocksDiscarded; /*Blocks freed but not truncated */
! afs_int32 afs_fsfragsize = 1023; /*Underlying Filesystem minimum unit
*of disk allocation usually 1K
*this value is (truefrag -1 ) to
*save a bunch of subtracts... */
#ifdef AFS_64BIT_CLIENT
#ifdef AFS_VM_RDWR_ENV
! afs_size_t afs_vmMappingEnd; /* for large files (>= 2GB) the VM
* mapping an 32bit addressing machines
* can only be used below the 2 GB
* line. From this point upwards we
--- 38,90 ----
* --------------------- Exported definitions ---------------------
*/
/* For split cache */
! afs_int32 afs_blocksUsed_0; /*!< 1K blocks in cache - in theory is zero */
! afs_int32 afs_blocksUsed_1; /*!< 1K blocks in cache */
! afs_int32 afs_blocksUsed_2; /*!< 1K blocks in cache */
afs_int32 afs_pct1 = -1;
afs_int32 afs_pct2 = -1;
afs_uint32 afs_tpct1 = 0;
afs_uint32 afs_tpct2 = 0;
afs_uint32 splitdcache = 0;
! afs_lock_t afs_xdcache; /*!< Lock: alloc new disk cache entries */
! afs_int32 afs_freeDCList; /*!< Free list for disk cache entries */
! afs_int32 afs_freeDCCount; /*!< Count of elts in freeDCList */
! afs_int32 afs_discardDCList; /*!< Discarded disk cache entries */
! afs_int32 afs_discardDCCount; /*!< Count of elts in discardDCList */
! struct dcache *afs_freeDSList; /*!< Free list for disk slots */
! struct dcache *afs_Initial_freeDSList; /*!< Initial list for above */
! #if defined(LINUX_USE_FH)
! struct fid cacheitems_fh;
! int cacheitems_fh_type;
! #else
! ino_t cacheInode; /*!< Inode for CacheItems file */
! #endif
! struct osi_file *afs_cacheInodep = 0; /*!< file for CacheItems inode */
! struct afs_q afs_DLRU; /*!< dcache LRU */
afs_int32 afs_dhashsize = 1024;
! afs_int32 *afs_dvhashTbl; /*!< Data cache hash table: hashed by FID + chunk number. */
! afs_int32 *afs_dchashTbl; /*!< Data cache hash table: hashed by FID. */
! afs_int32 *afs_dvnextTbl; /*!< Dcache hash table links */
! afs_int32 *afs_dcnextTbl; /*!< Dcache hash table links */
! struct dcache **afs_indexTable; /*!< Pointers to dcache entries */
! afs_hyper_t *afs_indexTimes; /*!< Dcache entry Access times */
! afs_int32 *afs_indexUnique; /*!< dcache entry Fid.Unique */
! unsigned char *afs_indexFlags; /*!< (only one) Is there data there? */
! afs_hyper_t afs_indexCounter; /*!< Fake time for marking index
* entries */
! afs_int32 afs_cacheFiles = 0; /*!< Size of afs_indexTable */
! afs_int32 afs_cacheBlocks; /*!< 1K blocks in cache */
! afs_int32 afs_cacheStats; /*!< Stat entries in cache */
! afs_int32 afs_blocksUsed; /*!< Number of blocks in use */
! afs_int32 afs_blocksDiscarded; /*!= 2GB) the VM
* mapping an 32bit addressing machines
* can only be used below the 2 GB
* line. From this point upwards we
***************
*** 96,109 ****
int afs_TruncateDaemonRunning = 0;
int afs_CacheTooFull = 0;
! afs_int32 afs_dcentries; /* In-memory dcache entries */
int dcacheDisabled = 0;
static int afs_UFSCacheFetchProc(), afs_UFSCacheStoreProc();
struct afs_cacheOps afs_UfsCacheOps = {
osi_UFSOpen,
osi_UFSTruncate,
afs_osi_Read,
afs_osi_Write,
--- 101,118 ----
int afs_TruncateDaemonRunning = 0;
int afs_CacheTooFull = 0;
! afs_int32 afs_dcentries; /*!< In-memory dcache entries */
int dcacheDisabled = 0;
static int afs_UFSCacheFetchProc(), afs_UFSCacheStoreProc();
struct afs_cacheOps afs_UfsCacheOps = {
+ #if defined(LINUX_USE_FH)
+ osi_UFSOpen_fh,
+ #else
osi_UFSOpen,
+ #endif
osi_UFSTruncate,
afs_osi_Read,
afs_osi_Write,
***************
*** 135,140 ****
--- 144,156 ----
int cacheDiskType; /*Type of backing disk for cache */
struct afs_cacheOps *afs_cacheType;
+ /*!
+ * Where is this vcache's entry associated dcache located/
+ * \param avc The vcache entry.
+ * \return Bucket index:
+ * 1 : main
+ * 2 : RO
+ */
static afs_int32
afs_DCGetBucket(struct vcache *avc)
{
***************
*** 153,158 ****
--- 169,182 ----
return 1;
}
+ /*!
+ * Readjust a dcache's size.
+ *
+ * \param adc The dcache to be adjusted.
+ * \param oldSize Old size for the dcache.
+ * \param newSize The new size to be adjusted to.
+ *
+ */
static void
afs_DCAdjustSize(struct dcache *adc, afs_int32 oldSize, afs_int32 newSize)
{
***************
*** 180,191 ****
--- 204,224 ----
return;
}
+ /*!
+ * Move a dcache from one bucket to another.
+ *
+ * \param adc Operate on this dcache.
+ * \param size Size in bucket (?).
+ * \param newBucket Destination bucket.
+ *
+ */
static void
afs_DCMoveBucket(struct dcache *adc, afs_int32 size, afs_int32 newBucket)
{
if (!splitdcache)
return;
+ /* Substract size from old bucket. */
switch (adc->bucket)
{
case 0:
***************
*** 199,204 ****
--- 232,238 ----
break;
}
+ /* Set new bucket and increase destination bucket size. */
adc->bucket = newBucket;
switch (adc->bucket)
***************
*** 217,228 ****
--- 251,270 ----
return;
}
+ /*!
+ * Init split caches size.
+ */
static void
afs_DCSizeInit(void)
{
afs_blocksUsed_0 = afs_blocksUsed_1 = afs_blocksUsed_2 = 0;
}
+
+ /*!
+ * \param phase
+ * \param bucket
+ */
static afs_int32
afs_DCWhichBucket(afs_int32 phase, afs_int32 bucket)
{
***************
*** 244,264 ****
}
! /*
! * afs_StoreWarn
*
! * Description:
! * Warn about failing to store a file.
*
! * Parameters:
! * acode : Associated error code.
! * avolume : Volume involved.
! * aflags : How to handle the output:
! * aflags & 1: Print out on console
! * aflags & 2: Print out on controlling tty
! *
! * Environment:
! * Call this from close call when vnodeops is RCS unlocked.
*/
void
--- 286,301 ----
}
! /*!
! * Warn about failing to store a file.
*
! * \param acode Associated error code.
! * \param avolume Volume involved.
! * \param aflags How to handle the output:
! * aflags & 1: Print out on console
! * aflags & 2: Print out on controlling tty
*
! * \note Environment: Call this from close call when vnodeops is RCS unlocked.
*/
void
***************
*** 316,321 ****
--- 353,361 ----
}
} /*afs_StoreWarn */
+ /*!
+ * Try waking up truncation daemon, if it's worth it.
+ */
void
afs_MaybeWakeupTruncateDaemon(void)
{
***************
*** 329,335 ****
}
}
! /* Keep statistics on run time for afs_CacheTruncateDaemon. This is a
* struct so we need only export one symbol for AIX.
*/
static struct CTD_stats {
--- 369,378 ----
}
}
! /*!
! * /struct CTD_stats
! *
! * Keep statistics on run time for afs_CacheTruncateDaemon. This is a
* struct so we need only export one symbol for AIX.
*/
static struct CTD_stats {
***************
*** 341,346 ****
--- 384,395 ----
} CTD_stats;
u_int afs_min_cache = 0;
+
+ /*!
+ * Keeps the cache clean and free by truncating uneeded files, when used.
+ * \param
+ * \return
+ */
void
afs_CacheTruncateDaemon(void)
{
***************
*** 374,380 ****
}
if (!afs_CacheIsTooFull())
afs_CacheTooFull = 0;
! }
MReleaseWriteLock(&afs_xdcache);
/*
--- 423,429 ----
}
if (!afs_CacheIsTooFull())
afs_CacheTooFull = 0;
! } /* end of cache cleanup */
MReleaseWriteLock(&afs_xdcache);
/*
***************
*** 431,450 ****
}
! /*
! * afs_AdjustSize
! *
! * Description:
! * Make adjustment for the new size in the disk cache entry
*
! * Major Assumptions Here:
* Assumes that frag size is an integral power of two, less one,
* and that this is a two's complement machine. I don't
* know of any filesystems which violate this assumption...
*
! * Parameters:
! * adc : Ptr to dcache entry.
! * anewsize : New size desired.
*/
void
--- 480,496 ----
}
! /*!
! * Make adjustment for the new size in the disk cache entry
*
! * \note Major Assumptions Here:
* Assumes that frag size is an integral power of two, less one,
* and that this is a two's complement machine. I don't
* know of any filesystems which violate this assumption...
*
! * \param adc Ptr to dcache entry.
! * \param anewsize New size desired.
! *
*/
void
***************
*** 471,488 ****
}
! /*
! * afs_GetDownD
! *
! * Description:
! * This routine is responsible for moving at least one entry (but up
! * to some number of them) from the LRU queue to the free queue.
*
! * Parameters:
! * anumber : Number of entries that should ideally be moved.
! * aneedSpace : How much space we need (1K blocks);
*
! * Environment:
* The anumber parameter is just a hint; at least one entry MUST be
* moved, or we'll panic. We must be called with afs_xdcache
* write-locked. We should try to satisfy both anumber and aneedspace,
--- 517,530 ----
}
! /*!
! * This routine is responsible for moving at least one entry (but up
! * to some number of them) from the LRU queue to the free queue.
*
! * \param anumber Number of entries that should ideally be moved.
! * \param aneedSpace How much space we need (1K blocks);
*
! * \note Environment:
* The anumber parameter is just a hint; at least one entry MUST be
* moved, or we'll panic. We must be called with afs_xdcache
* write-locked. We should try to satisfy both anumber and aneedspace,
***************
*** 491,497 ****
* the whole set of MAXATONCE.
* 2. dynamically choose MAXATONCE to reflect severity of
* demand: something like (*aneedSpace >> (logChunk - 9))
! * N.B. if we're called with aneedSpace <= 0 and anumber > 0, that
* indicates that the cache is not properly configured/tuned or
* something. We should be able to automatically correct that problem.
*/
--- 533,540 ----
* the whole set of MAXATONCE.
* 2. dynamically choose MAXATONCE to reflect severity of
* demand: something like (*aneedSpace >> (logChunk - 9))
! *
! * \note N.B. if we're called with aneedSpace <= 0 and anumber > 0, that
* indicates that the cache is not properly configured/tuned or
* something. We should be able to automatically correct that problem.
*/
***************
*** 793,799 ****
}
}
afs_PutDCache(tdc);
! }
if (phase < 5) {
/* Phase is 0 and no one was found, so try phase 1 (ignore
--- 836,842 ----
}
}
afs_PutDCache(tdc);
! } /* end of for victims loop */
if (phase < 5) {
/* Phase is 0 and no one was found, so try phase 1 (ignore
***************
*** 820,833 ****
} /*afs_GetDownD */
! /*
! * Description: remove adc from any hash tables that would allow it to be located
* again by afs_FindDCache or afs_GetDCache.
*
! * Parameters: adc -- pointer to dcache entry to remove from hash tables.
! * zap -- zap the given dcache ?
*
- * Locks: Must have the afs_xdcache lock write-locked to call this function.
*/
int
afs_HashOutDCache(struct dcache *adc, int zap)
--- 863,876 ----
} /*afs_GetDownD */
! /*!
! * Remove adc from any hash tables that would allow it to be located
* again by afs_FindDCache or afs_GetDCache.
*
! * \param adc Pointer to dcache entry to remove from hash tables.
! *
! * \note Locks: Must have the afs_xdcache lock write-locked to call this function.
*
*/
int
afs_HashOutDCache(struct dcache *adc, int zap)
***************
*** 895,915 ****
return 0;
} /*afs_HashOutDCache */
! /*
! * afs_FlushDCache
! *
! * Description:
! * Flush the given dcache entry, pulling it from hash chains
! * and truncating the associated cache file.
*
! * Arguments:
! * adc: Ptr to dcache entry to flush.
*
! * Environment:
* This routine must be called with the afs_xdcache lock held
! * (in write mode)
*/
-
void
afs_FlushDCache(register struct dcache *adc)
{
--- 938,953 ----
return 0;
} /*afs_HashOutDCache */
! /*!
! * Flush the given dcache entry, pulling it from hash chains
! * and truncating the associated cache file.
*
! * \param adc Ptr to dcache entry to flush.
*
! * \note Environment:
* This routine must be called with the afs_xdcache lock held
! * (in write mode).
*/
void
afs_FlushDCache(register struct dcache *adc)
{
***************
*** 944,957 ****
} /*afs_FlushDCache */
! /*
! * afs_FreeDCache
! *
! * Description: put a dcache entry on the free dcache entry list.
*
! * Parameters: adc -- dcache entry to free
*
! * Environment: called with afs_xdcache lock write-locked.
*/
static void
afs_FreeDCache(register struct dcache *adc)
--- 982,993 ----
} /*afs_FlushDCache */
! /*!
! * Put a dcache entry on the free dcache entry list.
*
! * \param adc dcache entry to free.
*
! * \note Environment: called with afs_xdcache lock write-locked.
*/
static void
afs_FreeDCache(register struct dcache *adc)
***************
*** 974,998 ****
afs_osi_Wakeup(&afs_WaitForCacheDrain);
}
}
! }
! /*
! * afs_DiscardDCache
! *
! * Description:
! * Discard the cache element by moving it to the discardDCList.
! * This puts the cache element into a quasi-freed state, where
! * the space may be reused, but the file has not been truncated.
*
! * Major Assumptions Here:
* Assumes that frag size is an integral power of two, less one,
* and that this is a two's complement machine. I don't
* know of any filesystems which violate this assumption...
*
! * Parameters:
! * adc : Ptr to dcache entry.
*
! * Environment:
* Must be called with afs_xdcache write-locked.
*/
--- 1010,1030 ----
afs_osi_Wakeup(&afs_WaitForCacheDrain);
}
}
! } /* afs_FreeDCache */
! /*!
! * Discard the cache element by moving it to the discardDCList.
! * This puts the cache element into a quasi-freed state, where
! * the space may be reused, but the file has not been truncated.
*
! * \note Major Assumptions Here:
* Assumes that frag size is an integral power of two, less one,
* and that this is a two's complement machine. I don't
* know of any filesystems which violate this assumption...
*
! * \param adr Ptr to dcache entry.
*
! * \note Environment:
* Must be called with afs_xdcache write-locked.
*/
***************
*** 1027,1037 ****
} /*afs_DiscardDCache */
! /*
! * afs_FreeDiscardedDCache
! *
! * Description:
! * Free the next element on the list of discarded cache elements.
*/
static void
afs_FreeDiscardedDCache(void)
--- 1059,1066 ----
} /*afs_DiscardDCache */
! /*!
! * Free the next element on the list of discarded cache elements.
*/
static void
afs_FreeDiscardedDCache(void)
***************
*** 1068,1074 ****
--- 1097,1107 ----
/*
* Truncate the element to reclaim its space
*/
+ #if defined(LINUX_USE_FH)
+ tfile = afs_CFileOpen(&tdc->f.fh, tdc->f.fh_type);
+ #else
tfile = afs_CFileOpen(tdc->f.inode);
+ #endif
afs_CFileTruncate(tfile, 0);
afs_CFileClose(tfile);
afs_AdjustSize(tdc, 0);
***************
*** 1086,1100 ****
MReleaseWriteLock(&afs_xdcache);
}
! /*
! * afs_MaybeFreeDiscardedDCache
! *
! * Description:
! * Free as many entries from the list of discarded cache elements
! * as we need to get the free space down below CM_WAITFORDRAINPCT (98%).
*
! * Parameters:
! * None
*/
int
afs_MaybeFreeDiscardedDCache(void)
--- 1119,1129 ----
MReleaseWriteLock(&afs_xdcache);
}
! /*!
! * Free as many entries from the list of discarded cache elements
! * as we need to get the free space down below CM_WAITFORDRAINPCT (98%).
*
! * \return 0
*/
int
afs_MaybeFreeDiscardedDCache(void)
***************
*** 1110,1126 ****
return 0;
}
! /*
! * afs_GetDownDSlot
! *
! * Description:
! * Try to free up a certain number of disk slots.
*
! * Parameters:
! * anumber : Targeted number of disk slots to free up.
*
! * Environment:
* Must be called with afs_xdcache write-locked.
*/
static void
afs_GetDownDSlot(int anumber)
--- 1139,1152 ----
return 0;
}
! /*!
! * Try to free up a certain number of disk slots.
*
! * \param anumber Targeted number of disk slots to free up.
*
! * \note Environment:
* Must be called with afs_xdcache write-locked.
+ *
*/
static void
afs_GetDownDSlot(int anumber)
***************
*** 1703,1709 ****
--- 1729,1739 ----
afs_stats_cmperf.cacheBlocksDiscarded = afs_blocksDiscarded;
if (lock & 2) {
/* Truncate the chunk so zeroes get filled properly */
+ #if defined(LINUX_USE_FH)
+ file = afs_CFileOpen(&tdc->f.fh, tdc->f.fh_type);
+ #else
file = afs_CFileOpen(tdc->f.inode);
+ #endif
afs_CFileTruncate(file, 0);
afs_CFileClose(file);
afs_AdjustSize(tdc, 0);
***************
*** 2121,2127 ****
--- 2151,2161 ----
/* no data in file to read at this position */
UpgradeSToWLock(&tdc->lock, 607);
+ #if defined(LINUX_USE_FH)
+ file = afs_CFileOpen(&tdc->f.fh, tdc->f.fh_type);
+ #else
file = afs_CFileOpen(tdc->f.inode);
+ #endif
afs_CFileTruncate(file, 0);
afs_CFileClose(file);
afs_AdjustSize(tdc, 0);
***************
*** 2308,2314 ****
--- 2342,2352 ----
* fetch the whole file.
*/
DZap(tdc); /* pages in cache may be old */
+ #if defined(LINUX_USE_FH)
+ file = afs_CFileOpen(&tdc->f.fh, tdc->f.fh_type);
+ #else
file = afs_CFileOpen(tdc->f.inode);
+ #endif
afs_RemoveVCB(&avc->fid);
tdc->f.states |= DWriting;
tdc->dflags |= DFFetching;
***************
*** 3188,3205 ****
! /*
! * afs_WriteDCache
! *
! * Description:
! * write a particular dcache entry back to its home in the
! * CacheInfo file.
*
! * Parameters:
! * adc : Pointer to the dcache entry to write.
! * atime : If true, set the modtime on the file to the current time.
*
! * Environment:
* Must be called with the afs_xdcache lock at least read-locked,
* and dcache entry at least read-locked.
* The reference count is not changed.
--- 3226,3239 ----
! /*!
! * Write a particular dcache entry back to its home in the
! * CacheInfo file.
*
! * \param adc Pointer to the dcache entry to write.
! * \param atime If true, set the modtime on the file to the current time.
*
! * \note Environment:
* Must be called with the afs_xdcache lock at least read-locked,
* and dcache entry at least read-locked.
* The reference count is not changed.
***************
*** 3232,3251 ****
! /*
! * afs_wakeup
! *
! * Description:
! * Wake up users of a particular file waiting for stores to take
! * place.
*
! * Parameters:
! * avc : Ptr to related vcache entry.
*
! * Environment:
* Nothing interesting.
*/
-
int
afs_wakeup(register struct vcache *avc)
{
--- 3266,3280 ----
! /*!
! * Wake up users of a particular file waiting for stores to take
! * place.
*
! * \param avc Ptr to related vcache entry.
*
! * \note Environment:
* Nothing interesting.
*/
int
afs_wakeup(register struct vcache *avc)
{
***************
*** 3281,3302 ****
}
! /*
! * afs_InitCacheFile
! *
! * Description:
! * Given a file name and inode, set up that file to be an
! * active member in the AFS cache. This also involves checking
! * the usability of its data.
*
! * Parameters:
! * afile : Name of the cache file to initialize.
! * ainode : Inode of the file.
*
! * Environment:
* This function is called only during initialization.
*/
-
int
afs_InitCacheFile(char *afile, ino_t ainode)
{
--- 3310,3326 ----
}
! /*!
! * Given a file name and inode, set up that file to be an
! * active member in the AFS cache. This also involves checking
! * the usability of its data.
*
! * \param afile Name of the cache file to initialize.
! * \param ainode Inode of the file.
*
! * \note Environment:
* This function is called only during initialization.
*/
int
afs_InitCacheFile(char *afile, ino_t ainode)
{
***************
*** 3311,3316 ****
--- 3335,3343 ----
struct osi_file *tfile;
struct osi_stat tstat;
register struct dcache *tdc;
+ #if defined(LINUX_USE_FH)
+ int max_len = sizeof(struct fid);
+ #endif
AFS_STATCNT(afs_InitCacheFile);
index = afs_stats_cmperf.cacheNumEntries;
***************
*** 3338,3345 ****
* UFS file system, and just record the inode number.
*/
#ifdef AFS_LINUX22_ENV
! tdc->f.inode = VTOI(filevp->d_inode)->i_number;
! dput(filevp);
#else
tdc->f.inode = afs_vnodeToInumber(filevp);
AFS_RELE(filevp);
--- 3365,3375 ----
* UFS file system, and just record the inode number.
*/
#ifdef AFS_LINUX22_ENV
! #if defined(LINUX_USE_FH)
! tdc->f.fh_type = osi_get_fh(filevp, &tdc->f.fh, &max_len);
! #else
! tdc->f.inode = VTOI(filevp->d_inode)->i_number;
! #endif
#else
tdc->f.inode = afs_vnodeToInumber(filevp);
AFS_RELE(filevp);
***************
*** 3350,3356 ****
fileIsBad = 0;
if ((tdc->f.states & DWriting) || tdc->f.fid.Fid.Volume == 0)
fileIsBad = 1;
! tfile = osi_UFSOpen(tdc->f.inode);
code = afs_osi_Stat(tfile, &tstat);
if (code)
osi_Panic("initcachefile stat");
--- 3380,3390 ----
fileIsBad = 0;
if ((tdc->f.states & DWriting) || tdc->f.fid.Fid.Volume == 0)
fileIsBad = 1;
! #if defined(LINUX_USE_FH)
! tfile = osi_UFSOpen_fh(&tdc->f.fh, tdc->f.fh_type);
! #else
! tfile = osi_UFSOpen(ainode);
! #endif
code = afs_osi_Stat(tfile, &tstat);
if (code)
osi_Panic("initcachefile stat");
***************
*** 3436,3446 ****
*/
#define DDSIZE 200
! /*
! * afs_dcacheInit
*
- * Description:
- * Initialize dcache related variables.
*/
void
afs_dcacheInit(int afiles, int ablocks, int aDentries, int achunk, int aflags)
--- 3470,3484 ----
*/
#define DDSIZE 200
! /*!
! * Initialize dcache related variables.
! *
! * \param afiles
! * \param ablocks
! * \param aDentries
! * \param achunk
! * \param aflags
*
*/
void
afs_dcacheInit(int afiles, int ablocks, int aDentries, int achunk, int aflags)
***************
*** 3564,3571 ****
QInit(&afs_DLRU);
}
! /*
! * shutdown_dcache
*
*/
void
--- 3602,3609 ----
QInit(&afs_DLRU);
}
! /*!
! * Shuts down the cache.
*
*/
void
Index: openafs/src/afs/afs_init.c
diff -c openafs/src/afs/afs_init.c:1.37.4.8 openafs/src/afs/afs_init.c:1.37.4.9
*** openafs/src/afs/afs_init.c:1.37.4.8 Mon Sep 22 15:29:54 2008
--- openafs/src/afs/afs_init.c Sat Nov 8 11:34:42 2008
***************
*** 17,23 ****
#include "afs/param.h"
RCSID
! ("$Header: /cvs/openafs/src/afs/afs_init.c,v 1.37.4.8 2008/09/22 19:29:54 shadow Exp $");
#include "afs/stds.h"
#include "afs/sysincludes.h" /* Standard vendor system headers */
--- 17,23 ----
#include "afs/param.h"
RCSID
! ("$Header: /cvs/openafs/src/afs/afs_init.c,v 1.37.4.9 2008/11/08 16:34:42 shadow Exp $");
#include "afs/stds.h"
#include "afs/sysincludes.h" /* Standard vendor system headers */
***************
*** 252,260 ****
--- 252,270 ----
{
ino_t inode;
int code;
+ #if defined(LINUX_USE_FH)
+ struct fid fh;
+ int fh_type;
+ int max_len = sizeof(struct fid);
+ struct dentry *dp;
+ #endif
#ifdef AFS_CACHE_VNODE_PATH
return afs_cellname_init(AFS_CACHE_CELLS_INODE, code);
+ #elif defined(LINUX_USE_FH)
+ code = gop_lookupname(afile, AFS_UIOSYS, 0, &dp);
+ fh_type = osi_get_fh(dp, &fh, &max_len);
+ return afs_cellname_init(&fh, fh_type, code);
#else
code = LookupInodeByPath(afile, &inode, NULL);
return afs_cellname_init(inode, code);
***************
*** 282,287 ****
--- 292,301 ----
{
int code;
struct osi_file *tfile;
+ #if defined(LINUX_USE_FH)
+ int max_len = sizeof(struct fid);
+ struct dentry *dp;
+ #endif
AFS_STATCNT(afs_InitVolumeInfo);
#if defined(AFS_XBSD_ENV)
***************
*** 301,312 ****
--- 315,333 ----
code = LookupInodeByPath(afile, &volumeInode, &volumeVnode);
#elif defined(AFS_CACHE_VNODE_PATH)
volumeInode = AFS_CACHE_VOLUME_INODE;
+ #elif defined(LINUX_USE_FH)
+ code = gop_lookupname(afile, AFS_UIOSYS, 0, &dp);
+ volumeinfo_fh_type = osi_get_fh(dp, &volumeinfo_fh, &max_len);
#else
code = LookupInodeByPath(afile, &volumeInode, NULL);
#endif
if (code)
return code;
+ #if defined(LINUX_USE_FH)
+ tfile = osi_UFSOpen_fh(&volumeinfo_fh, volumeinfo_fh_type);
+ #else
tfile = afs_CFileOpen(volumeInode);
+ #endif
afs_CFileTruncate(tfile, 0);
afs_CFileClose(tfile);
return 0;
***************
*** 443,449 ****
--- 464,474 ----
#endif /* AFS_LINUX20_ENV */
AFS_RELE(filevp);
#endif /* AFS_LINUX22_ENV */
+ #if defined(LINUX_USE_FH)
+ tfile = osi_UFSOpen_fh(&cacheitems_fh, cacheitems_fh_type);
+ #else
tfile = osi_UFSOpen(cacheInode);
+ #endif
afs_osi_Stat(tfile, &tstat);
cacheInfoModTime = tstat.mtime;
code = afs_osi_Read(tfile, -1, &theader, sizeof(theader));
***************
*** 668,675 ****
cacheDev.held_vnode = NULL;
}
#endif
cacheInode = volumeInode = (ino_t) 0;
!
cacheInfoModTime = 0;
afs_fsfragsize = 1023;
--- 693,701 ----
cacheDev.held_vnode = NULL;
}
#endif
+ #if !defined(LINUX_USE_FH)
cacheInode = volumeInode = (ino_t) 0;
! #endif
cacheInfoModTime = 0;
afs_fsfragsize = 1023;
Index: openafs/src/afs/afs_osi_gcpags.c
diff -c openafs/src/afs/afs_osi_gcpags.c:1.1.2.6 openafs/src/afs/afs_osi_gcpags.c:1.1.2.8
*** openafs/src/afs/afs_osi_gcpags.c:1.1.2.6 Tue Apr 3 14:54:15 2007
--- openafs/src/afs/afs_osi_gcpags.c Sun Oct 12 14:44:36 2008
***************
*** 11,17 ****
#include "afs/param.h"
RCSID
! ("$Header: /cvs/openafs/src/afs/afs_osi_gcpags.c,v 1.1.2.6 2007/04/03 18:54:15 shadow Exp $");
#include "afs/sysincludes.h" /* Standard vendor system headers */
#include "afsincludes.h" /* Afs-based standard headers */
--- 11,17 ----
#include "afs/param.h"
RCSID
! ("$Header: /cvs/openafs/src/afs/afs_osi_gcpags.c,v 1.1.2.8 2008/10/12 18:44:36 shadow Exp $");
#include "afs/sysincludes.h" /* Standard vendor system headers */
#include "afsincludes.h" /* Afs-based standard headers */
***************
*** 234,250 ****
{
#if !defined(LINUX_KEYRING_SUPPORT)
struct task_struct *p;
! #ifdef EXPORTED_TASKLIST_LOCK
if (&tasklist_lock)
! read_lock(&tasklist_lock);
! #endif
! #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
! #ifdef EXPORTED_TASKLIST_LOCK
else
! #endif
rcu_read_lock();
! #endif
!
#ifdef DEFINED_FOR_EACH_PROCESS
for_each_process(p) if (p->pid) {
#ifdef STRUCT_TASK_STRUCT_HAS_EXIT_STATE
--- 234,251 ----
{
#if !defined(LINUX_KEYRING_SUPPORT)
struct task_struct *p;
!
! #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) && defined(EXPORTED_TASKLIST_LOCK)
if (&tasklist_lock)
! read_lock(&tasklist_lock);
! #endif /* EXPORTED_TASKLIST_LOCK */
! #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
! #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) && defined(EXPORTED_TASKLIST_LOCK)
else
! #endif /* EXPORTED_TASKLIST_LOCK && LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) */
rcu_read_lock();
! #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16) */
!
#ifdef DEFINED_FOR_EACH_PROCESS
for_each_process(p) if (p->pid) {
#ifdef STRUCT_TASK_STRUCT_HAS_EXIT_STATE
***************
*** 268,283 ****
afs_GCPAGs_perproc_func(p);
}
#endif
! #ifdef EXPORTED_TASKLIST_LOCK
if (&tasklist_lock)
! read_unlock(&tasklist_lock);
! #endif
! #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
! #ifdef EXPORTED_TASKLIST_LOCK
else
! #endif
rcu_read_unlock();
! #endif
#endif
}
#endif
--- 269,284 ----
afs_GCPAGs_perproc_func(p);
}
#endif
! #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) && defined(EXPORTED_TASKLIST_LOCK)
if (&tasklist_lock)
! read_unlock(&tasklist_lock);
! #endif /* EXPORTED_TASKLIST_LOCK */
! #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
! #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) && defined(EXPORTED_TASKLIST_LOCK)
else
! #endif /* EXPORTED_TASKLIST_LOCK && LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) */
rcu_read_unlock();
! #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16) */
#endif
}
#endif
Index: openafs/src/afs/afs_osi_pag.c
diff -c openafs/src/afs/afs_osi_pag.c:1.29.4.12 openafs/src/afs/afs_osi_pag.c:1.29.4.14
*** openafs/src/afs/afs_osi_pag.c:1.29.4.12 Fri Jan 4 13:38:34 2008
--- openafs/src/afs/afs_osi_pag.c Mon Oct 20 15:29:36 2008
***************
*** 23,29 ****
#include "afs/param.h"
RCSID
! ("$Header: /cvs/openafs/src/afs/afs_osi_pag.c,v 1.29.4.12 2008/01/04 18:38:34 shadow Exp $");
#include "afs/sysincludes.h" /* Standard vendor system headers */
#include "afsincludes.h" /* Afs-based standard headers */
--- 23,29 ----
#include "afs/param.h"
RCSID
! ("$Header: /cvs/openafs/src/afs/afs_osi_pag.c,v 1.29.4.14 2008/10/20 19:29:36 shadow Exp $");
#include "afs/sysincludes.h" /* Standard vendor system headers */
#include "afsincludes.h" /* Afs-based standard headers */
***************
*** 430,441 ****
--- 430,448 ----
afs_InitReq(register struct vrequest *av, struct AFS_UCRED *acred)
{
int code;
+ int i = 0;
AFS_STATCNT(afs_InitReq);
memset(av, 0, sizeof(*av));
if (afs_shuttingdown)
return EIO;
+ av->idleError = 0;
+ av->tokenError = 0;
+ while (i < MAXHOSTS) {
+ av->skipserver[i] = 0;
+ i++;
+ }
#ifdef AFS_LINUX26_ENV
#if !defined(AFS_NONFSTRANS)
if (osi_linux_nfs_initreq(av, acred, &code))
Index: openafs/src/afs/afs_osidnlc.c
diff -c openafs/src/afs/afs_osidnlc.c:1.13.2.2 openafs/src/afs/afs_osidnlc.c:1.13.2.3
*** openafs/src/afs/afs_osidnlc.c:1.13.2.2 Tue Aug 26 10:01:31 2008
--- openafs/src/afs/afs_osidnlc.c Fri Oct 10 19:24:28 2008
***************
*** 11,17 ****
#include "afs/param.h"
RCSID
! ("$Header: /cvs/openafs/src/afs/afs_osidnlc.c,v 1.13.2.2 2008/08/26 14:01:31 shadow Exp $");
#include "afs/sysincludes.h" /*Standard vendor system headers */
#include "afsincludes.h" /*AFS-based standard headers */
--- 11,17 ----
#include "afs/param.h"
RCSID
! ("$Header: /cvs/openafs/src/afs/afs_osidnlc.c,v 1.13.2.3 2008/10/10 23:24:28 shadow Exp $");
#include "afs/sysincludes.h" /*Standard vendor system headers */
#include "afsincludes.h" /*AFS-based standard headers */
***************
*** 25,31 ****
* look into interactions of dnlc and readdir.
* cache larger names, perhaps by using a better,longer key (SHA) and discarding
* the actual name itself.
! * precompute a key and stuff for @sys, and combine the HandleAtName function with
* this, since we're looking at the name anyway.
*/
--- 25,31 ----
* look into interactions of dnlc and readdir.
* cache larger names, perhaps by using a better,longer key (SHA) and discarding
* the actual name itself.
! * precompute a key and stuff for \sys, and combine the HandleAtName function with
* this, since we're looking at the name anyway.
*/
***************
*** 412,421 ****
return 0;
}
! /* remove anything pertaining to this directory. I can invalidate
* things without the lock, since I am just looking through the array,
* but to move things off the lists or into the freelist, I need the
! * write lock */
int
osi_dnlc_purgedp(struct vcache *adp)
{
--- 412,426 ----
return 0;
}
! /*!
! * Remove anything pertaining to this directory. I can invalidate
* things without the lock, since I am just looking through the array,
* but to move things off the lists or into the freelist, I need the
! * write lock
! *
! * \param adp vcache entry for the directory to be purged.
! * \return 0
! */
int
osi_dnlc_purgedp(struct vcache *adp)
{
***************
*** 454,460 ****
return 0;
}
! /* remove anything pertaining to this file */
int
osi_dnlc_purgevp(struct vcache *avc)
{
--- 459,470 ----
return 0;
}
! /*!
! * Remove anything pertaining to this file
! *
! * \param File vcache entry.
! * \return 0
! */
int
osi_dnlc_purgevp(struct vcache *avc)
{
Index: openafs/src/afs/afs_pioctl.c
diff -c openafs/src/afs/afs_pioctl.c:1.110.2.20 openafs/src/afs/afs_pioctl.c:1.110.2.21
*** openafs/src/afs/afs_pioctl.c:1.110.2.20 Mon Sep 22 15:35:26 2008
--- openafs/src/afs/afs_pioctl.c Fri Oct 10 19:27:02 2008
***************
*** 11,17 ****
#include "afs/param.h"
RCSID
! ("$Header: /cvs/openafs/src/afs/afs_pioctl.c,v 1.110.2.20 2008/09/22 19:35:26 shadow Exp $");
#include "afs/sysincludes.h" /* Standard vendor system headers */
#ifdef AFS_OBSD_ENV
--- 11,17 ----
#include "afs/param.h"
RCSID
! ("$Header: /cvs/openafs/src/afs/afs_pioctl.c,v 1.110.2.21 2008/10/10 23:27:02 shadow Exp $");
#include "afs/sysincludes.h" /* Standard vendor system headers */
#ifdef AFS_OBSD_ENV
***************
*** 41,46 ****
--- 41,61 ----
afs_int32 afs_in_sync = 0;
#endif
+ /*!
+ * \defgroup pioctl Path IOCTL functions
+ *
+ * DECL_PIOCTL is a macro defined to contain the following parameters for functions:
+ *
+ * \param[in] avc the AFS vcache structure in use by pioctl
+ * \param[in] afun not in use
+ * \param[in] areq the AFS vrequest structure
+ * \param[in] ain as defined by the function
+ * \param[in] aout as defined by the function
+ * \param[in] ainSize size of ain
+ * \param[in] aoutSize size of aout
+ * \param[in] acred UNIX credentials structure underlying the operation
+ */
+
#define DECL_PIOCTL(x) static int x(struct vcache *avc, int afun, struct vrequest *areq, \
char *ain, char *aout, afs_int32 ainSize, afs_int32 *aoutSize, \
struct AFS_UCRED **acred)
***************
*** 1127,1132 ****
--- 1142,1159 ----
return afs_CheckCode(code, &treq, 41);
}
+ /*!
+ * VIOCETFID (22) - Get file ID quickly
+ *
+ * \ingroup pioctl
+ *
+ * \param[in] ain not in use
+ * \param[out] aout not in use
+ *
+ * \retval EINVAL Error if some of the initial arguments aren't set
+ *
+ * \post get the file id of some file
+ */
DECL_PIOCTL(PGetFID)
{
AFS_STATCNT(PGetFID);
***************
*** 1137,1142 ****
--- 1164,1186 ----
return 0;
}
+ /*!
+ * VIOCSETAL (1) - Set access control list
+ *
+ * \ingroup pioctl
+ *
+ * \param[in] ain the ACL being set
+ * \param[out] aout the ACL being set returned
+ *
+ * \retval EINVAL Error if some of the standard args aren't set
+ *
+ * \post Changed ACL, via direct writing to the wire
+ */
+ int dummy_PSetAcl(char *ain, char *aout)
+ {
+ return 0;
+ }
+
DECL_PIOCTL(PSetAcl)
{
register afs_int32 code;
***************
*** 1182,1187 ****
--- 1226,1244 ----
int afs_defaultAsynchrony = 0;
+ /*!
+ * VIOC_STOREBEHIND (47) Adjust store asynchrony
+ *
+ * \ingroup pioctl
+ *
+ * \param[in] ain sbstruct (store behind structure) input
+ * \param[out] aout resulting sbstruct
+ *
+ * \retval EPERM Error if the user doesn't have super-user credentials
+ * \retval EACCES Error if there isn't enough access to not check the mode bits
+ *
+ * \post sets asynchrony based on a file, from a struct sbstruct "I THINK"
+ */
DECL_PIOCTL(PStoreBehind)
{
afs_int32 code = 0;
***************
*** 1213,1218 ****
--- 1270,1287 ----
return code;
}
+ /*!
+ * VIOC_GCPAGS (48) - Disable automatic PAG gc'ing
+ *
+ * \ingroup pioctl
+ *
+ * \param[in] ain not in use
+ * \param[out] aout not in use
+ *
+ * \retval EACCES Error if the user doesn't have super-user credentials
+ *
+ * \post set the gcpags to GCPAGS_USERDISABLED
+ */
DECL_PIOCTL(PGCPAGs)
{
if (!afs_osi_suser(*acred)) {
***************
*** 1222,1227 ****
--- 1291,1312 ----
return 0;
}
+ /*!
+ * VIOCGETAL (2) - Get access control list
+ *
+ * \ingroup pioctl
+ *
+ * \param[in] ain not in use
+ * \param[out] aout the ACL
+ *
+ * \retval EINVAL Error if some of the standard args aren't set
+ * \retval ERANGE Error if the vnode of the file id is too large
+ * \retval -1 Error if getting the ACL failed
+ *
+ * \post Obtain the ACL, based on file ID
+ *
+ * \notes there is a hack to tell which type of ACL is being returned, checks the top 2-bytes to judge what type of ACL it is, only for dfs xlat or ACLs
+ */
DECL_PIOCTL(PGetAcl)
{
struct AFSOpaque acl;
***************
*** 1272,1289 ****
--- 1357,1403 ----
return code;
}
+ /*!
+ * PNoop returns success. Used for functions which are not implemented or are no longer in use.
+ *
+ * \ingroup pioctl
+ *
+ * \notes Functions involved in this: 17 (VIOCENGROUP) -- used to be enable group; 18 (VIOCDISGROUP) -- used to be disable group; 2 (?) -- get/set cache-bypass size threshold
+ */
DECL_PIOCTL(PNoop)
{
AFS_STATCNT(PNoop);
return 0;
}
+ /*!
+ * PBogus returns fail. Used for functions which are not implemented or are no longer in use.
+ *
+ * \ingroup pioctl
+ *
+ * \retval EINVAL Error if some of the standard args aren't set
+ *
+ * \notes Functions involved in this: 0 (?); 4 (?); 6 (?); 7 (VIOCSTAT); 8 (?); 13 (VIOCGETTIME) -- used to be quick check time; 15 (VIOCPREFETCH) -- prefetch is now special-cased; see pioctl code!; 16 (VIOCNOP) -- used to be testing code; 19 (VIOCLISTGROUPS) -- used to be list group; 23 (VIOCWAITFOREVER) -- used to be waitforever; 57 (VIOC_FPRIOSTATUS) -- arla: set file prio; 58 (VIOC_FHGET) -- arla: fallback getfh; 59 (VIOC_FHOPEN) -- arla: fallback fhopen; 60 (VIOC_XFSDEBUG) -- arla: controls xfsdebug; 61 (VIOC_ARLADEBUG) -- arla: controls arla debug; 62 (VIOC_AVIATOR) -- arla: debug interface; 63 (VIOC_XFSDEBUG_PRINT) -- arla: print xfs status; 64 (VIOC_CALCULATE_CACHE) -- arla: force cache check; 65 (VIOC_BREAKCELLBACK) -- arla: break callback; 68 (?) -- arla: fetch stats;
+ */
DECL_PIOCTL(PBogus)
{
AFS_STATCNT(PBogus);
return EINVAL;
}
+ /*!
+ * VIOC_FILE_CELL_NAME (30) - Get cell in which file lives
+ *
+ * \ingroup pioctl
+ *
+ * \param[in] ain not in use (avc used to pass in file id)
+ * \param[out] aout cell name
+ *
+ * \retval EINVAL Error if some of the standard args aren't set
+ * \retval ESRCH Error if the file isn't part of a cell
+ *
+ * \post Get a cell based on a passed in file id
+ */
DECL_PIOCTL(PGetFileCell)
{
register struct cell *tcell;
***************
*** 1300,1305 ****
--- 1414,1432 ----
return 0;
}
+ /*!
+ * VIOC_GET_WS_CELL (31) - Get cell in which workstation lives
+ *
+ * \ingroup pioctl
+ *
+ * \param[in] ain not in use
+ * \param[out] aout cell name
+ *
+ * \retval EIO Error if the afs daemon hasn't started yet
+ * \retval ESRCH Error if the machine isn't part of a cell, for whatever reason
+ *
+ * \post Get the primary cell that the machine is a part of.
+ */
DECL_PIOCTL(PGetWSCell)
{
struct cell *tcell = NULL;
***************
*** 1317,1322 ****
--- 1444,1461 ----
return 0;
}
+ /*!
+ * VIOC_GET_PRIMARY_CELL (33) - Get primary cell for caller
+ *
+ * \ingroup pioctl
+ *
+ * \param[in] ain not in use (user id found via areq)
+ * \param[out] aout cell name
+ *
+ * \retval ESRCH Error if the user id doesn't have a primary cell specified
+ *
+ * \post Get the primary cell for a certain user, based on the user's uid
+ */
DECL_PIOCTL(PGetUserCell)
{
register afs_int32 i;
***************
*** 1355,1360 ****
--- 1494,1514 ----
return 0;
}
+ /*!
+ * VIOCSETTOK (3) - Set authentication tokens
+ *
+ * \ingroup pioctl
+ *
+ * \param[in] ain the krb tickets from which to set the afs tokens
+ * \param[out] aout not in use
+ *
+ * \retval EINVAL Error if the ticket is either too long or too short
+ * \retval EIO Error if the AFS initState is below 101
+ * \retval ESRCH Error if the cell for which the Token is being set can't be found
+ *
+ * \post Set the Tokens for a specific cell name, unless there is none set, then default to primary
+ *
+ */
DECL_PIOCTL(PSetTokens)
{
afs_int32 i;
***************
*** 1469,1474 ****
--- 1623,1640 ----
}
}
+ /*!
+ * VIOCGETVOLSTAT (4) - Get volume status
+ *
+ * \ingroup pioctl
+ *
+ * \param[in] ain not in use
+ * \param[out] aout status of the volume
+ *
+ * \retval EINVAL Error if some of the standard args aren't set
+ *
+ * \post The status of a volume (based on the FID of the volume), or an offline message /motd
+ */
DECL_PIOCTL(PGetVolumeStatus)
{
char volName[32];
***************
*** 1524,1529 ****
--- 1690,1710 ----
return code;
}
+ /*!
+ * VIOCSETVOLSTAT (5) - Set volume status
+ *
+ * \ingroup pioctl
+ *
+ * \param[in] ain values to set the status at, offline message, message of the day, volume name, minimum quota, maximum quota
+ * \param[out] aout status of a volume, offlines messages, minimum quota, maximumm quota
+ *
+ * \retval EINVAL Error if some of the standard args aren't set
+ * \retval EROFS Error if the volume is read only, or a backup volume
+ * \retval ENODEV Error if the volume can't be accessed
+ * \retval E2BIG Error if the volume name, offline message, and motd are too big
+ *
+ * \post Set the status of a volume, including any offline messages, a minimum quota, and a maximum quota
+ */
DECL_PIOCTL(PSetVolumeStatus)
{
char volName[32];
***************
*** 1621,1626 ****
--- 1802,1819 ----
return code;
}
+ /*!
+ * VIOCFLUSH (6) - Invalidate cache entry
+ *
+ * \ingroup pioctl
+ *
+ * \param[in] ain not in use
+ * \param[out] aout not in use
+ *
+ * \retval EINVAL Error if some of the standard args aren't set
+ *
+ * \post Flush any information the cache manager has on an entry
+ */
DECL_PIOCTL(PFlush)
{
AFS_STATCNT(PFlush);
***************
*** 1648,1653 ****
--- 1841,1860 ----
return 0;
}
+ /*!
+ * VIOC_AFS_STAT_MT_PT (29) - Stat mount point
+ *
+ * \ingroup pioctl
+ *
+ * \param[in] ain the last component in a path, related to mountpoint that we're looking for information about
+ * \param[out] aout volume, cell, link data
+ *
+ * \retval EINVAL Error if some of the standard args aren't set
+ * \retval ENOTDIR Error if the 'mount point' argument isn't a directory
+ * \retval EIO Error if the link data can't be accessed
+ *
+ * \post Get the volume, and cell, as well as the link data for a mount point
+ */
DECL_PIOCTL(PNewStatMount)
{
register afs_int32 code;
***************
*** 1719,1724 ****
--- 1926,1948 ----
return code;
}
+ /*!
+ * VIOCGETTOK (8) - Get authentication tokens
+ *
+ * \ingroup pioctl
+ *
+ * \param[in] ain userid
+ * \param[out] aout token
+ *
+ * \retval EIO Error if the afs daemon hasn't started yet
+ * \retval EDOM Error if the input parameter is out of the bounds of the available tokens
+ * \retval ENOTCONN Error if there aren't tokens for this cell
+ *
+ * \post If the input paramater exists, get the token that corresponds to the parameter value, if there is no token at this value, get the token for the first cell
+ *
+ * \notes "it's a weird interface (from comments in the code)"
+ */
+
DECL_PIOCTL(PGetTokens)
{
register struct cell *tcell;
***************
*** 1806,1811 ****
--- 2030,2050 ----
return 0;
}
+ /*!
+ * VIOCUNLOG (9) - Invalidate tokens
+ *
+ * \ingroup pioctl
+ *
+ * \param[in] ain not in use
+ * \param[out] aout not in use
+ *
+ * \retval EIO Error if the afs daemon hasn't been started yet
+ *
+ * \post remove tokens from a user, specified by the user id
+ *
+ * \notes sets the token's time to 0, which then causes it to be removed
+ * \notes Unlog is the same as un-pag in OpenAFS
+ */
DECL_PIOCTL(PUnlog)
{
register afs_int32 i;
***************
*** 1849,1854 ****
--- 2088,2105 ----
return 0;
}
+ /*!
+ * VIOC_AFS_MARINER_HOST (32) - Get/set mariner (cache manager monitor) host
+ *
+ * \ingroup pioctl
+ *
+ * \param[in] ain host address to be set
+ * \param[out] aout old host address
+ *
+ * \post depending on whether or not a variable is set, either get the host for the cache manager monitor, or set the old address and give it a new address
+ *
+ * \notes Errors turn off mariner
+ */
DECL_PIOCTL(PMariner)
{
afs_int32 newHostAddr;
***************
*** 1874,1879 ****
--- 2125,2144 ----
return 0;
}
+ /*!
+ * VIOCCKSERV (10) - Check that servers are up
+ *
+ * \ingroup pioctl
+ *
+ * \param[in] ain name of the cell
+ * \param[out] aout current down server list
+ *
+ * \retval EIO Error if the afs daemon hasn't started yet
+ * \retval EACCES Error if the user doesn't have super-user credentials
+ * \retval ENOENT Error if we are unable to obtain the cell
+ *
+ * \post Either a fast check (where it doesn't contact servers) or a local check (checks local cell only)
+ */
DECL_PIOCTL(PCheckServers)
{
register char *cp = 0;
***************
*** 1952,1957 ****
--- 2217,2234 ----
return 0;
}
+ /*!
+ * VIOCCKBACK (11) - Check backup volume mappings
+ *
+ * \ingroup pioctl
+ *
+ * \param[in] ain not in use
+ * \param[out] aout not in use
+ *
+ * \retval EIO Error if the afs daemon hasn't started yet
+ *
+ * \post Check the root volume, and then check the names if the volume check variable is set to force, has expired, is busy, or if the mount points variable is set
+ */
DECL_PIOCTL(PCheckVolNames)
{
AFS_STATCNT(PCheckVolNames);
***************
*** 1964,1969 ****
--- 2241,2260 ----
return 0;
}
+ /*!
+ * VIOCCKCONN (12) - Check connections for a user
+ *
+ * \ingroup pioctl
+ *
+ * \param[in] ain not in use
+ * \param[out] aout not in use
+ *
+ * \retval EACCESS Error if no user is specififed, the user has no tokens set, or if the user's tokens are bad
+ *
+ * \post check to see if a user has the correct authentication. If so, allow access.
+ *
+ * \notes Check the connections to all the servers specified
+ */
DECL_PIOCTL(PCheckAuth)
{
int i;
***************
*** 2036,2041 ****
--- 2327,2347 ----
return 0;
}
+ /*!
+ * VIOCWHEREIS (14) - Find out where a volume is located
+ *
+ * \ingroup pioctl
+ *
+ * \param[in] ain not in use
+ * \param[out] aout volume location
+ *
+ * \retval EINVAL Error if some of the default arguments don't exist
+ * \retval ENODEV Error if there is no such volume
+ *
+ * \post fine a volume, based on a volume file id
+ *
+ * \notes check each of the servers specified
+ */
DECL_PIOCTL(PFindVolume)
{
register struct volume *tvp;
***************
*** 2069,2074 ****
--- 2375,2393 ----
return ENODEV;
}
+ /*!
+ * VIOCACCESS (20) - Access using PRS_FS bits
+ *
+ * \ingroup pioctl
+ *
+ * \param[in] ain PRS_FS bits
+ * \param[out] aout not in use
+ *
+ * \retval EINVAL Error if some of the initial arguments aren't set
+ * \retval EACCES Error if access is denied
+ *
+ * \post check to make sure access is allowed
+ */
DECL_PIOCTL(PViceAccess)
{
register afs_int32 code;
***************
*** 2100,2105 ****
--- 2419,2439 ----
return 0;
}
+ /*!
+ * VIOCSETCACHESIZE (24) - Set venus cache size in 1000 units
+ *
+ * \ingroup pioctl
+ *
+ * \param[in] ain the size the venus cache should be set to
+ * \param[out] aout not in use
+ *
+ * \retval EACCES Error if the user doesn't have super-user credentials
+ * \retval EROFS Error if the cache is set to be in memory
+ *
+ * \post Set the cache size based on user input. If no size is given, set it to the default OpenAFS cache size.
+ *
+ * \notes recompute the general cache parameters for every single block allocated
+ */
DECL_PIOCTL(PSetCacheSize)
{
afs_int32 newValue;
***************
*** 2131,2136 ****
--- 2465,2480 ----
}
#define MAXGCSTATS 16
+ /*!
+ * VIOCGETCACHEPARMS (40) - Get cache stats
+ *
+ * \ingroup pioctl
+ *
+ * \param[in] ain afs index flags
+ * \param[out] aout cache blocks, blocks used, blocks files (in an array)
+ *
+ * \post Get the cache blocks, and how many of the cache blocks there are
+ */
DECL_PIOCTL(PGetCacheSize)
{
afs_int32 results[MAXGCSTATS];
***************
*** 2184,2189 ****
--- 2528,2546 ----
return 0;
}
+ /*!
+ * VIOCFLUSHCB (25) - Flush callback only
+ *
+ * \ingroup pioctl
+ *
+ * \param[in] ain not in use
+ * \param[out] aout not in use
+ *
+ * \retval EINVAL Error if some of the standard args aren't set
+ * \retval 0 0 returned if the volume is set to read-only
+ *
+ * \post Flushes callbacks, by setting the length of callbacks to one, setting the next callback to be sent to the CB_DROPPED value, and then dequeues everything else.
+ */
DECL_PIOCTL(PRemoveCallBack)
{
register struct conn *tc;
***************
*** 2231,2236 ****
--- 2588,2607 ----
return 0;
}
+ /*!
+ * VIOCNEWCELL (26) - Configure new cell
+ *
+ * \ingroup pioctl
+ *
+ * \param[in] ain the name of the cell, the hosts that will be a part of the cell, whether or not it's linked with another cell, the other cell it's linked with, the file server port, and the volume server port
+ * \param[out] aout not in use
+ *
+ * \retval EIO Error if the afs daemon hasn't started yet
+ * \retval EACCES Error if the user doesn't have super-user cedentials
+ * \retval EINVAL Error if some 'magic' var doesn't have a certain bit set
+ *
+ * \post creates a new cell
+ */
DECL_PIOCTL(PNewCell)
{
/* create a new cell */
***************
*** 2307,2312 ****
--- 2678,2696 ----
return code;
}
+ /*!
+ * VIOCGETCELL (27) - Get cell info
+ *
+ * \ingroup pioctl
+ *
+ * \param[in] ain The cell index of a specific cell
+ * \param[out] aout list of servers in the cell
+ *
+ * \retval EIO Error if the afs daemon hasn't started yet
+ * \retval EDOM Error if there is no cell asked about
+ *
+ * \post Lists the cell's server names and and addresses
+ */
DECL_PIOCTL(PListCells)
{
afs_int32 whichCell;
***************
*** 2373,2378 ****
--- 2757,2776 ----
return EDOM;
}
+ /*!
+ * VIOC_AFS_DELETE_MT_PT (28) - Delete mount point
+ *
+ * \ingroup pioctl
+ *
+ * \param[in] ain the name of the file in this dir to remove
+ * \param[out] aout not in use
+ *
+ * \retval EINVAL Error if some of the standard args aren't set
+ * \retval ENOTDIR Error if the argument to remove is not a directory
+ * \retval ENOENT Error if there is no cache to remove the mount point from or if a vcache doesn't exist
+ *
+ * \post Ensure that everything is OK before deleting the mountpoint. If not, don't delete. Delete a mount point based on a file id.
+ */
DECL_PIOCTL(PRemoveMount)
{
register afs_int32 code;
***************
*** 2494,2504 ****
--- 2892,2924 ----
return code;
}
+ /*!
+ * VIOC_VENUSLOG (34) - Enable/Disable venus logging
+ *
+ * \ingroup pioctl
+ *
+ * \retval EINVAL Error if some of the standard args aren't set
+ *
+ * \notes Obsoleted, perhaps should be PBogus
+ */
DECL_PIOCTL(PVenusLogging)
{
return EINVAL; /* OBSOLETE */
}
+ /*!
+ * VIOC_GETCELLSTATUS (35) - Get cell status info
+ *
+ * \ingroup pioctl
+ *
+ * \param[in] ain The cell you want status information on
+ * \param[out] aout cell state (as a struct)
+ *
+ * \retval EIO Error if the afs daemon hasn't started yet
+ * \retval ENOENT Error if the cell doesn't exist
+ *
+ * \post Returns the state of the cell as defined in a struct cell
+ */
DECL_PIOCTL(PGetCellStatus)
{
register struct cell *tcell;
***************
*** 2518,2523 ****
--- 2938,2956 ----
return 0;
}
+ /*!
+ * VIOC_SETCELLSTATUS (36) - Set corresponding info
+ *
+ * \ingroup pioctl
+ *
+ * \param[in] ain The cell you want to set information about, and the values you want to set
+ * \param[out] aout not in use
+ *
+ * \retval EIO Error if the afs daemon hasn't started yet
+ * \retval EACCES Error if the user doesn't have super-user credentials
+ *
+ * \post Set the state of the cell in a defined struct cell, based on whether or not SetUID is allowed
+ */
DECL_PIOCTL(PSetCellStatus)
{
register struct cell *tcell;
***************
*** 2540,2545 ****
--- 2973,2993 ----
return 0;
}
+ /*!
+ * VIOC_FLUSHVOLUME (37) - Flush whole volume's data
+ *
+ * \ingroup pioctl
+ *
+ * \param[in] ain not in use (args in avc)
+ * \param[out] aout not in use
+ *
+ * \retval EINVAL Error if some of the standard args aren't set
+ * \retval EIO Error if the afs daemon hasn't started yet
+ *
+ * \post Wipe everything on the volume. This is done dependent on which platform this is for.
+ *
+ * \notes Does not flush a file that a user has open and is using, because it will be re-created on next write. Also purges the dnlc, because things are screwed up.
+ */
DECL_PIOCTL(PFlushVolumeData)
{
register afs_int32 i;
***************
*** 2678,2684 ****
}
!
DECL_PIOCTL(PGetVnodeXStatus)
{
register afs_int32 code;
--- 3126,3144 ----
}
! /*!
! * VIOCGETVCXSTATUS (41) - gets vnode x status
! *
! * \ingroup pioctl
! *
! * \param[in] ain not in use (avc used)
! * \param[out] aout vcxstat: the file id, the data version, any lock, the parent vnode, the parent unique id, the trunc position, the callback, cbExpires, what access is being made, what files are open, any users executing/writing, the flock ount, the states, the move stat
! *
! * \retval EINVAL Error if some of the initial default arguments aren't set
! * \retval EACCES Error if access to check the mode bits is denied
! *
! * \post gets stats for the vnode, a struct listed in vcxstat
! */
DECL_PIOCTL(PGetVnodeXStatus)
{
register afs_int32 code;
***************
*** 2759,2768 ****
return 0;
}
! /* We require root for local sysname changes, but not for remote */
! /* (since we don't really believe remote uids anyway) */
! /* outname[] shouldn't really be needed- this is left as an excercise */
! /* for the reader. */
DECL_PIOCTL(PSetSysName)
{
char *cp, *cp2 = NULL, inname[MAXSYSNAME], outname[MAXSYSNAME];
--- 3219,3241 ----
return 0;
}
!
! /*!
! * VIOC_AFS_SYSNAME (38) - Change @sys value
! *
! * \ingroup pioctl
! *
! * \param[in] ain new value for @sys
! * \param[out] aout count, entry, list (debug values?)
! *
! * \retval EINVAL Error if afsd isn't running, the new sysname is too large, the new sysname causes issues (starts with a .0 or ..0), there is no PAG set in the credentials, the user of a PAG can't be found, (!(exporter = au->exporter)) "NOT SURE ON THIS"
! * \retval ENODEV Error if there isn't already a system named that ("I THINK")
! * \retval EACCES Error if the user doesn't have super-user credentials
! *
! * \post Set the value of @sys if these things work: if the input isn't too long or if input doesn't start with .0 or ..0
! *
! * \notes We require root for local sysname changes, but not for remote (since we don't really believe remote uids anyway) outname[] shouldn't really be needed- this is left as an exercise for the reader.
! */
DECL_PIOCTL(PSetSysName)
{
char *cp, *cp2 = NULL, inname[MAXSYSNAME], outname[MAXSYSNAME];
***************
*** 3039,3046 ****
return 0;
}
! /* Note that this may only be performed by the local root user.
! */
DECL_PIOCTL(PSetSPrefs)
{
struct setspref *ssp;
--- 3512,3529 ----
return 0;
}
! /*!
! * VIOC_SETPREFS (46) - Set server ranks
! *
! * \param[in] ain the sprefs value you want the sprefs to be set to
! * \param[out] aout not in use
! *
! * \retval EIO Error if the afs daemon hasn't started yet
! * \retval EACCES Error if the user doesn't have super-user credentials
! * \retval EINVAL Error if the struct setsprefs is too large or if it multiplied by the number of servers is too large
! *
! * \post set the sprefs using the afs_setsprefs() function
! */
DECL_PIOCTL(PSetSPrefs)
{
struct setspref *ssp;
***************
*** 3064,3069 ****
--- 3547,3565 ----
return 0;
}
+ /*
+ * VIOC_SETPREFS33 (42) - Set server ranks (deprecated)
+ *
+ * \param[in] ain the server preferences to be set
+ * \param[out] aout not in use
+ *
+ * \retval EIO Error if the afs daemon hasn't started yet
+ * \retval EACCES Error if the user doesn't have super-user credentials
+ *
+ * \post set the server preferences, calling a function
+ *
+ * \notes this may only be performed by the local root user.
+ */
DECL_PIOCTL(PSetSPrefs33)
{
struct spref *sp;
***************
*** 3080,3091 ****
return 0;
}
! /* some notes on the following code...
! * in the hash table of server structs, all servers with the same IP address
! * will be on the same overflow chain.
! * This could be sped slightly in some circumstances by having it cache the
! * immediately previous slot in the hash table and some supporting information
! * Only reports file servers now.
*/
DECL_PIOCTL(PGetSPrefs)
{
--- 3576,3595 ----
return 0;
}
! /*
! * VIOC_GETSPREFS (43) - Get server ranks
! *
! * \ingroup pioctl
! *
! * \param[in] ain the server preferences to get
! * \param[out] aout the server preferences information
! *
! * \retval EIO Error if the afs daemon hasn't started yet
! * \retval ENOENT Error if the sprefrequest is too large
! *
! * \post Get the sprefs
! *
! * \notes in the hash table of server structs, all servers with the same IP address; will be on the same overflow chain; This could be sped slightly in some circumstances by having it cache the immediately previous slot in the hash table and some supporting information; Only reports file servers now.
*/
DECL_PIOCTL(PGetSPrefs)
{
***************
*** 3160,3165 ****
--- 3664,3684 ----
/* Enable/Disable the specified exporter. Must be root to disable an exporter */
int afs_NFSRootOnly = 1;
+ /*!
+ * VIOC_EXPORTAFS (39) - Export afs to nfs clients
+ *
+ * \ingroup pioctl
+ *
+ * \param[in] ain a struct Vic * EIOctl containing export values needed to change between nfs and afs
+ * \param[out] aout a struct of the exporter states (exporter->exp_states)
+ *
+ * \retval ENODEV Error if the exporter doesn't exist
+ * \retval EACCES Error if the user doesn't have super-user credentials
+ *
+ * \post Changes the state of various values to reflect the change of the export values between nfs and afs.
+ *
+ * \notes Legacy code obtained from IBM.
+ */
DECL_PIOCTL(PExportAfs)
{
afs_int32 export, newint =
***************
*** 3270,3275 ****
--- 3789,3806 ----
return 0;
}
+ /*!
+ * VIOC_GAG (44) - Silence Cache Manager
+ *
+ * \ingroup pioctl
+ *
+ * \param[in] ain the flags to either gag or de-gag the cache manager
+ * \param[out] aout not in use
+ *
+ * \retval EACCES Error if the user doesn't have super-user credentials
+ *
+ * \post set the gag flags, then show these flags
+ */
DECL_PIOCTL(PGag)
{
struct gaginfo *gagflags;
***************
*** 3283,3289 ****
return 0;
}
!
DECL_PIOCTL(PTwiddleRx)
{
struct rxparams *rxp;
--- 3814,3831 ----
return 0;
}
! /*!
! * VIOC_TWIDDLE (45) - Adjust RX knobs
! *
! * \ingroup pioctl
! *
! * \param[in] ain the previous settings of the 'knobs'
! * \param[out] aout not in use
! *
! * \retval EACCES Error if the user doesn't have super-user credentials
! *
! * \post build out the struct rxp, from a struct rx
! */
DECL_PIOCTL(PTwiddleRx)
{
struct rxparams *rxp;
***************
*** 3317,3322 ****
--- 3859,3876 ----
return 0;
}
+ /*!
+ * VIOC_GETINITPARAMS (49) - Get initial cache manager parameters
+ *
+ * \ingroup pioctl
+ *
+ * \param[in] ain not in use
+ * \param[out] aout initial cache manager params
+ *
+ * \retval E2BIG Error if the initial parameters are bigger than some PIGGYSIZE
+ *
+ * \post return the initial cache manager parameters
+ */
DECL_PIOCTL(PGetInitParams)
{
if (sizeof(struct cm_initparams) > PIGGYSIZE)
***************
*** 3342,3347 ****
--- 3896,3911 ----
}
#endif
+ /*!
+ * VIOC_GETRXKCRYPT (55) - Get rxkad encryption flag
+ *
+ * \ingroup pioctl
+ *
+ * \param[in] ain not in use
+ * \param[out] aout value of cryptall
+ *
+ * \post get the value of cryptall (presumably whether or not things should be encrypted)
+ */
DECL_PIOCTL(PGetRxkcrypt)
{
memcpy(aout, (char *)&cryptall, sizeof(afs_int32));
***************
*** 3349,3354 ****
--- 3913,3933 ----
return 0;
}
+ /*!
+ * VIOC_SETRXKCRYPT (56) - Set rxkad encryption flag
+ *
+ * \ingroup pioctl
+ *
+ * \param[in] ain the argument whether or not things should be encrypted
+ * \param[out] aout not in use
+ *
+ * \retval EPERM Error if the user doesn't have super-user credentials
+ * \retval EINVAL Error if the input is too big, or if the input is outside the bounds of what it can be set to
+ *
+ * \post set whether or not things should be encrypted
+ *
+ * \notes may need to be modified at a later date to take into account other values for cryptall (beyond true or false)
+ */
DECL_PIOCTL(PSetRxkcrypt)
{
afs_int32 tmpval;
***************
*** 3527,3534 ****
}
#endif /* AFS_NEED_CLIENTCONTEXT */
- /* get all interface addresses of this client */
DECL_PIOCTL(PGetCPrefs)
{
struct sprefrequest *spin; /* input */
--- 4106,4125 ----
}
#endif /* AFS_NEED_CLIENTCONTEXT */
+ /*!
+ * VIOC_GETCPREFS (50) - Get client interface
+ *
+ * \ingroup pioctl
+ *
+ * \param[in] ain sprefrequest input
+ * \param[out] aout spref information
+ *
+ * \retval EIO Error if the afs daemon hasn't started yet
+ * \retval EINVAL Error if some of the standard args aren't set
+ *
+ * \post get all interface addresses and other information of the client interface
+ */
DECL_PIOCTL(PGetCPrefs)
{
struct sprefrequest *spin; /* input */
***************
*** 3571,3576 ****
--- 4162,4181 ----
return 0;
}
+ /*!
+ * VIOC_SETCPREFS (51) - Set client interface
+ *
+ * \ingroup pioctl
+ *
+ * \param[in] ain the interfaces you want set
+ * \param[out] aout not in use
+ *
+ * \retval EIO Error if the afs daemon hasn't started yet
+ * \retval EINVAL Error if the input is too large for the struct
+ * \retval ENOMEM Error if there are too many servers
+ *
+ * \post set the callbak interfaces addresses to those of the hosts
+ */
DECL_PIOCTL(PSetCPrefs)
{
struct setspref *sin;
***************
*** 3600,3605 ****
--- 4205,4224 ----
return 0;
}
+ /*!
+ * VIOC_AFS_FLUSHMOUNT (52) - Flush mount symlink data
+ *
+ * \ingroup pioctl
+ *
+ * \param[in] ain the last part of a path to a mount point, which tells us what to flush
+ * \param[out] aout not in use
+ *
+ * \retval EINVAL Error if some of the initial arguments aren't set
+ * \retval ENOTDIR Error if the initial argument for the mount point isn't a directory
+ * \retval ENOENT Error if the dcache entry isn't set
+ *
+ * \post remove all of the mount data from the dcache regarding a certain mount point
+ */
DECL_PIOCTL(PFlushMount)
{
register afs_int32 code;
***************
*** 3675,3680 ****
--- 4294,4312 ----
return code;
}
+ /*!
+ * VIOC_RXSTAT_PROC (53) - Control process RX statistics
+ *
+ * \ingroup pioctl
+ *
+ * \param[in] ain the flags that control which stats to use
+ * \param[out] aout not in use
+ *
+ * \retval EACCES Error if the user doesn't have super-user credentials
+ * \retval EINVAL Error if the flag input is too long
+ *
+ * \post either enable process RPCStats, disable process RPCStats, or clear the process RPCStats
+ */
DECL_PIOCTL(PRxStatProc)
{
int code = 0;
***************
*** 3708,3713 ****
--- 4340,4358 ----
}
+ /*!
+ * VIOC_RXSTAT_PEER (54) - Control peer RX statistics
+ *
+ * \ingroup pioctl
+ *
+ * \param[in] ain the flags that control which statistics to use
+ * \param[out] aout not in use
+ *
+ * \retval EACCES Error if the user doesn't have super-user credentials
+ * \retval EINVAL Error if the flag input is too long
+ *
+ * \post either enable peer RPCStatws, disable peer RPCStats, or clear the peer RPCStats
+ */
DECL_PIOCTL(PRxStatPeer)
{
int code = 0;
Index: openafs/src/afs/afs_prototypes.h
diff -c openafs/src/afs/afs_prototypes.h:1.74.2.18 openafs/src/afs/afs_prototypes.h:1.74.2.19
*** openafs/src/afs/afs_prototypes.h:1.74.2.18 Mon Sep 22 15:29:54 2008
--- openafs/src/afs/afs_prototypes.h Sat Nov 8 11:34:42 2008
***************
*** 129,135 ****
--- 129,139 ----
extern void afs_CellInit(void);
extern void shutdown_cell(void);
+ #if defined(LINUX_USE_FH)
+ extern int afs_cellname_init(struct fid *fh, int fh_type, int lookupcode);
+ #else
extern int afs_cellname_init(ino_t inode, int lookupcode);
+ #endif
extern int afs_cellname_write(void);
extern afs_int32 afs_NewCell(char *acellName, afs_int32 * acellHosts,
int aflags, char *linkedcname, u_short fsport,
***************
*** 231,237 ****
--- 235,246 ----
extern afs_uint32 afs_tpct1, afs_tpct2, splitdcache;
extern unsigned char *afs_indexFlags;
extern struct afs_cacheOps *afs_cacheType;
+ #if defined(LINUX_USE_FH)
+ extern struct fid cacheitems_fh;
+ extern int cacheitems_fh_type;
+ #else
extern ino_t cacheInode;
+ #endif
extern struct osi_file *afs_cacheInodep;
extern void afs_dcacheInit(int afiles, int ablocks, int aDentries, int achunk,
int aflags);
***************
*** 627,634 ****
--- 636,648 ----
#if defined(AFS_SUN57_64BIT_ENV) || defined(AFS_SGI62_ENV)
extern void *osi_UFSOpen(ino_t ainode);
#else
+ #if defined(LINUX_USE_FH)
+ extern void *osi_UFSOpen_fh(struct fid *fh, int fh_type);
+ extern int osi_get_fh(struct dentry *dp, struct fid *fh, int *max_len);
+ #else
extern void *osi_UFSOpen(afs_int32 ainode);
#endif
+ #endif
extern int afs_osi_Stat(register struct osi_file *afile,
register struct osi_stat *astat);
extern int osi_UFSClose(register struct osi_file *afile);
***************
*** 1111,1117 ****
--- 1125,1136 ----
extern afs_int32 afs_volCounter;
extern afs_rwlock_t afs_xvolume;
extern struct volume *afs_volumes[NVOLS];
+ #if defined(LINUX_USE_FH)
+ extern struct fid volumeinfo_fh;
+ extern int volumeinfo_fh_type;
+ #else
extern ino_t volumeInode;
+ #endif
extern struct volume *afs_FindVolume(struct VenusFid *afid,
afs_int32 locktype);
extern struct volume *afs_freeVolList;
Index: openafs/src/afs/afs_segments.c
diff -c openafs/src/afs/afs_segments.c:1.22.8.3 openafs/src/afs/afs_segments.c:1.22.8.4
*** openafs/src/afs/afs_segments.c:1.22.8.3 Mon Sep 22 15:29:54 2008
--- openafs/src/afs/afs_segments.c Sat Nov 8 11:34:42 2008
***************
*** 14,20 ****
#include "afs/param.h"
RCSID
! ("$Header: /cvs/openafs/src/afs/afs_segments.c,v 1.22.8.3 2008/09/22 19:29:54 shadow Exp $");
#include "afs/sysincludes.h" /*Standard vendor system headers */
#include "afsincludes.h" /*AFS-based standard headers */
--- 14,20 ----
#include "afs/param.h"
RCSID
! ("$Header: /cvs/openafs/src/afs/afs_segments.c,v 1.22.8.4 2008/11/08 16:34:42 shadow Exp $");
#include "afs/sysincludes.h" /*Standard vendor system headers */
#include "afsincludes.h" /*AFS-based standard headers */
***************
*** 432,438 ****
--- 432,442 ----
shouldwake = &nomore;
}
}
+ #if defined(LINUX_USE_FH)
+ tfile = afs_CFileOpen(&tdc->f.fh, tdc->f.fh_type);
+ #else
tfile = afs_CFileOpen(tdc->f.inode);
+ #endif
#ifndef AFS_NOSTATS
xferP =
&(afs_stats_cmfullperf.rpc.
***************
*** 1045,1051 ****
--- 1049,1059 ----
ObtainSharedLock(&tdc->lock, 672);
if (newSize < tdc->f.chunkBytes) {
UpgradeSToWLock(&tdc->lock, 673);
+ #if defined(LINUX_USE_FH)
+ tfile = afs_CFileOpen(&tdc->f.fh, tdc->f.fh_type);
+ #else
tfile = afs_CFileOpen(tdc->f.inode);
+ #endif
afs_CFileTruncate(tfile, newSize);
afs_CFileClose(tfile);
afs_AdjustSize(tdc, newSize);
Index: openafs/src/afs/afs_vcache.c
diff -c openafs/src/afs/afs_vcache.c:1.114.2.12 openafs/src/afs/afs_vcache.c:1.114.2.14
*** openafs/src/afs/afs_vcache.c:1.114.2.12 Mon Sep 22 15:35:26 2008
--- openafs/src/afs/afs_vcache.c Sun Oct 12 14:07:01 2008
***************
*** 41,47 ****
#include "afs/param.h"
RCSID
! ("$Header: /cvs/openafs/src/afs/afs_vcache.c,v 1.114.2.12 2008/09/22 19:35:26 shadow Exp $");
#include "afs/sysincludes.h" /*Standard vendor system headers */
#include "afsincludes.h" /*AFS-based standard headers */
--- 41,47 ----
#include "afs/param.h"
RCSID
! ("$Header: /cvs/openafs/src/afs/afs_vcache.c,v 1.114.2.14 2008/10/12 18:07:01 shadow Exp $");
#include "afs/sysincludes.h" /*Standard vendor system headers */
#include "afsincludes.h" /*AFS-based standard headers */
***************
*** 83,92 ****
/* Forward declarations */
static afs_int32 afs_QueueVCB(struct vcache *avc);
! /*
! * afs_HashCBRFid
! *
* Generate an index into the hash table for a given Fid.
*/
static int
afs_HashCBRFid(struct AFSFid *fid)
--- 83,92 ----
/* Forward declarations */
static afs_int32 afs_QueueVCB(struct vcache *avc);
! /*!
* Generate an index into the hash table for a given Fid.
+ * \param fid
+ * \return The hash value.
*/
static int
afs_HashCBRFid(struct AFSFid *fid)
***************
*** 94,104 ****
return (fid->Volume + fid->Vnode + fid->Unique) % CBRSIZE;
}
! /*
! * afs_InsertHashCBR
! *
* Insert a CBR entry into the hash table.
* Must be called with afs_xvcb held.
*/
static void
afs_InsertHashCBR(struct afs_cbr *cbr)
--- 94,104 ----
return (fid->Volume + fid->Vnode + fid->Unique) % CBRSIZE;
}
! /*!
* Insert a CBR entry into the hash table.
* Must be called with afs_xvcb held.
+ * \param cbr
+ * \return
*/
static void
afs_InsertHashCBR(struct afs_cbr *cbr)
***************
*** 113,127 ****
afs_cbrHashT[slot] = cbr;
}
! /*
! * afs_FlushVCache
! *
! * Description:
! * Flush the given vcache entry.
*
! * Parameters:
! * avc : Pointer to vcache entry to flush.
! * slept : Pointer to int to set 1 if we sleep/drop locks, 0 if we don't.
*
* Environment:
* afs_xvcache lock must be held for writing upon entry to
--- 113,121 ----
afs_cbrHashT[slot] = cbr;
}
! /*!
*
! * Flush the given vcache entry.
*
* Environment:
* afs_xvcache lock must be held for writing upon entry to
***************
*** 130,137 ****
* LOCK: afs_FlushVCache afs_xvcache W
* REFCNT: vcache ref count must be zero on entry except for osf1
* RACE: lock is dropped and reobtained, permitting race in caller
*/
-
int
afs_FlushVCache(struct vcache *avc, int *slept)
{ /*afs_FlushVCache */
--- 124,134 ----
* LOCK: afs_FlushVCache afs_xvcache W
* REFCNT: vcache ref count must be zero on entry except for osf1
* RACE: lock is dropped and reobtained, permitting race in caller
+ *
+ * \param avc Pointer to vcache entry to flush.
+ * \param slept Pointer to int to set 1 if we sleep/drop locks, 0 if we don't.
+ *
*/
int
afs_FlushVCache(struct vcache *avc, int *slept)
{ /*afs_FlushVCache */
***************
*** 279,288 ****
} /*afs_FlushVCache */
#ifndef AFS_SGI_ENV
! /*
! * afs_InactiveVCache
*
! * The core of the inactive vnode op for all but IRIX.
*/
void
afs_InactiveVCache(struct vcache *avc, struct AFS_UCRED *acred)
--- 276,286 ----
} /*afs_FlushVCache */
#ifndef AFS_SGI_ENV
! /*!
! * The core of the inactive vnode op for all but IRIX.
*
! * \param avc
! * \param acred
*/
void
afs_InactiveVCache(struct vcache *avc, struct AFS_UCRED *acred)
***************
*** 305,318 ****
}
#endif
! /*
! * afs_AllocCBR
! *
! * Description: allocate a callback return structure from the
* free list and return it.
*
! * Env: The alloc and free routines are both called with the afs_xvcb lock
* held, so we don't have to worry about blocking in osi_Alloc.
*/
static struct afs_cbr *afs_cbrSpace = 0;
struct afs_cbr *
--- 303,316 ----
}
#endif
! /*!
! * Allocate a callback return structure from the
* free list and return it.
*
! * Environment: The alloc and free routines are both called with the afs_xvcb lock
* held, so we don't have to worry about blocking in osi_Alloc.
+ *
+ * \return The allocated afs_cbr.
*/
static struct afs_cbr *afs_cbrSpace = 0;
struct afs_cbr *
***************
*** 344,358 ****
return tsp;
}
! /*
! * afs_FreeCBR
*
! * Description: free a callback return structure, removing it from all lists.
*
! * Parameters:
! * asp -- the address of the structure to free.
*
! * Environment: the xvcb lock is held over these calls.
*/
int
afs_FreeCBR(register struct afs_cbr *asp)
--- 342,355 ----
return tsp;
}
! /*!
! * Free a callback return structure, removing it from all lists.
*
! * Environment: the xvcb lock is held over these calls.
*
! * \param asp The address of the structure to free.
*
! * \rerurn 0
*/
int
afs_FreeCBR(register struct afs_cbr *asp)
***************
*** 370,384 ****
return 0;
}
! /*
! * afs_FlushVCBs
! *
! * Description: flush all queued callbacks to all servers.
! *
! * Parameters: none.
*
* Environment: holds xvcb lock over RPC to guard against race conditions
* when a new callback is granted for the same file later on.
*/
afs_int32
afs_FlushVCBs(afs_int32 lockit)
--- 367,379 ----
return 0;
}
! /*!
! * Flush all queued callbacks to all servers.
*
* Environment: holds xvcb lock over RPC to guard against race conditions
* when a new callback is granted for the same file later on.
+ *
+ * \return 0 for success.
*/
afs_int32
afs_FlushVCBs(afs_int32 lockit)
***************
*** 492,509 ****
return 0;
}
! /*
! * afs_QueueVCB
! *
! * Description:
! * Queue a callback on the given fid.
! *
! * Parameters:
! * avc: vcache entry
*
* Environment:
* Locks the xvcb lock.
* Called when the xvcache lock is already held.
*/
static afs_int32
--- 487,501 ----
return 0;
}
! /*!
! * Queue a callback on the given fid.
*
* Environment:
* Locks the xvcb lock.
* Called when the xvcache lock is already held.
+ *
+ * \param avc vcache entry
+ * \return 0 for success < 0 otherwise.
*/
static afs_int32
***************
*** 538,556 ****
}
! /*
! * afs_RemoveVCB
! *
! * Description:
! * Remove a queued callback for a given Fid.
! *
! * Parameters:
! * afid: The fid we want cleansed of queued callbacks.
*
* Environment:
* Locks xvcb and xserver locks.
* Typically called with xdcache, xvcache and/or individual vcache
* entries locked.
*/
void
--- 530,545 ----
}
! /*!
! * Remove a queued callback for a given Fid.
*
* Environment:
* Locks xvcb and xserver locks.
* Typically called with xdcache, xvcache and/or individual vcache
* entries locked.
+ *
+ * \param afid The fid we want cleansed of queued callbacks.
+ *
*/
void
***************
*** 623,643 ****
#endif
}
! /*
! * afs_NewVCache
*
! * Description:
! * This routine is responsible for allocating a new cache entry
! * from the free list. It formats the cache entry and inserts it
! * into the appropriate hash tables. It must be called with
! * afs_xvcache write-locked so as to prevent several processes from
! * trying to create a new cache entry simultaneously.
*
! * Parameters:
! * afid : The file id of the file whose cache entry is being
! * created.
*/
- /* LOCK: afs_NewVCache afs_xvcache W */
struct vcache *
afs_NewVCache(struct VenusFid *afid, struct server *serverp)
{
--- 612,630 ----
#endif
}
! /*!
! * This routine is responsible for allocating a new cache entry
! * from the free list. It formats the cache entry and inserts it
! * into the appropriate hash tables. It must be called with
! * afs_xvcache write-locked so as to prevent several processes from
! * trying to create a new cache entry simultaneously.
*
! * LOCK: afs_NewVCache afs_xvcache W
*
! * \param afid The file id of the file whose cache entry is being created.
! *
! * \return The new vcache struct.
*/
struct vcache *
afs_NewVCache(struct VenusFid *afid, struct server *serverp)
{
***************
*** 754,761 ****
return NULL;
}
}
! }
#if defined(AFS_LINUX22_ENV)
{
struct inode *ip;
--- 741,749 ----
return NULL;
}
}
! } /* finished freeing up space */
+ /* Alloc new vnode. */
#if defined(AFS_LINUX22_ENV)
{
struct inode *ip;
***************
*** 870,876 ****
if (tq == uq)
break;
}
! }
if (!freeVCList) {
/* none free, making one is better than a panic */
afs_stats_cmperf.vcacheXAllocs++; /* count in case we have a leak */
--- 858,865 ----
if (tq == uq)
break;
}
! } /* end of if (!freeVCList) */
!
if (!freeVCList) {
/* none free, making one is better than a panic */
afs_stats_cmperf.vcacheXAllocs++; /* count in case we have a leak */
***************
*** 903,909 ****
tvc = freeVCList; /* take from free list */
freeVCList = tvc->nextfree;
tvc->nextfree = NULL;
! }
#endif /* AFS_OSF_ENV */
#if defined(AFS_XBSD_ENV) || defined(AFS_DARWIN_ENV)
--- 892,899 ----
tvc = freeVCList; /* take from free list */
freeVCList = tvc->nextfree;
tvc->nextfree = NULL;
! } /* end of if (!freeVCList) */
!
#endif /* AFS_OSF_ENV */
#if defined(AFS_XBSD_ENV) || defined(AFS_DARWIN_ENV)
***************
*** 1170,1185 ****
} /*afs_NewVCache */
! /*
! * afs_FlushActiveVcaches
*
! * Description:
! * ???
*
! * Parameters:
! * doflocks : Do we handle flocks?
*/
- /* LOCK: afs_FlushActiveVcaches afs_xvcache N */
void
afs_FlushActiveVcaches(register afs_int32 doflocks)
{
--- 1160,1172 ----
} /*afs_NewVCache */
! /*!
! * ???
*
! * LOCK: afs_FlushActiveVcaches afs_xvcache N
*
! * \param doflocks : Do we handle flocks?
*/
void
afs_FlushActiveVcaches(register afs_int32 doflocks)
{
***************
*** 1327,1337 ****
! /*
! * afs_VerifyVCache
! *
! * Description:
! * Make sure a cache entry is up-to-date status-wise.
*
* NOTE: everywhere that calls this can potentially be sped up
* by checking CStatd first, and avoiding doing the InitReq
--- 1314,1321 ----
! /*!
! * Make sure a cache entry is up-to-date status-wise.
*
* NOTE: everywhere that calls this can potentially be sped up
* by checking CStatd first, and avoiding doing the InitReq
***************
*** 1340,1350 ****
* Anymore, the only places that call this KNOW already that the
* vcache is not up-to-date, so we don't screw around.
*
! * Parameters:
! * avc : Ptr to vcache entry to verify.
! * areq : ???
*/
int
afs_VerifyVCache2(struct vcache *avc, struct vrequest *areq)
{
--- 1324,1349 ----
* Anymore, the only places that call this KNOW already that the
* vcache is not up-to-date, so we don't screw around.
*
! * \param avc : Ptr to vcache entry to verify.
! * \param areq : ???
*/
+ /*!
+ *
+ * Make sure a cache entry is up-to-date status-wise.
+ *
+ * NOTE: everywhere that calls this can potentially be sped up
+ * by checking CStatd first, and avoiding doing the InitReq
+ * if this is up-to-date.
+ *
+ * Anymore, the only places that call this KNOW already that the
+ * vcache is not up-to-date, so we don't screw around.
+ *
+ * \param avc Pointer to vcache entry to verify.
+ * \param areq
+ *
+ * \return 0 for success or other error codes.
+ */
int
afs_VerifyVCache2(struct vcache *avc, struct vrequest *areq)
{
***************
*** 1394,1413 ****
} /*afs_VerifyVCache */
! /*
! * afs_SimpleVStat
*
! * Description:
! * Simple copy of stat info into cache.
*
! * Parameters:
! * avc : Ptr to vcache entry involved.
! * astat : Ptr to stat info to copy.
*
- * Environment:
- * Nothing interesting.
- *
- * Callers: as of 1992-04-29, only called by WriteVCache
*/
static void
afs_SimpleVStat(register struct vcache *avc,
--- 1393,1406 ----
} /*afs_VerifyVCache */
! /*!
! * Simple copy of stat info into cache.
*
! * Callers:as of 1992-04-29, only called by WriteVCache
*
! * \param avc Ptr to vcache entry involved.
! * \param astat Ptr to stat info to copy.
*
*/
static void
afs_SimpleVStat(register struct vcache *avc,
***************
*** 1490,1509 ****
} /*afs_SimpleVStat */
! /*
! * afs_WriteVCache
*
! * Description:
! * Store the status info *only* back to the server for a
! * fid/vrequest.
*
! * Parameters:
! * avc : Ptr to the vcache entry.
! * astatus : Ptr to the status info to store.
! * areq : Ptr to the associated vrequest.
*
! * Environment:
! * Must be called with a shared lock held on the vnode.
*/
int
--- 1483,1499 ----
} /*afs_SimpleVStat */
! /*!
! * Store the status info *only* back to the server for a
! * fid/vrequest.
*
! * Environment: Must be called with a shared lock held on the vnode.
*
! * \param avc Ptr to the vcache entry.
! * \param astatus Ptr to the status info to store.
! * \param areq Ptr to the associated vrequest.
*
! * \return Operation status.
*/
int
***************
*** 1651,1673 ****
#endif
! /*
! * afs_ProcessFS
*
! * Description:
! * Copy astat block into vcache info
*
! * Parameters:
! * avc : Ptr to vcache entry.
! * astat : Ptr to stat block to copy in.
! * areq : Ptr to associated request.
*
! * Environment:
! * Must be called under a write lock
! *
! * Note: this code may get dataversion and length out of sync if the file has
! * been modified. This is less than ideal. I haven't thought about
! * it sufficiently to be certain that it is adequate.
*/
void
afs_ProcessFS(register struct vcache *avc,
--- 1641,1658 ----
#endif
! /*!
! * Copy astat block into vcache info
*
! * \note This code may get dataversion and length out of sync if the file has
! * been modified. This is less than ideal. I haven't thought about it sufficiently
! * to be certain that it is adequate.
*
! * \note Environment: Must be called under a write lock
*
! * \param avc Ptr to vcache entry.
! * \param astat Ptr to stat block to copy in.
! * \param areq Ptr to associated request.
*/
void
afs_ProcessFS(register struct vcache *avc,
***************
*** 1753,1758 ****
--- 1738,1756 ----
} /*afs_ProcessFS */
+ /*!
+ * Get fid from server.
+ *
+ * \param afid
+ * \param areq Request to be passed on.
+ * \param name Name of ?? to lookup.
+ * \param OutStatus Fetch status.
+ * \param CallBackp
+ * \param serverp
+ * \param tsyncp
+ *
+ * \return Success status of operation.
+ */
int
afs_RemoteLookup(register struct VenusFid *afid, struct vrequest *areq,
char *name, struct VenusFid *nfid,
***************
*** 1791,1811 ****
}
! /*
* afs_GetVCache
*
! * Description:
! * Given a file id and a vrequest structure, fetch the status
! * information associated with the file.
*
! * Parameters:
! * afid : File ID.
! * areq : Ptr to associated vrequest structure, specifying the
! * user whose authentication tokens will be used.
! * avc : caller may already have a vcache for this file, which is
! * already held.
*
! * Environment:
* The cache entry is returned with an increased vrefCount field.
* The entry must be discarded by calling afs_PutVCache when you
* are through using the pointer to the cache entry.
--- 1789,1807 ----
}
! /*!
* afs_GetVCache
*
! * Given a file id and a vrequest structure, fetch the status
! * information associated with the file.
*
! * \param afid File ID.
! * \param areq Ptr to associated vrequest structure, specifying the
! * user whose authentication tokens will be used.
! * \param avc Caller may already have a vcache for this file, which is
! * already held.
*
! * \note Environment:
* The cache entry is returned with an increased vrefCount field.
* The entry must be discarded by calling afs_PutVCache when you
* are through using the pointer to the cache entry.
***************
*** 1821,1831 ****
* of a parent dir cache entry, given a file (to check its access
* control list). It also allows renames to be handled easily by
* locking directories in a constant order.
! * NB. NewVCache -> FlushVCache presently (4/10/95) drops the xvcache lock.
*/
- /* might have a vcache structure already, which must
- * already be held by the caller */
-
struct vcache *
afs_GetVCache(register struct VenusFid *afid, struct vrequest *areq,
afs_int32 * cached, struct vcache *avc)
--- 1817,1828 ----
* of a parent dir cache entry, given a file (to check its access
* control list). It also allows renames to be handled easily by
* locking directories in a constant order.
! *
! * \note NB. NewVCache -> FlushVCache presently (4/10/95) drops the xvcache lock.
! *
! * \note Might have a vcache structure already, which must
! * already be held by the caller
*/
struct vcache *
afs_GetVCache(register struct VenusFid *afid, struct vrequest *areq,
afs_int32 * cached, struct vcache *avc)
***************
*** 2024,2035 ****
if (AFS_IS_DISCONNECTED) {
if (AFS_IS_DISCON_RW) {
! /* Seek the vnode manually. */
! ObtainSharedLock(&afs_xvcache, 738);
! avc = afs_FindVCache(afid, NULL, 1);
! ReleaseSharedLock(&afs_xvcache);
!
! if (vType(avc) == VDIR)
OutStatus.FileType = Directory;
code = tvc?0:ENOENT;
--- 2021,2027 ----
if (AFS_IS_DISCONNECTED) {
if (AFS_IS_DISCON_RW) {
! if (vType(tvc) == VDIR)
OutStatus.FileType = Directory;
code = tvc?0:ENOENT;
***************
*** 2071,2076 ****
--- 2063,2081 ----
+ /*!
+ * Lookup a vcache by fid. Look inside the cache first, if not
+ * there, lookup the file on the server, and then get it's fresh
+ * cache entry.
+ *
+ * \param afid
+ * \param areq
+ * \param cached Is element cached? If NULL, don't answer.
+ * \param adp
+ * \param aname
+ *
+ * \return The found element or NULL.
+ */
struct vcache *
afs_LookupVCache(struct VenusFid *afid, struct vrequest *areq,
afs_int32 * cached, struct vcache *adp, char *aname)
***************
*** 2552,2559 ****
}
! /*
! * must be called with avc write-locked
* don't absolutely have to invalidate the hint unless the dv has
* changed, but be sure to get it right else there will be consistency bugs.
*/
--- 2557,2564 ----
}
! /*!
! * Must be called with avc write-locked
* don't absolutely have to invalidate the hint unless the dv has
* changed, but be sure to get it right else there will be consistency bugs.
*/
***************
*** 2752,2768 ****
} /*afs_StuffVcache */
#endif
! /*
! * afs_PutVCache
! *
! * Description:
! * Decrements the reference count on a cache entry.
*
! * Parameters:
! * avc : Pointer to the cache entry to decrement.
*
! * Environment:
! * Nothing interesting.
*/
void
afs_PutVCache(register struct vcache *avc)
--- 2757,2768 ----
} /*afs_StuffVcache */
#endif
! /*!
! * Decrements the reference count on a cache entry.
*
! * \param avc Pointer to the cache entry to decrement.
*
! * \note Environment: Nothing interesting.
*/
void
afs_PutVCache(register struct vcache *avc)
***************
*** 2782,2787 ****
--- 2782,2796 ----
} /*afs_PutVCache */
+ /*!
+ * Sleepa when searching for a vcache. Releases all the pending locks,
+ * sleeps then obtains the previously released locks.
+ *
+ * \param vcache Enter sleep state.
+ * \param flag Determines what locks to use.
+ *
+ * \return
+ */
static void findvc_sleep(struct vcache *avc, int flag) {
if (flag & IS_SLOCK) {
ReleaseSharedLock(&afs_xvcache);
***************
*** 2803,2825 ****
}
}
}
! /*
! * afs_FindVCache
! *
! * Description:
! * Find a vcache entry given a fid.
! *
! * Parameters:
! * afid : Pointer to the fid whose cache entry we desire.
! * retry: (SGI-specific) tell the caller to drop the lock on xvcache,
! * unlock the vnode, and try again.
! * flags: bit 1 to specify whether to compute hit statistics. Not
! * set if FindVCache is called as part of internal bookkeeping.
*
! * Environment:
! * Must be called with the afs_xvcache lock at least held at
! * the read level. In order to do the VLRU adjustment, the xvcache lock
! * must be shared-- we upgrade it here.
*/
struct vcache *
--- 2812,2829 ----
}
}
}
! /*!
! * Find a vcache entry given a fid.
*
! * \param afid Pointer to the fid whose cache entry we desire.
! * \param retry (SGI-specific) tell the caller to drop the lock on xvcache,
! * unlock the vnode, and try again.
! * \param flag Bit 1 to specify whether to compute hit statistics. Not
! * set if FindVCache is called as part of internal bookkeeping.
! *
! * \note Environment: Must be called with the afs_xvcache lock at least held at
! * the read level. In order to do the VLRU adjustment, the xvcache lock
! * must be shared-- we upgrade it here.
*/
struct vcache *
***************
*** 2935,2962 ****
return tvc;
} /*afs_FindVCache */
! /*
! * afs_NFSFindVCache
! *
! * Description:
! * Find a vcache entry given a fid. Does a wildcard match on what we
! * have for the fid. If more than one entry, don't return anything.
*
! * Parameters:
! * avcp : Fill in pointer if we found one and only one.
! * afid : Pointer to the fid whose cache entry we desire.
! * retry: (SGI-specific) tell the caller to drop the lock on xvcache,
* unlock the vnode, and try again.
! * flags: bit 1 to specify whether to compute hit statistics. Not
* set if FindVCache is called as part of internal bookkeeping.
*
! * Environment:
! * Must be called with the afs_xvcache lock at least held at
! * the read level. In order to do the VLRU adjustment, the xvcache lock
! * must be shared-- we upgrade it here.
*
! * Return value:
! * number of matches found.
*/
int afs_duplicate_nfs_fids = 0;
--- 2939,2960 ----
return tvc;
} /*afs_FindVCache */
! /*!
! * Find a vcache entry given a fid. Does a wildcard match on what we
! * have for the fid. If more than one entry, don't return anything.
*
! * \param avcp Fill in pointer if we found one and only one.
! * \param afid Pointer to the fid whose cache entry we desire.
! * \param retry (SGI-specific) tell the caller to drop the lock on xvcache,
* unlock the vnode, and try again.
! * \param flags bit 1 to specify whether to compute hit statistics. Not
* set if FindVCache is called as part of internal bookkeeping.
*
! * \note Environment: Must be called with the afs_xvcache lock at least held at
! * the read level. In order to do the VLRU adjustment, the xvcache lock
! * must be shared-- we upgrade it here.
*
! * \return Number of matches found.
*/
int afs_duplicate_nfs_fids = 0;
***************
*** 3109,3118 ****
! /*
! * afs_vcacheInit
! *
* Initialize vcache related variables
*/
void
afs_vcacheInit(int astatSize)
--- 3107,3116 ----
! /*!
* Initialize vcache related variables
+ *
+ * \param astatSize
*/
void
afs_vcacheInit(int astatSize)
***************
*** 3177,3185 ****
QInit(&afs_vhashTV[i]);
}
! /*
! * shutdown_vcache
! *
*/
void
shutdown_vcache(void)
--- 3175,3182 ----
QInit(&afs_vhashTV[i]);
}
! /*!
! * Shutdown vcache.
*/
void
shutdown_vcache(void)
Index: openafs/src/afs/afs_volume.c
diff -c openafs/src/afs/afs_volume.c:1.31.2.6 openafs/src/afs/afs_volume.c:1.31.2.8
*** openafs/src/afs/afs_volume.c:1.31.2.6 Fri May 23 10:25:16 2008
--- openafs/src/afs/afs_volume.c Sat Nov 8 11:34:42 2008
***************
*** 19,25 ****
#include "afs/param.h"
RCSID
! ("$Header: /cvs/openafs/src/afs/afs_volume.c,v 1.31.2.6 2008/05/23 14:25:16 shadow Exp $");
#include "afs/stds.h"
#include "afs/sysincludes.h" /* Standard vendor system headers */
--- 19,25 ----
#include "afs/param.h"
RCSID
! ("$Header: /cvs/openafs/src/afs/afs_volume.c,v 1.31.2.8 2008/11/08 16:34:42 shadow Exp $");
#include "afs/stds.h"
#include "afs/sysincludes.h" /* Standard vendor system headers */
***************
*** 58,68 ****
#endif /* vlserver error base define */
/* Exported variables */
! ino_t volumeInode; /*Inode for VolumeItems file */
! afs_rwlock_t afs_xvolume; /* allocation lock for volumes */
struct volume *afs_freeVolList;
struct volume *afs_volumes[NVOLS];
! afs_int32 afs_volCounter = 1; /* for allocating volume indices */
afs_int32 fvTable[NFENTRIES];
/* Forward declarations */
--- 58,73 ----
#endif /* vlserver error base define */
/* Exported variables */
! #if defined(LINUX_USE_FH)
! struct fid volumeinfo_fh; /* File handle for VolumeItems file */
! int volumeinfo_fh_type;
! #else
! ino_t volumeInode; /* Inode for VolumeItems file */
! #endif
! afs_rwlock_t afs_xvolume; /** allocation lock for volumes */
struct volume *afs_freeVolList;
struct volume *afs_volumes[NVOLS];
! afs_int32 afs_volCounter = 1; /** for allocating volume indices */
afs_int32 fvTable[NFENTRIES];
/* Forward declarations */
***************
*** 74,80 ****
afs_int32 * cID);
! /* Convert a volume name to a #; return 0 if can't parse as a number */
static int
afs_vtoi(register char *aname)
{
--- 79,90 ----
afs_int32 * cID);
!
! /**
! * Convert a volume name to a number;
! * @param aname Volume name.
! * @return return 0 if can't parse as a number.
! */
static int
afs_vtoi(register char *aname)
{
***************
*** 93,99 ****
} /*afs_vtoi */
! /*
* All of the vol cache routines must be called with the afs_xvolume
* lock held in exclusive mode, since they use static variables.
* In addition, we don't want two people adding the same volume
--- 103,109 ----
} /*afs_vtoi */
! /**
* All of the vol cache routines must be called with the afs_xvolume
* lock held in exclusive mode, since they use static variables.
* In addition, we don't want two people adding the same volume
***************
*** 103,110 ****
static struct fvolume staticFVolume;
afs_int32 afs_FVIndex = -1;
! /* UFS specific version of afs_GetVolSlot */
!
struct volume *
afs_UFSGetVolSlot(void)
{
--- 113,122 ----
static struct fvolume staticFVolume;
afs_int32 afs_FVIndex = -1;
! /**
! * UFS specific version of afs_GetVolSlot
! * @return
! */
struct volume *
afs_UFSGetVolSlot(void)
{
***************
*** 152,158 ****
--- 164,174 ----
* next chain
*/
if (afs_FVIndex != tv->vtix) {
+ #if defined(LINUX_USE_FH)
+ tfile = osi_UFSOpen_fh(&volumeinfo_fh, volumeinfo_fh_type);
+ #else
tfile = osi_UFSOpen(volumeInode);
+ #endif
code =
afs_osi_Read(tfile, sizeof(struct fvolume) * tv->vtix,
&staticFVolume, sizeof(struct fvolume));
***************
*** 169,175 ****
--- 185,195 ----
staticFVolume.dotdot = tv->dotdot;
staticFVolume.rootVnode = tv->rootVnode;
staticFVolume.rootUnique = tv->rootUnique;
+ #if defined(LINUX_USE_FH)
+ tfile = osi_UFSOpen_fh(&volumeinfo_fh, volumeinfo_fh_type);
+ #else
tfile = osi_UFSOpen(volumeInode);
+ #endif
code =
afs_osi_Write(tfile, sizeof(struct fvolume) * afs_FVIndex,
&staticFVolume, sizeof(struct fvolume));
***************
*** 185,190 ****
--- 205,215 ----
} /*afs_UFSGetVolSlot */
+ /**
+ * Get an available volume list slot. If the list does not exist,
+ * create one containing a single element.
+ * @return
+ */
struct volume *
afs_MemGetVolSlot(void)
{
***************
*** 205,213 ****
} /*afs_MemGetVolSlot */
! /* afs_ResetVolumes()
! * Reset volume inforamation for all volume structs that
* point to a speicific server.
*/
void
afs_ResetVolumes(struct server *srvp)
--- 230,239 ----
} /*afs_MemGetVolSlot */
! /**
! * Reset volume information for all volume structs that
* point to a speicific server.
+ * @param srvp
*/
void
afs_ResetVolumes(struct server *srvp)
***************
*** 230,236 ****
}
! /* reset volume name to volume id mapping cache */
void
afs_CheckVolumeNames(int flags)
{
--- 256,265 ----
}
! /**
! * Reset volume name to volume id mapping cache.
! * @param flags
! */
void
afs_CheckVolumeNames(int flags)
{
***************
*** 276,281 ****
--- 305,311 ----
continue;
}
}
+ /* ??? */
if (flags & (AFS_VOLCHECK_BUSY | AFS_VOLCHECK_FORCE)) {
for (j = 0; j < MAXHOSTS; j++)
tv->status[j] = not_busy;
***************
*** 369,374 ****
--- 399,412 ----
} /*afs_CheckVolumeNames */
+ /**
+ * Check if volume is in the specified list.
+ * @param fid File FID.
+ * @param nvols Nomber of volumes???
+ * @param vID Array of volume IDs.
+ * @param cID Array of cache IDs.
+ * @return 1 - true, 0 - false.
+ */
static int
inVolList(struct VenusFid *fid, afs_int32 nvols, afs_int32 * vID,
afs_int32 * cID)
***************
*** 390,399 ****
/* afs_PutVolume is now a macro in afs.h */
! /* afs_FindVolume()
! * return volume struct if we have it cached and it's up-to-date
! *
! * Environment: Must be called with afs_xvolume unlocked.
*/
struct volume *
afs_FindVolume(struct VenusFid *afid, afs_int32 locktype)
--- 428,439 ----
/* afs_PutVolume is now a macro in afs.h */
! /**
! * Return volume struct if we have it cached and it's up-to-date.
! * Environment: Must be called with afs_xvolume unlocked.
! * @param afid Volume FID.
! * @param locktype
! * @return Volume or NULL if no result.
*/
struct volume *
afs_FindVolume(struct VenusFid *afid, afs_int32 locktype)
***************
*** 419,427 ****
! /*
! * Note that areq may be null, in which case we don't bother to set any
* request status information.
*/
struct volume *
afs_GetVolume(struct VenusFid *afid, struct vrequest *areq,
--- 459,471 ----
! /**
! * Note that areq may be null, in which case we don't bother to set any
* request status information.
+ * @param afid Volume FID.
+ * @param areq Request type.
+ * @param locktype Lock to be used.
+ * @return Volume or NULL if no result.
*/
struct volume *
afs_GetVolume(struct VenusFid *afid, struct vrequest *areq,
***************
*** 433,438 ****
--- 477,483 ----
tv = afs_FindVolume(afid, locktype);
if (!tv) {
+ /* Do a dynroot check and add dynroot volume if found. */
if (afs_IsDynrootAnyFid(afid)) {
tv = afs_NewDynrootVolume(afid);
} else {
***************
*** 445,450 ****
--- 490,506 ----
+ /**
+ *
+ * @param volid Volume ID. If it's 0, get it from the name.
+ * @param aname Volume name.
+ * @param ve Volume entry.
+ * @param tcell The cell containing this volume.
+ * @param agood
+ * @param type Type of volume.
+ * @param areq Request.
+ * @return Volume or NULL if failure.
+ */
static struct volume *
afs_SetupVolume(afs_int32 volid, char *aname, void *ve, struct cell *tcell,
afs_int32 agood, afs_int32 type, struct vrequest *areq)
***************
*** 477,485 ****
volid = nve->volumeId[whichType];
} else {
volid = ove->volumeId[whichType];
! }
! }
! }
ObtainWriteLock(&afs_xvolume, 108);
--- 533,541 ----
volid = nve->volumeId[whichType];
} else {
volid = ove->volumeId[whichType];
! }
! } /* end of if (volid == 0) */
! } /* end of if (!volid) */
ObtainWriteLock(&afs_xvolume, 108);
***************
*** 502,508 ****
for (j = fvTable[FVHash(tv->cell, volid)]; j != 0; j = tf->next) {
if (afs_FVIndex != j) {
struct osi_file *tfile;
! tfile = osi_UFSOpen(volumeInode);
err =
afs_osi_Read(tfile, sizeof(struct fvolume) * j,
&staticFVolume, sizeof(struct fvolume));
--- 558,568 ----
for (j = fvTable[FVHash(tv->cell, volid)]; j != 0; j = tf->next) {
if (afs_FVIndex != j) {
struct osi_file *tfile;
! #if defined(LINUX_USE_FH)
! tfile = osi_UFSOpen_fh(&volumeinfo_fh, volumeinfo_fh_type);
! #else
! tfile = osi_UFSOpen(volumeInode);
! #endif
err =
afs_osi_Read(tfile, sizeof(struct fvolume) * j,
&staticFVolume, sizeof(struct fvolume));
***************
*** 556,561 ****
--- 616,631 ----
}
+ /**
+ * Seek volume by it's name and attributes.
+ * If volume not found, try to add one.
+ * @param aname Volume name.
+ * @param acell Cell
+ * @param agood
+ * @param areq
+ * @param locktype Type of lock to be used.
+ * @return
+ */
struct volume *
afs_GetVolumeByName(register char *aname, afs_int32 acell, int agood,
struct vrequest *areq, afs_int32 locktype)
***************
*** 585,590 ****
--- 655,665 ----
return (tv);
}
+ /**
+ * Init a new dynroot volume.
+ * @param Volume FID.
+ * @return Volume or NULL if not found.
+ */
static struct volume *
afs_NewDynrootVolume(struct VenusFid *fid)
{
***************
*** 613,618 ****
--- 688,702 ----
}
int lastnvcode;
+
+ /**
+ * @param aname Volume name.
+ * @param acell Cell id.
+ * @param agood
+ * @param areq Request type.
+ * @param locktype Type of lock to be used.
+ * @return Volume or NULL if failure.
+ */
static struct volume *
afs_NewVolumeByName(char *aname, afs_int32 acell, int agood,
struct vrequest *areq, afs_int32 locktype)
***************
*** 759,765 ****
! /* call this with the volume structure locked; used for new-style vldb requests */
void
InstallVolumeEntry(struct volume *av, struct vldbentry *ve, int acell)
{
--- 843,854 ----
! /**
! * Call this with the volume structure locked; used for new-style vldb requests.
! * @param av Volume
! * @param ve
! * @param acell
! */
void
InstallVolumeEntry(struct volume *av, struct vldbentry *ve, int acell)
{
***************
*** 1052,1057 ****
--- 1141,1151 ----
} /*InstallVolumeEntry */
+ /**
+ * Reset volume info for the specified volume strecture. Mark volume
+ * to be rechecked next time.
+ * @param tv
+ */
void
afs_ResetVolumeInfo(struct volume *tv)
{
Index: openafs/src/afs/exporter.h
diff -c openafs/src/afs/exporter.h:1.8.14.3 openafs/src/afs/exporter.h:1.8.14.4
*** openafs/src/afs/exporter.h:1.8.14.3 Mon Jul 31 17:27:39 2006
--- openafs/src/afs/exporter.h Sat Oct 25 20:45:55 2008
***************
*** 107,113 ****
#define EXP_CHECKHOST(EXP, HOST) \
(*(EXP)->exp_op->export_checkhost)(EXP, HOST)
#define EXP_GETHOST(EXP) \
! (*(EXP)->exp_op->export_checkhost)(EXP)
struct afs3_fid {
u_short len;
--- 107,113 ----
#define EXP_CHECKHOST(EXP, HOST) \
(*(EXP)->exp_op->export_checkhost)(EXP, HOST)
#define EXP_GETHOST(EXP) \
! (*(EXP)->exp_op->export_gethost)(EXP)
struct afs3_fid {
u_short len;
Index: openafs/src/afs/sysincludes.h
diff -c openafs/src/afs/sysincludes.h:1.40.2.6 openafs/src/afs/sysincludes.h:1.40.2.7
*** openafs/src/afs/sysincludes.h:1.40.2.6 Sat Aug 16 15:42:58 2008
--- openafs/src/afs/sysincludes.h Sat Nov 8 11:34:42 2008
***************
*** 120,125 ****
--- 120,128 ----
#ifdef COMPLETION_H_EXISTS
#include
#endif
+ #if defined(LINUX_USE_FH)
+ #include
+ #endif
#else /* AFS_LINUX22_ENV */
#if defined(AFS_DARWIN_ENV)
Index: openafs/src/afs/HPUX/osi_machdep.h
diff -c openafs/src/afs/HPUX/osi_machdep.h:1.14.4.1 openafs/src/afs/HPUX/osi_machdep.h:1.14.4.2
*** openafs/src/afs/HPUX/osi_machdep.h:1.14.4.1 Thu Nov 9 19:11:06 2006
--- openafs/src/afs/HPUX/osi_machdep.h Thu Oct 9 14:56:53 2008
***************
*** 30,35 ****
--- 30,37 ----
#define osi_vnhold(avc, r) do { VN_HOLD(AFSTOV(avc)); } while(0)
#define gop_rdwr(rw,gp,base,len,offset,segflg,unit,aresid) \
vn_rdwr((rw),(gp),(base),(len),(offset),(segflg),(unit),(aresid),0)
+ #define gop_lookupname(fnamep,segflg,followlink,compvpp) \
+ lookupname((fnamep),(segflg),(followlink),NULL,(compvpp))
#undef afs_suser
Index: openafs/src/afs/LINUX/osi_file.c
diff -c openafs/src/afs/LINUX/osi_file.c:1.28.2.10 openafs/src/afs/LINUX/osi_file.c:1.28.2.11
*** openafs/src/afs/LINUX/osi_file.c:1.28.2.10 Wed Mar 26 00:10:39 2008
--- openafs/src/afs/LINUX/osi_file.c Sat Nov 8 11:34:42 2008
***************
*** 11,17 ****
#include "afs/param.h"
RCSID
! ("$Header: /cvs/openafs/src/afs/LINUX/osi_file.c,v 1.28.2.10 2008/03/26 04:10:39 shadow Exp $");
#ifdef AFS_LINUX24_ENV
#include "h/module.h" /* early to avoid printf->printk mapping */
--- 11,17 ----
#include "afs/param.h"
RCSID
! ("$Header: /cvs/openafs/src/afs/LINUX/osi_file.c,v 1.28.2.11 2008/11/08 16:34:42 shadow Exp $");
#ifdef AFS_LINUX24_ENV
#include "h/module.h" /* early to avoid printf->printk mapping */
***************
*** 36,49 ****
#if defined(AFS_LINUX26_ENV)
void *
osi_UFSOpen(afs_int32 ainode)
{
register struct osi_file *afile = NULL;
extern int cacheDiskType;
struct inode *tip = NULL;
struct dentry *dp = NULL;
struct file *filp = NULL;
! #if !defined(HAVE_IGET)
struct fid fid;
#endif
AFS_STATCNT(osi_UFSOpen);
--- 36,53 ----
#if defined(AFS_LINUX26_ENV)
void *
+ #if defined(LINUX_USE_FH)
+ osi_UFSOpen_fh(struct fid *fh, int fh_type)
+ #else
osi_UFSOpen(afs_int32 ainode)
+ #endif
{
register struct osi_file *afile = NULL;
extern int cacheDiskType;
struct inode *tip = NULL;
struct dentry *dp = NULL;
struct file *filp = NULL;
! #if !defined(HAVE_IGET) || defined(LINUX_USE_FH)
struct fid fid;
#endif
AFS_STATCNT(osi_UFSOpen);
***************
*** 70,93 ****
dp = d_alloc_anon(tip);
#else
fid.i32.ino = ainode;
fid.i32.gen = 0;
dp = afs_cacheSBp->s_export_op->fh_to_dentry(afs_cacheSBp, &fid, sizeof(fid), FILEID_INO32_GEN);
if (!dp)
! osi_Panic("Can't get dentry for inode %d\n", ainode);
tip = dp->d_inode;
#endif
tip->i_flags |= MS_NOATIME; /* Disable updating access times. */
filp = dentry_open(dp, mntget(afs_cacheMnt), O_RDWR);
if (IS_ERR(filp))
osi_Panic("Can't open inode %d\n", ainode);
afile->filp = filp;
afile->size = FILE_INODE(filp)->i_size;
AFS_GLOCK();
afile->offset = 0;
afile->proc = (int (*)())0;
afile->inum = ainode; /* for hint validity checking */
return (void *)afile;
}
#else
--- 74,109 ----
dp = d_alloc_anon(tip);
#else
+ #if defined(LINUX_USE_FH)
+ dp = afs_cacheSBp->s_export_op->fh_to_dentry(afs_cacheSBp, fh, sizeof(struct fid), fh_type);
+ #else
fid.i32.ino = ainode;
fid.i32.gen = 0;
dp = afs_cacheSBp->s_export_op->fh_to_dentry(afs_cacheSBp, &fid, sizeof(fid), FILEID_INO32_GEN);
+ #endif
if (!dp)
! osi_Panic("Can't get dentry\n");
tip = dp->d_inode;
#endif
tip->i_flags |= MS_NOATIME; /* Disable updating access times. */
filp = dentry_open(dp, mntget(afs_cacheMnt), O_RDWR);
if (IS_ERR(filp))
+ #if defined(LINUX_USE_FH)
+ osi_Panic("Can't open file\n");
+ #else
osi_Panic("Can't open inode %d\n", ainode);
+ #endif
afile->filp = filp;
afile->size = FILE_INODE(filp)->i_size;
AFS_GLOCK();
afile->offset = 0;
afile->proc = (int (*)())0;
+ #if defined(LINUX_USE_FH)
+ afile->inum = tip->i_ino; /* for hint validity checking */
+ #else
afile->inum = ainode; /* for hint validity checking */
+ #endif
return (void *)afile;
}
#else
***************
*** 143,148 ****
--- 159,181 ----
}
#endif
+ #if defined(LINUX_USE_FH)
+ int
+ osi_get_fh(struct dentry *dp, struct fid *fh, int *max_len) {
+ int fh_type;
+
+ if (dp->d_sb->s_export_op->encode_fh) {
+ fh_type = dp->d_sb->s_export_op->encode_fh(dp, (__u32 *)fh, max_len, 0);
+ } else {
+ fh_type = FILEID_INO32_GEN;
+ fh->i32.ino = dp->d_inode->i_ino;
+ fh->i32.gen = dp->d_inode->i_generation;
+ }
+ dput(dp);
+ return(fh_type);
+ }
+ #endif
+
int
afs_osi_Stat(register struct osi_file *afile, register struct osi_stat *astat)
{
***************
*** 372,377 ****
--- 405,415 ----
osi_InitCacheInfo(char *aname)
{
int code;
+ #if defined(LINUX_USE_FH)
+ int max_len = sizeof(struct fid);
+ #else
+ extern ino_t cacheInode;
+ #endif
struct dentry *dp;
extern ino_t cacheInode;
extern struct osi_dev cacheDev;
***************
*** 382,388 ****
--- 420,436 ----
if (code)
return ENOENT;
+ #if defined(LINUX_USE_FH)
+ if (dp->d_sb->s_export_op->encode_fh) {
+ cacheitems_fh_type = dp->d_sb->s_export_op->encode_fh(dp, (__u32 *)&cacheitems_fh, &max_len, 0);
+ } else {
+ cacheitems_fh_type = FILEID_INO32_GEN;
+ cacheitems_fh.i32.ino = dp->d_inode->i_ino;
+ cacheitems_fh.i32.gen = dp->d_inode->i_generation;
+ }
+ #else
cacheInode = dp->d_inode->i_ino;
+ #endif
cacheDev.dev = dp->d_inode->i_sb->s_dev;
afs_fsfragsize = dp->d_inode->i_sb->s_blocksize - 1;
afs_cacheSBp = dp->d_inode->i_sb;
Index: openafs/src/afs/LINUX/osi_vfsops.c
diff -c openafs/src/afs/LINUX/osi_vfsops.c:1.42.4.22 openafs/src/afs/LINUX/osi_vfsops.c:1.42.4.23
*** openafs/src/afs/LINUX/osi_vfsops.c:1.42.4.22 Mon Jun 30 23:35:23 2008
--- openafs/src/afs/LINUX/osi_vfsops.c Sat Nov 8 11:14:01 2008
***************
*** 16,22 ****
#include "afs/param.h"
RCSID
! ("$Header: /cvs/openafs/src/afs/LINUX/osi_vfsops.c,v 1.42.4.22 2008/07/01 03:35:23 shadow Exp $");
#define __NO_VERSION__ /* don't define kernel_version in module.h */
#include /* early to avoid printf->printk mapping */
--- 16,22 ----
#include "afs/param.h"
RCSID
! ("$Header: /cvs/openafs/src/afs/LINUX/osi_vfsops.c,v 1.42.4.23 2008/11/08 16:14:01 shadow Exp $");
#define __NO_VERSION__ /* don't define kernel_version in module.h */
#include /* early to avoid printf->printk mapping */
***************
*** 149,154 ****
--- 149,157 ----
#if defined(AFS_LINUX26_ENV) && !defined(AFS_NONFSTRANS)
sb->s_export_op = &afs_export_ops;
#endif
+ #if defined(HAVE_BDI_INIT)
+ bdi_init(&afs_backing_dev_info);
+ #endif
#if defined(MAX_NON_LFS)
#ifdef AFS_64BIT_CLIENT
#if !defined(MAX_LFS_FILESIZE)
***************
*** 400,405 ****
--- 403,411 ----
#endif
osi_linux_verify_alloced_memory();
+ #if defined(HAVE_BDI_INIT)
+ bdi_destroy(&afs_backing_dev_info);
+ #endif
AFS_GUNLOCK();
sbp->s_dev = 0;
Index: openafs/src/afs/LINUX/osi_vm.c
diff -c openafs/src/afs/LINUX/osi_vm.c:1.17 openafs/src/afs/LINUX/osi_vm.c:1.17.4.1
*** openafs/src/afs/LINUX/osi_vm.c:1.17 Mon Jul 11 14:45:51 2005
--- openafs/src/afs/LINUX/osi_vm.c Mon Oct 20 08:09:43 2008
***************
*** 11,17 ****
#include "afs/param.h"
RCSID
! ("$Header: /cvs/openafs/src/afs/LINUX/osi_vm.c,v 1.17 2005/07/11 18:45:51 shadow Exp $");
#include "afs/sysincludes.h" /* Standard vendor system headers */
#include "afsincludes.h" /* Afs-based standard headers */
--- 11,17 ----
#include "afs/param.h"
RCSID
! ("$Header: /cvs/openafs/src/afs/LINUX/osi_vm.c,v 1.17.4.1 2008/10/20 12:09:43 shadow Exp $");
#include "afs/sysincludes.h" /* Standard vendor system headers */
#include "afsincludes.h" /* Afs-based standard headers */
***************
*** 102,107 ****
--- 102,112 ----
{
struct inode *ip = AFSTOV(avc);
+ if (!avc->states & CPageWrite)
+ avc->states |= CPageWrite;
+ else
+ return; /* someone already writing */
+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,5)
/* filemap_fdatasync() only exported in 2.4.5 and above */
ReleaseWriteLock(&avc->lock);
***************
*** 115,120 ****
--- 120,126 ----
AFS_GLOCK();
ObtainWriteLock(&avc->lock, 121);
#endif
+ avc->states &= ~CPageWrite;
}
/* Purge VM for a file when its callback is revoked.
Index: openafs/src/afs/LINUX/osi_vnodeops.c
diff -c openafs/src/afs/LINUX/osi_vnodeops.c:1.126.2.33 openafs/src/afs/LINUX/osi_vnodeops.c:1.126.2.38
*** openafs/src/afs/LINUX/osi_vnodeops.c:1.126.2.33 Tue Oct 7 15:00:42 2008
--- openafs/src/afs/LINUX/osi_vnodeops.c Sat Nov 8 11:49:45 2008
***************
*** 22,28 ****
#include "afs/param.h"
RCSID
! ("$Header: /cvs/openafs/src/afs/LINUX/osi_vnodeops.c,v 1.126.2.33 2008/10/07 19:00:42 shadow Exp $");
#include "afs/sysincludes.h"
#include "afsincludes.h"
--- 22,28 ----
#include "afs/param.h"
RCSID
! ("$Header: /cvs/openafs/src/afs/LINUX/osi_vnodeops.c,v 1.126.2.38 2008/11/08 16:49:45 shadow Exp $");
#include "afs/sysincludes.h"
#include "afsincludes.h"
***************
*** 53,61 ****
--- 53,63 ----
#if defined(AFS_LINUX26_ENV)
#define LockPage(pp) lock_page(pp)
#define UnlockPage(pp) unlock_page(pp)
+ extern struct backing_dev_info afs_backing_dev_info;
#endif
extern struct vcache *afs_globalVp;
+ extern int afs_notify_change(struct dentry *dp, struct iattr *iattrp);
#if defined(AFS_LINUX26_ENV)
/* Some uses of BKL are perhaps not needed for bypass or memcache--
* why don't we try it out? */
***************
*** 94,114 ****
if (code)
code = -code;
else {
! isize = (i_size_read(fp->f_mapping->host) - 1) >> PAGE_CACHE_SHIFT;
offindex = *offp >> PAGE_CACHE_SHIFT;
if(offindex > isize) {
code=0;
goto done;
}
!
! osi_FlushPages(vcp, credp); /* ensure stale pages are gone */
! AFS_GUNLOCK();
#ifdef DO_SYNC_READ
! code = do_sync_read(fp, buf, count, offp);
#else
! code = generic_file_read(fp, buf, count, offp);
#endif
! AFS_GLOCK();
}
afs_Trace4(afs_iclSetp, CM_TRACE_READOP, ICL_TYPE_POINTER, vcp,
--- 96,119 ----
if (code)
code = -code;
else {
! #if defined(AFS_CACHE_BYPASS)
! #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
! isize = (i_size_read(fp->f_mapping->host) - 1) >> PAGE_CACHE_SHIFT;
offindex = *offp >> PAGE_CACHE_SHIFT;
if(offindex > isize) {
code=0;
goto done;
}
! #endif
! #endif
! osi_FlushPages(vcp, credp); /* ensure stale pages are gone */
! AFS_GUNLOCK();
#ifdef DO_SYNC_READ
! code = do_sync_read(fp, buf, count, offp);
#else
! code = generic_file_read(fp, buf, count, offp);
#endif
! AFS_GLOCK();
}
afs_Trace4(afs_iclSetp, CM_TRACE_READOP, ICL_TYPE_POINTER, vcp,
***************
*** 1734,1739 ****
--- 1739,1746 ----
set_bit(PG_locked, &pp->flags); /* other bits? See mm.h */
clear_bit(PG_error, &pp->flags);
#endif
+ #if defined(AFS_CACHE_BYPASS)
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
/* If the page is past the end of the file, skip it */
isize = (i_size_read(fp->f_mapping->host) - 1) >> PAGE_CACHE_SHIFT;
if(pp->index > isize) {
***************
*** 1741,1746 ****
--- 1748,1755 ----
UnlockPage(pp);
goto done;
}
+ #endif
+ #endif
/* if bypasscache, receiver frees, else we do */
auio = osi_Alloc(sizeof(uio_t));
iovecp = osi_Alloc(sizeof(struct iovec));
***************
*** 1887,1892 ****
--- 1896,1921 ----
ICL_TYPE_POINTER, pp, ICL_TYPE_INT32, page_count(pp),
ICL_TYPE_INT32, 99999);
+ ObtainReadLock(&vcp->lock);
+ if (vcp->states & CPageWrite) {
+ ReleaseReadLock(&vcp->lock);
+ AFS_GUNLOCK();
+ maybe_unlock_kernel();
+ crfree(credp);
+ kunmap(pp);
+ #ifdef AFS_LINUX26_ENV
+ #if defined(WRITEPAGE_ACTIVATE)
+ return WRITEPAGE_ACTIVATE;
+ #else
+ return AOP_WRITEPAGE_ACTIVATE;
+ #endif
+ #else
+ /* should mark it dirty? */
+ return(0);
+ #endif
+ }
+ ReleaseReadLock(&vcp->lock);
+
setup_uio(&tuio, &iovec, buffer, base, count, UIO_WRITE, AFS_UIOSYS);
code = afs_write(vcp, &tuio, f_flags, credp, 0);
***************
*** 2048,2054 ****
return -code;
}
! #if defined(AFS_LINUX24_ENV)
static int
afs_linux_commit_write(struct file *file, struct page *page, unsigned offset,
unsigned to)
--- 2077,2083 ----
return -code;
}
! #if defined(AFS_LINUX24_ENV) && !defined(HAVE_WRITE_BEGIN)
static int
afs_linux_commit_write(struct file *file, struct page *page, unsigned offset,
unsigned to)
***************
*** 2075,2084 ****
#endif
return 0;
}
! extern int afs_notify_change(struct dentry *dp, struct iattr *iattrp);
#endif
static struct inode_operations afs_file_iops = {
#if defined(AFS_LINUX26_ENV)
.permission = afs_linux_permission,
--- 2104,2143 ----
#endif
return 0;
}
+ #endif
! #if defined(HAVE_WRITE_BEGIN)
! static int
! afs_linux_write_end(struct file *file, struct address_space *mapping,
! loff_t pos, unsigned len, unsigned copied,
! struct page *page, void *fsdata)
! {
! int code;
! pgoff_t index = pos >> PAGE_CACHE_SHIFT;
! unsigned from = pos & (PAGE_CACHE_SIZE - 1);
!
! code = afs_linux_writepage_sync(file->f_dentry->d_inode, page,
! from, copied);
! unlock_page(page);
! page_cache_release(page);
! return code;
! }
!
! static int
! afs_linux_write_begin(struct file *file, struct address_space *mapping,
! loff_t pos, unsigned len, unsigned flags,
! struct page **pagep, void **fsdata)
! {
! struct page *page;
! pgoff_t index = pos >> PAGE_CACHE_SHIFT;
! page = __grab_cache_page(mapping, index);
! *pagep = page;
!
! return 0;
! }
#endif
+
static struct inode_operations afs_file_iops = {
#if defined(AFS_LINUX26_ENV)
.permission = afs_linux_permission,
***************
*** 2103,2110 ****
.readpages = afs_linux_readpages,
#endif
.writepage = afs_linux_writepage,
! .commit_write = afs_linux_commit_write,
! .prepare_write = afs_linux_prepare_write,
};
#endif
--- 2162,2174 ----
.readpages = afs_linux_readpages,
#endif
.writepage = afs_linux_writepage,
! #if defined (HAVE_WRITE_BEGIN)
! .write_begin = afs_linux_write_begin,
! .write_end = afs_linux_write_end,
! #else
! .commit_write = afs_linux_commit_write,
! .prepare_write = afs_linux_prepare_write,
! #endif
};
#endif
***************
*** 2204,2209 ****
--- 2268,2274 ----
if (vattr)
vattr2inode(ip, vattr);
+ ip->i_mapping->backing_dev_info = &afs_backing_dev_info;
/* Reset ops if symlink or directory. */
if (S_ISREG(ip->i_mode)) {
ip->i_op = &afs_file_iops;
Index: openafs/src/afs/SOLARIS/osi_machdep.h
diff -c openafs/src/afs/SOLARIS/osi_machdep.h:1.11.4.4 openafs/src/afs/SOLARIS/osi_machdep.h:1.11.4.5
*** openafs/src/afs/SOLARIS/osi_machdep.h:1.11.4.4 Fri Oct 5 18:18:35 2007
--- openafs/src/afs/SOLARIS/osi_machdep.h Thu Oct 9 14:54:17 2008
***************
*** 59,64 ****
--- 59,66 ----
#define osi_vnhold(avc, r) do { VN_HOLD(AFSTOV(avc)); } while(0)
#define gop_rdwr(rw,gp,base,len,offset,segflg,ioflag,ulimit,cr,aresid) \
vn_rdwr((rw),(gp),(base),(len),(offset),(segflg),(ioflag),(ulimit),(cr),(aresid))
+ #define gop_lookupname(fnamep,segflg,followlink,compvpp) \
+ lookupname((fnamep),(segflg),(followlink),NULL,(compvpp))
#if defined(AFS_SUN510_ENV)
Index: openafs/src/afs/UKERNEL/afs_usrops.c
diff -c openafs/src/afs/UKERNEL/afs_usrops.c:1.30.6.8 openafs/src/afs/UKERNEL/afs_usrops.c:1.30.6.9
*** openafs/src/afs/UKERNEL/afs_usrops.c:1.30.6.8 Tue Jul 1 16:56:38 2008
--- openafs/src/afs/UKERNEL/afs_usrops.c Mon Oct 27 19:53:46 2008
***************
*** 15,21 ****
#include "afs/param.h"
RCSID
! ("$Header: /cvs/openafs/src/afs/UKERNEL/afs_usrops.c,v 1.30.6.8 2008/07/01 20:56:38 shadow Exp $");
#ifdef UKERNEL
--- 15,21 ----
#include "afs/param.h"
RCSID
! ("$Header: /cvs/openafs/src/afs/UKERNEL/afs_usrops.c,v 1.30.6.9 2008/10/27 23:53:46 shadow Exp $");
#ifdef UKERNEL
***************
*** 2201,2207 ****
uafs_LookupName(char *path, struct usr_vnode *parentVp,
struct usr_vnode **vpp, int follow, int no_eval_mtpt)
{
! int code;
int linkCount;
struct usr_vnode *vp;
struct usr_vnode *nextVp;
--- 2201,2207 ----
uafs_LookupName(char *path, struct usr_vnode *parentVp,
struct usr_vnode **vpp, int follow, int no_eval_mtpt)
{
! int code = 0;
int linkCount;
struct usr_vnode *vp;
struct usr_vnode *nextVp;
Index: openafs/src/afs/VNOPS/afs_vnop_dirops.c
diff -c openafs/src/afs/VNOPS/afs_vnop_dirops.c:1.21.4.3 openafs/src/afs/VNOPS/afs_vnop_dirops.c:1.21.4.4
*** openafs/src/afs/VNOPS/afs_vnop_dirops.c:1.21.4.3 Mon Sep 22 15:29:55 2008
--- openafs/src/afs/VNOPS/afs_vnop_dirops.c Sun Oct 12 14:10:14 2008
***************
*** 21,27 ****
#include "afs/param.h"
RCSID
! ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_dirops.c,v 1.21.4.3 2008/09/22 19:29:55 shadow Exp $");
#include "afs/sysincludes.h" /* Standard vendor system headers */
#include "afsincludes.h" /* Afs-based standard headers */
--- 21,27 ----
#include "afs/param.h"
RCSID
! ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_dirops.c,v 1.21.4.4 2008/10/12 18:10:14 shadow Exp $");
#include "afs/sysincludes.h" /* Standard vendor system headers */
#include "afsincludes.h" /* Afs-based standard headers */
***************
*** 435,442 ****
ObtainSharedLock(&tdc->lock, 732);
}
! if (!tvc->ddirty_flags ||
! (tvc->ddirty_flags == VDisconShadowed)) {
/* Put it in the list only if it's fresh or has only been shadowed. */
ObtainWriteLock(&afs_DDirtyVCListLock, 728);
AFS_DISCON_ADD_DIRTY(tvc);
--- 435,441 ----
ObtainSharedLock(&tdc->lock, 732);
}
! if (!tvc->ddirty_flags) {
/* Put it in the list only if it's fresh or has only been shadowed. */
ObtainWriteLock(&afs_DDirtyVCListLock, 728);
AFS_DISCON_ADD_DIRTY(tvc);
Index: openafs/src/afs/VNOPS/afs_vnop_lookup.c
diff -c openafs/src/afs/VNOPS/afs_vnop_lookup.c:1.72.2.9 openafs/src/afs/VNOPS/afs_vnop_lookup.c:1.72.2.10
*** openafs/src/afs/VNOPS/afs_vnop_lookup.c:1.72.2.9 Mon Sep 22 15:29:55 2008
--- openafs/src/afs/VNOPS/afs_vnop_lookup.c Mon Oct 27 19:41:43 2008
***************
*** 18,24 ****
#include "afs/param.h"
RCSID
! ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_lookup.c,v 1.72.2.9 2008/09/22 19:29:55 shadow Exp $");
#include "afs/sysincludes.h" /* Standard vendor system headers */
#include "afsincludes.h" /* Afs-based standard headers */
--- 18,24 ----
#include "afs/param.h"
RCSID
! ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_lookup.c,v 1.72.2.10 2008/10/27 23:41:43 shadow Exp $");
#include "afs/sysincludes.h" /* Standard vendor system headers */
#include "afsincludes.h" /* Afs-based standard headers */
***************
*** 664,670 ****
afs_int32 retry; /* handle low-level SGI MP race conditions */
long volStates; /* flags from vol structure */
struct volume *volp = 0; /* volume ptr */
! struct VenusFid dotdot;
int flagIndex = 0; /* First file with bulk fetch flag set */
int inlinebulk = 0; /* Did we use InlineBulk RPC or not? */
XSTATS_DECLS;
--- 664,670 ----
afs_int32 retry; /* handle low-level SGI MP race conditions */
long volStates; /* flags from vol structure */
struct volume *volp = 0; /* volume ptr */
! struct VenusFid dotdot = {0, 0, 0};
int flagIndex = 0; /* First file with bulk fetch flag set */
int inlinebulk = 0; /* Did we use InlineBulk RPC or not? */
XSTATS_DECLS;
Index: openafs/src/afs/VNOPS/afs_vnop_read.c
diff -c openafs/src/afs/VNOPS/afs_vnop_read.c:1.34.2.6 openafs/src/afs/VNOPS/afs_vnop_read.c:1.34.2.7
*** openafs/src/afs/VNOPS/afs_vnop_read.c:1.34.2.6 Mon Sep 22 15:29:55 2008
--- openafs/src/afs/VNOPS/afs_vnop_read.c Sat Nov 8 11:34:42 2008
***************
*** 19,25 ****
#include "afs/param.h"
RCSID
! ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_read.c,v 1.34.2.6 2008/09/22 19:29:55 shadow Exp $");
#include "afs/sysincludes.h" /* Standard vendor system headers */
#include "afsincludes.h" /* Afs-based standard headers */
--- 19,25 ----
#include "afs/param.h"
RCSID
! ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_read.c,v 1.34.2.7 2008/11/08 16:34:42 shadow Exp $");
#include "afs/sysincludes.h" /* Standard vendor system headers */
#include "afsincludes.h" /* Afs-based standard headers */
***************
*** 806,813 ****
usedihint++;
} else
#endif /* IHINT */
!
tfile = (struct osi_file *)osi_UFSOpen(tdc->f.inode);
#ifdef AFS_DARWIN80_ENV
trimlen = len;
tuiop = afsio_darwin_partialcopy(auio, trimlen);
--- 806,816 ----
usedihint++;
} else
#endif /* IHINT */
! #if defined(LINUX_USE_FH)
! tfile = (struct osi_file *)osi_UFSOpen_fh(&tdc->f.fh, tdc->f.fh_type);
! #else
tfile = (struct osi_file *)osi_UFSOpen(tdc->f.inode);
+ #endif
#ifdef AFS_DARWIN80_ENV
trimlen = len;
tuiop = afsio_darwin_partialcopy(auio, trimlen);
Index: openafs/src/afs/VNOPS/afs_vnop_symlink.c
diff -c openafs/src/afs/VNOPS/afs_vnop_symlink.c:1.24.4.6 openafs/src/afs/VNOPS/afs_vnop_symlink.c:1.24.4.7
*** openafs/src/afs/VNOPS/afs_vnop_symlink.c:1.24.4.6 Sun Jun 8 23:30:30 2008
--- openafs/src/afs/VNOPS/afs_vnop_symlink.c Sat Nov 8 11:34:42 2008
***************
*** 22,28 ****
#include "afs/param.h"
RCSID
! ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_symlink.c,v 1.24.4.6 2008/06/09 03:30:30 shadow Exp $");
#include "afs/sysincludes.h" /* Standard vendor system headers */
#include "afsincludes.h" /* Afs-based standard headers */
--- 22,28 ----
#include "afs/param.h"
RCSID
! ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_symlink.c,v 1.24.4.7 2008/11/08 16:34:42 shadow Exp $");
#include "afs/sysincludes.h" /* Standard vendor system headers */
#include "afsincludes.h" /* Afs-based standard headers */
***************
*** 336,342 ****
--- 336,346 ----
rbuf = (char *)osi_AllocLargeSpace(AFS_LRALLOCSIZ);
tlen = len;
ObtainReadLock(&tdc->lock);
+ #if defined(LINUX_USE_FH)
+ tfile = osi_UFSOpen_fh(&tdc->f.fh, tdc->f.fh_type);
+ #else
tfile = osi_UFSOpen(tdc->f.inode);
+ #endif
code = afs_osi_Read(tfile, -1, rbuf, tlen);
osi_UFSClose(tfile);
ReleaseReadLock(&tdc->lock);
Index: openafs/src/afs/VNOPS/afs_vnop_write.c
diff -c openafs/src/afs/VNOPS/afs_vnop_write.c:1.50.2.4 openafs/src/afs/VNOPS/afs_vnop_write.c:1.50.2.5
*** openafs/src/afs/VNOPS/afs_vnop_write.c:1.50.2.4 Mon Sep 22 15:29:55 2008
--- openafs/src/afs/VNOPS/afs_vnop_write.c Sat Nov 8 11:34:42 2008
***************
*** 21,27 ****
#include "afs/param.h"
RCSID
! ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_write.c,v 1.50.2.4 2008/09/22 19:29:55 shadow Exp $");
#include "afs/sysincludes.h" /* Standard vendor system headers */
#include "afsincludes.h" /* Afs-based standard headers */
--- 21,27 ----
#include "afs/param.h"
RCSID
! ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_write.c,v 1.50.2.5 2008/11/08 16:34:42 shadow Exp $");
#include "afs/sysincludes.h" /* Standard vendor system headers */
#include "afsincludes.h" /* Afs-based standard headers */
***************
*** 543,549 ****
--- 543,553 ----
tdc->f.states |= DWriting;
tdc->dflags |= DFEntryMod;
}
+ #if defined(LINUX_USE_FH)
+ tfile = (struct osi_file *)osi_UFSOpen_fh(&tdc->f.fh, tdc->f.fh_type);
+ #else
tfile = (struct osi_file *)osi_UFSOpen(tdc->f.inode);
+ #endif
len = totalLength; /* write this amount by default */
offset = filePos - AFS_CHUNKTOBASE(tdc->f.chunk);
max = AFS_CHUNKTOSIZE(tdc->f.chunk); /* max size of this chunk */
Index: openafs/src/afsd/afsd.c
diff -c openafs/src/afsd/afsd.c:1.60.2.11 openafs/src/afsd/afsd.c:1.60.2.12
*** openafs/src/afsd/afsd.c:1.60.2.11 Mon Sep 22 15:35:27 2008
--- openafs/src/afsd/afsd.c Sat Nov 8 11:34:42 2008
***************
*** 58,64 ****
#include
RCSID
! ("$Header: /cvs/openafs/src/afsd/afsd.c,v 1.60.2.11 2008/09/22 19:35:27 shadow Exp $");
#define VFS 1
--- 58,64 ----
#include
RCSID
! ("$Header: /cvs/openafs/src/afsd/afsd.c,v 1.60.2.12 2008/11/08 16:34:42 shadow Exp $");
#define VFS 1
***************
*** 339,345 ****
* -2: file exists in top-level
* >=0: file exists in Dxxx
*/
! #ifndef AFS_CACHE_VNODE_PATH
AFSD_INO_T *inode_for_V; /* Array of inodes for desired
* cache files */
#endif
--- 339,345 ----
* -2: file exists in top-level
* >=0: file exists in Dxxx
*/
! #if !defined(AFS_CACHE_VNODE_PATH) && !defined(LINUX_USE_FH)
AFSD_INO_T *inode_for_V; /* Array of inodes for desired
* cache files */
#endif
***************
*** 1014,1020 ****
* file's inode, directory, and bump the number of files found
* total and in this directory.
*/
! #ifndef AFS_CACHE_VNODE_PATH
inode_for_V[vFileNum] = currp->d_ino;
#endif
dir_for_V[vFileNum] = dirNum; /* remember this directory */
--- 1014,1020 ----
* file's inode, directory, and bump the number of files found
* total and in this directory.
*/
! #if !defined(AFS_CACHE_VNODE_PATH) && !defined(LINUX_USE_FH)
inode_for_V[vFileNum] = currp->d_ino;
#endif
dir_for_V[vFileNum] = dirNum; /* remember this directory */
***************
*** 1153,1159 ****
vFileNum);
else {
struct stat statb;
! #ifndef AFS_CACHE_VNODE_PATH
assert(inode_for_V[vFileNum] == (AFSD_INO_T) 0);
#endif
sprintf(vFilePtr, "D%d/V%d", thisDir, vFileNum);
--- 1153,1159 ----
vFileNum);
else {
struct stat statb;
! #if !defined(AFS_CACHE_VNODE_PATH) && !defined(LINUX_USE_FH)
assert(inode_for_V[vFileNum] == (AFSD_INO_T) 0);
#endif
sprintf(vFilePtr, "D%d/V%d", thisDir, vFileNum);
***************
*** 1166,1172 ****
if (CreateCacheFile(fullpn_VFile, &statb))
printf("%s: Can't create '%s'\n", rn, fullpn_VFile);
else {
! #ifndef AFS_CACHE_VNODE_PATH
inode_for_V[vFileNum] = statb.st_ino;
#endif
dir_for_V[vFileNum] = thisDir;
--- 1166,1172 ----
if (CreateCacheFile(fullpn_VFile, &statb))
printf("%s: Can't create '%s'\n", rn, fullpn_VFile);
else {
! #if !defined(AFS_CACHE_VNODE_PATH) && !defined(LINUX_USE_FH)
inode_for_V[vFileNum] = statb.st_ino;
#endif
dir_for_V[vFileNum] = thisDir;
***************
*** 1268,1273 ****
--- 1268,1274 ----
if (res != 0) {
return "unable to statfs cache base directory";
}
+ #if !defined(LINUX_USE_FH)
if (statfsbuf.f_type == 0x52654973) { /* REISERFS_SUPER_MAGIC */
return "cannot use reiserfs as cache partition";
} else if (statfsbuf.f_type == 0x58465342) { /* XFS_SUPER_MAGIC */
***************
*** 1277,1282 ****
--- 1278,1284 ----
} else if (statfsbuf.f_type != 0xEF53) {
return "must use ext2 or ext3 for cache partition";
}
+ #endif
}
#endif
***************
*** 1936,1942 ****
cacheStatEntries);
}
! #ifndef AFS_CACHE_VNODE_PATH
/*
* Create and zero the inode table for the desired cache files.
*/
--- 1938,1944 ----
cacheStatEntries);
}
! #if !defined(AFS_CACHE_VNODE_PATH) && !defined(LINUX_USE_FH)
/*
* Create and zero the inode table for the desired cache files.
*/
***************
*** 2307,2314 ****
--- 2309,2321 ----
(afs_uint32) (inode_for_V[currVFile] >> 32),
(afs_uint32) (inode_for_V[currVFile] & 0xffffffff));
#else
+ #if defined(LINUX_USE_FH)
+ sprintf(fullpn_VFile, "%s/D%d/V%d", cacheBaseDir, dir_for_V[currVFile], currVFile);
+ call_syscall(AFSOP_CACHEFILE, fullpn_VFile);
+ #else
call_syscall(AFSOP_CACHEINODE, inode_for_V[currVFile]);
#endif
+ #endif
}
#endif
Index: openafs/src/aklog/aklog_main.c
diff -c openafs/src/aklog/aklog_main.c:1.12.2.15 openafs/src/aklog/aklog_main.c:1.12.2.17
*** openafs/src/aklog/aklog_main.c:1.12.2.15 Tue Apr 1 14:15:40 2008
--- openafs/src/aklog/aklog_main.c Wed Oct 29 15:43:53 2008
***************
*** 1,5 ****
/*
! * $Id: aklog_main.c,v 1.12.2.15 2008/04/01 18:15:40 shadow Exp $
*
* Copyright 1990,1991 by the Massachusetts Institute of Technology
* For distribution and copying rights, see the file "mit-copyright.h"
--- 1,5 ----
/*
! * $Id: aklog_main.c,v 1.12.2.17 2008/10/29 19:43:53 shadow Exp $
*
* Copyright 1990,1991 by the Massachusetts Institute of Technology
* For distribution and copying rights, see the file "mit-copyright.h"
***************
*** 36,42 ****
#include
RCSID
! ("$Header: /cvs/openafs/src/aklog/aklog_main.c,v 1.12.2.15 2008/04/01 18:15:40 shadow Exp $");
#include
#include
#include
--- 36,42 ----
#include
RCSID
! ("$Header: /cvs/openafs/src/aklog/aklog_main.c,v 1.12.2.17 2008/10/29 19:43:53 shadow Exp $");
#include
#include
#include
***************
*** 463,469 ****
retry = 1;
while(retry) {
!
/* Cell on command line - use that one */
if (realm && realm[0]) {
realm_of_cell = realm;
--- 463,489 ----
retry = 1;
while(retry) {
!
! /* This code tries principals in the following, much debated,
! * order:
! *
! * If the realm is specified on the command line we do
! * - afs/cell@COMMAND-LINE-REALM
! * - afs@COMMAND-LINE-REALM
! *
! * Otherwise, we do
! * - afs/cell@REALM-FROM-USERS-PRINCIPAL
! * - afs/cell@krb5_get_host_realm(db-server)
! * Then, if krb5_get_host_realm(db-server) is non-empty
! * - afs@ krb5_get_host_realm(db-server)
! * Otherwise
! * - afs/cell@ upper-case-domain-of-db-server
! * - afs@ upper-case-domain-of-db-server
! *
! * In all cases, the 'afs@' variant is only tried where the
! * cell and the realm match case-insensitively.
! */
!
/* Cell on command line - use that one */
if (realm && realm[0]) {
realm_of_cell = realm;
***************
*** 528,535 ****
"%s.\n", progname, cell_to_use);
exit(AKLOG_MISC);
}
! printf("We've deduced that we need to authenticate to"
! " realm %s.\n", realm_of_cell);
}
status = get_credv5(context, AFSKEY, cell_to_use,
realm_of_cell, &v5cred);
--- 548,557 ----
"%s.\n", progname, cell_to_use);
exit(AKLOG_MISC);
}
! if (dflag) {
! printf("We've deduced that we need to authenticate"
! " to realm %s.\n", realm_of_cell);
! }
}
status = get_credv5(context, AFSKEY, cell_to_use,
realm_of_cell, &v5cred);
Index: openafs/src/bozo/bosserver.c
diff -c openafs/src/bozo/bosserver.c:1.32.2.11 openafs/src/bozo/bosserver.c:1.32.2.12
*** openafs/src/bozo/bosserver.c:1.32.2.11 Wed Sep 24 17:36:54 2008
--- openafs/src/bozo/bosserver.c Sat Oct 18 11:09:07 2008
***************
*** 11,17 ****
#include
RCSID
! ("$Header: /cvs/openafs/src/bozo/bosserver.c,v 1.32.2.11 2008/09/24 21:36:54 shadow Exp $");
#include
#include
--- 11,17 ----
#include
RCSID
! ("$Header: /cvs/openafs/src/bozo/bosserver.c,v 1.32.2.12 2008/10/18 15:09:07 jaltman Exp $");
#include
#include
***************
*** 825,836 ****
else if (strcmp(argv[code], "-allow-dotted-principals") == 0) {
rxkadDisableDotCheck = 1;
}
! else if (!strcmp(argv[i], "-rxmaxmtu")) {
! if ((i + 1) >= argc) {
fprintf(stderr, "missing argument for -rxmaxmtu\n");
exit(1);
}
! rxMaxMTU = atoi(argv[++i]);
if ((rxMaxMTU < RX_MIN_PACKET_SIZE) ||
(rxMaxMTU > RX_MAX_PACKET_DATA_SIZE)) {
printf("rxMaxMTU %d invalid; must be between %d-%d\n",
--- 825,836 ----
else if (strcmp(argv[code], "-allow-dotted-principals") == 0) {
rxkadDisableDotCheck = 1;
}
! else if (!strcmp(argv[code], "-rxmaxmtu")) {
! if ((code + 1) >= argc) {
fprintf(stderr, "missing argument for -rxmaxmtu\n");
exit(1);
}
! rxMaxMTU = atoi(argv[++code]);
if ((rxMaxMTU < RX_MIN_PACKET_SIZE) ||
(rxMaxMTU > RX_MAX_PACKET_DATA_SIZE)) {
printf("rxMaxMTU %d invalid; must be between %d-%d\n",
Index: openafs/src/bucoord/commands.c
diff -c openafs/src/bucoord/commands.c:1.18.2.6 openafs/src/bucoord/commands.c:1.18.2.7
*** openafs/src/bucoord/commands.c:1.18.2.6 Mon Nov 26 16:08:41 2007
--- openafs/src/bucoord/commands.c Mon Oct 27 19:41:45 2008
***************
*** 11,17 ****
#include
RCSID
! ("$Header: /cvs/openafs/src/bucoord/commands.c,v 1.18.2.6 2007/11/26 21:08:41 shadow Exp $");
#include
#if defined(AFS_LINUX24_ENV)
--- 11,17 ----
#include
RCSID
! ("$Header: /cvs/openafs/src/bucoord/commands.c,v 1.18.2.7 2008/10/27 23:41:45 shadow Exp $");
#include
#if defined(AFS_LINUX24_ENV)
***************
*** 431,444 ****
struct bc_volumeDump *tvd; /*Ptr to new dump instance */
struct bc_volumeEntry *tve, *ctve; /*Ptr to new volume entry instance */
char patt[256]; /*Composite regex; also, target string */
! int volType; /*Type of volume that worked */
afs_int32 index; /*Current VLDB entry index */
afs_int32 count; /*Needed by VL_ListEntry() */
afs_int32 next_index; /*Next index to list */
struct vldbentry entry; /*VLDB entry */
int srvpartpair; /*Loop counter: server/partition pair */
afs_int32 total = 0;
! int found, foundentry;
struct serversort *servers = 0, *ss = 0;
struct partitionsort *ps = 0;
--- 431,445 ----
struct bc_volumeDump *tvd; /*Ptr to new dump instance */
struct bc_volumeEntry *tve, *ctve; /*Ptr to new volume entry instance */
char patt[256]; /*Composite regex; also, target string */
! int volType = 0; /*Type of volume that worked */
afs_int32 index; /*Current VLDB entry index */
afs_int32 count; /*Needed by VL_ListEntry() */
afs_int32 next_index; /*Next index to list */
struct vldbentry entry; /*VLDB entry */
int srvpartpair; /*Loop counter: server/partition pair */
afs_int32 total = 0;
! int found;
! int foundentry = 0;
struct serversort *servers = 0, *ss = 0;
struct partitionsort *ps = 0;
***************
*** 1602,1610 ****
bc_DumpCmd(struct cmd_syndesc *as, void *arock)
{ /*bc_DumpCmd */
static char rn[] = "bc_DumpCmd"; /*Routine name */
! char *dumpPath, *vsName; /*Ptrs to various names */
! struct bc_volumeSet *tvs; /*Ptr to list of generated volume info */
! struct bc_dumpSchedule *tds, *baseds; /*Ptr to dump schedule node */
struct bc_volumeDump *tve, *volsToDump; /*Ptr to individual vols to be dumped */
struct budb_dumpEntry dumpEntry, de, fde; /* dump entry */
afs_uint32 d;
--- 1603,1613 ----
bc_DumpCmd(struct cmd_syndesc *as, void *arock)
{ /*bc_DumpCmd */
static char rn[] = "bc_DumpCmd"; /*Routine name */
! char *dumpPath = NULL;
! char *vsName = NULL; /*Ptrs to various names */
! struct bc_volumeSet *tvs = NULL; /*Ptr to list of generated volume info */
! struct bc_dumpSchedule *tds;
! struct bc_dumpSchedule *baseds = NULL; /*Ptr to dump schedule node */
struct bc_volumeDump *tve, *volsToDump; /*Ptr to individual vols to be dumped */
struct budb_dumpEntry dumpEntry, de, fde; /* dump entry */
afs_uint32 d;
***************
*** 1618,1624 ****
afs_int32 doAt, atTime; /* Time a timed-dump is to start at */
afs_int32 length;
char *timeString;
! int doAppend; /* Append the dump to dump set */
afs_int32 code; /* Return code */
int loadfile; /* whether to load a file or not */
--- 1621,1627 ----
afs_int32 doAt, atTime; /* Time a timed-dump is to start at */
afs_int32 length;
char *timeString;
! int doAppend = 0; /* Append the dump to dump set */
afs_int32 code; /* Return code */
int loadfile; /* whether to load a file or not */
Index: openafs/src/bucoord/restore.c
diff -c openafs/src/bucoord/restore.c:1.10.6.7 openafs/src/bucoord/restore.c:1.10.6.8
*** openafs/src/bucoord/restore.c:1.10.6.7 Mon Nov 26 16:08:41 2007
--- openafs/src/bucoord/restore.c Sat Oct 18 11:23:24 2008
***************
*** 15,21 ****
#include
RCSID
! ("$Header: /cvs/openafs/src/bucoord/restore.c,v 1.10.6.7 2007/11/26 21:08:41 shadow Exp $");
#include
#include
--- 15,21 ----
#include
RCSID
! ("$Header: /cvs/openafs/src/bucoord/restore.c,v 1.10.6.8 2008/10/18 15:23:24 jaltman Exp $");
#include
#include
***************
*** 164,170 ****
afs_int32 tapedumpid, parent;
afs_int32 nentries = 0;
! afs_int32 last, next, ve, vecount;
struct bc_tapeItem *ti, *pti, *nti;
struct bc_tapeList *tapeList = (struct bc_tapeList *)0;
struct bc_tapeList *tle, *ptle, *ntle;
--- 164,171 ----
afs_int32 tapedumpid, parent;
afs_int32 nentries = 0;
! afs_int32 last = 0;
! afs_int32 next, ve, vecount;
struct bc_tapeItem *ti, *pti, *nti;
struct bc_tapeList *tapeList = (struct bc_tapeList *)0;
struct bc_tapeList *tle, *ptle, *ntle;
Index: openafs/src/budb/db_hash.c
diff -c openafs/src/budb/db_hash.c:1.8.14.2 openafs/src/budb/db_hash.c:1.8.14.3
*** openafs/src/budb/db_hash.c:1.8.14.2 Tue Oct 30 11:16:37 2007
--- openafs/src/budb/db_hash.c Mon Oct 27 19:41:45 2008
***************
*** 11,17 ****
#include
RCSID
! ("$Header: /cvs/openafs/src/budb/db_hash.c,v 1.8.14.2 2007/10/30 15:16:37 shadow Exp $");
#ifdef AFS_NT40_ENV
#include
--- 11,17 ----
#include
RCSID
! ("$Header: /cvs/openafs/src/budb/db_hash.c,v 1.8.14.3 2008/10/27 23:41:45 shadow Exp $");
#ifdef AFS_NT40_ENV
#include
***************
*** 266,272 ****
int n;
int i;
int length;
! dbadr ta;
if ((mht == 0)
|| ((ht = mht->ht) == 0)
--- 266,272 ----
int n;
int i;
int length;
! dbadr ta = NULL;
if ((mht == 0)
|| ((ht = mht->ht) == 0)
Index: openafs/src/butc/lwps.c
diff -c openafs/src/butc/lwps.c:1.14.4.5 openafs/src/butc/lwps.c:1.14.4.6
*** openafs/src/butc/lwps.c:1.14.4.5 Wed Apr 9 12:39:59 2008
--- openafs/src/butc/lwps.c Mon Oct 27 19:41:45 2008
***************
*** 11,17 ****
#include
RCSID
! ("$Header: /cvs/openafs/src/butc/lwps.c,v 1.14.4.5 2008/04/09 16:39:59 shadow Exp $");
#include
#include
--- 11,17 ----
#include
RCSID
! ("$Header: /cvs/openafs/src/butc/lwps.c,v 1.14.4.6 2008/10/27 23:41:45 shadow Exp $");
#include
#include
***************
*** 1245,1251 ****
{
afs_int32 curChunk;
afs_uint32 totalWritten = 0;
! afs_int32 code;
afs_int32 headBytes, tailBytes, w;
afs_int32 taskId;
afs_int32 nbytes; /* # bytes data in last tape block read */
--- 1245,1251 ----
{
afs_int32 curChunk;
afs_uint32 totalWritten = 0;
! afs_int32 code = 0;
afs_int32 headBytes, tailBytes, w;
afs_int32 taskId;
afs_int32 nbytes; /* # bytes data in last tape block read */
Index: openafs/src/butc/read_tape.c
diff -c openafs/src/butc/read_tape.c:1.7.14.3 openafs/src/butc/read_tape.c:1.7.14.4
*** openafs/src/butc/read_tape.c:1.7.14.3 Mon Nov 26 16:08:41 2007
--- openafs/src/butc/read_tape.c Mon Oct 27 19:41:45 2008
***************
*** 11,17 ****
#include
RCSID
! ("$Header: /cvs/openafs/src/butc/read_tape.c,v 1.7.14.3 2007/11/26 21:08:41 shadow Exp $");
#include
#include
--- 11,17 ----
#include
RCSID
! ("$Header: /cvs/openafs/src/butc/read_tape.c,v 1.7.14.4 2008/10/27 23:41:45 shadow Exp $");
#include
#include
***************
*** 285,291 ****
struct volumeHeader vh;
char trailer[12];
struct blockMark *bmark, *bmark2;
! char *data, *data2;
int count, count2;
int tlen, skip, pos;
--- 285,292 ----
struct volumeHeader vh;
char trailer[12];
struct blockMark *bmark, *bmark2;
! char *data;
! char *data2 = NULL;
int count, count2;
int tlen, skip, pos;
***************
*** 396,402 ****
char *data;
char *tblock;
afs_int32 code;
! struct volumeHeader *volheaderPtr;
int eod = 1;
int rc;
char *nextblock; /* We cycle through three tape blocks so we */
--- 397,403 ----
char *data;
char *tblock;
afs_int32 code;
! struct volumeHeader *volheaderPtr = NULL;
int eod = 1;
int rc;
char *nextblock; /* We cycle through three tape blocks so we */
Index: openafs/src/butc/tcprocs.c
diff -c openafs/src/butc/tcprocs.c:1.14.6.5 openafs/src/butc/tcprocs.c:1.14.6.6
*** openafs/src/butc/tcprocs.c:1.14.6.5 Mon Mar 10 18:32:33 2008
--- openafs/src/butc/tcprocs.c Mon Oct 27 19:41:45 2008
***************
*** 13,19 ****
#include
RCSID
! ("$Header: /cvs/openafs/src/butc/tcprocs.c,v 1.14.6.5 2008/03/10 22:32:33 shadow Exp $");
#include
#include
--- 13,19 ----
#include
RCSID
! ("$Header: /cvs/openafs/src/butc/tcprocs.c,v 1.14.6.6 2008/10/27 23:41:45 shadow Exp $");
#include
#include
***************
*** 572,578 ****
PROCESS pid;
#endif
struct scanTapeIf *ptr;
! statusP statusPtr;
afs_int32 code = 0;
extern afs_int32 allocTaskId();
--- 572,578 ----
PROCESS pid;
#endif
struct scanTapeIf *ptr;
! statusP statusPtr = NULL;
afs_int32 code = 0;
extern afs_int32 allocTaskId();
Index: openafs/src/butc/tcudbprocs.c
diff -c openafs/src/butc/tcudbprocs.c:1.15.6.7 openafs/src/butc/tcudbprocs.c:1.15.6.8
*** openafs/src/butc/tcudbprocs.c:1.15.6.7 Fri Apr 18 09:57:13 2008
--- openafs/src/butc/tcudbprocs.c Mon Oct 27 19:41:45 2008
***************
*** 11,17 ****
#include
RCSID
! ("$Header: /cvs/openafs/src/butc/tcudbprocs.c,v 1.15.6.7 2008/04/18 13:57:13 shadow Exp $");
#include
#ifdef AFS_NT40_ENV
--- 11,17 ----
#include
RCSID
! ("$Header: /cvs/openafs/src/butc/tcudbprocs.c,v 1.15.6.8 2008/10/27 23:41:45 shadow Exp $");
#include
#ifdef AFS_NT40_ENV
***************
*** 392,398 ****
char *writeBufPtr;
afs_int32 transferSize;
! char *readBufPtr;
afs_int32 maxReadSize;
charListT charList;
--- 392,398 ----
char *writeBufPtr;
afs_int32 transferSize;
! char *readBufPtr = NULL;
afs_int32 maxReadSize;
charListT charList;
Index: openafs/src/cf/fdsetsize.m4
diff -c /dev/null openafs/src/cf/fdsetsize.m4:1.1.2.3
*** /dev/null Sun Nov 9 00:08:13 2008
--- openafs/src/cf/fdsetsize.m4 Tue Oct 21 14:36:46 2008
***************
*** 0 ****
--- 1,106 ----
+ AC_DEFUN([FD_SET_OBEYS_FD_SETSIZE], [
+ AC_MSG_CHECKING(for default FD_SETSIZE)
+ AC_CACHE_VAL(ac_cv_default_fdsetsize,
+ [
+ AC_TRY_RUN(
+ changequote(<<, >>)dnl
+ <<
+ #include
+ #include
+ #include
+ #ifdef HAVE_SYS_SELECT_H
+ #include
+ #endif
+ int main(int argc, char *argv[])
+ {
+ FILE *fp;
+ int ac_cv_default_fdsetsize;
+ #if defined(FD_SETSIZE)
+ ac_cv_default_fdsetsize = FD_SETSIZE;
+ #else
+ ac_cv_default_fdsetsize = (sizeof(fd_set)*8);
+ #endif
+ if ((fp = fopen("conftestval", "w")) == NULL)
+ exit(1);
+ fprintf(fp, "%d\n", ac_cv_default_fdsetsize);
+ fclose(fp);
+ exit(0);
+ }
+ >>
+ changequote([, ])dnl
+ ,
+ ac_cv_default_fdsetsize=`cat conftestval`,
+ ac_cv_default_fdsetsize=-1,
+ ac_cv_default_fdsetsize=1024
+ )
+ AC_MSG_RESULT([$ac_cv_default_fdsetsize])
+ ])
+
+ AC_MSG_CHECKING(for default fd_set size)
+ AC_CACHE_VAL(ac_cv_default_fd_set_size,
+ [
+ AC_TRY_RUN(
+ changequote(<<, >>)dnl
+ <<
+ #include
+ #include
+ #include
+ #ifdef HAVE_SYS_SELECT_H
+ #include
+ #endif
+ int main(int argc, char *argv[])
+ {
+ FILE *fp;
+ int ac_cv_default_fd_set_size;
+ ac_cv_default_fd_set_size = (sizeof(fd_set));
+
+ if ((fp = fopen("conftestval", "w")) == NULL)
+ exit(1);
+ fprintf(fp, "%d\n", ac_cv_default_fd_set_size);
+ fclose(fp);
+ exit(0);
+ }
+ >>
+ changequote([, ])dnl
+ ,
+ ac_cv_default_fd_set_size=`cat conftestval`,
+ ac_cv_default_fd_set_size=-1,
+ ac_cv_default_fd_set_size=128
+ )
+ AC_MSG_RESULT([$ac_cv_default_fd_set_size])
+ ])
+
+ AC_MSG_CHECKING(for sizeof fd_set obeying FD_SETSIZE)
+ AC_CACHE_VAL(ac_cv_fd_set_size_obeys,
+ [
+ save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -DORIG_FD_SETSIZE=$ac_cv_default_fdsetsize -DORIG_fd_set_size=$ac_cv_default_fd_set_size"
+ AC_TRY_RUN([
+ #include
+ #include
+ #include
+ #if (ORIG_FD_SETSIZE < 2048)
+ #define FD_SETSIZE 2048
+ #define __FD_SETSIZE 2048
+ #else
+ #define FD_SETSIZE 1024
+ #define __FD_SETSIZE 1024
+ #endif
+ #ifdef HAVE_SYS_SELECT_H
+ #include
+ #endif
+ int main() {
+ if ((ORIG_fd_set_size < 0) || (ORIG_FD_SETSIZE < 0))
+ exit(1);
+ exit((sizeof(fd_set) == ORIG_fd_set_size) ? 1 : 0);
+ }
+ ],
+ ac_cv_fd_set_size_obeys=yes,
+ ac_cv_fd_set_size_obeys=no,
+ ac_cv_fd_set_size_obeys=yes)
+ CPPFLAGS=$save_CPPFLAGS
+ AC_MSG_RESULT([$ac_cv_fd_set_size_obeys])
+ ])
+
+ ])
+
Index: openafs/src/cf/linux-test1.m4
diff -c openafs/src/cf/linux-test1.m4:1.6.4.9 openafs/src/cf/linux-test1.m4:1.6.4.10
*** openafs/src/cf/linux-test1.m4:1.6.4.9 Mon Jan 7 13:33:15 2008
--- openafs/src/cf/linux-test1.m4 Sun Oct 12 14:02:19 2008
***************
*** 27,34 ****
MODULE_LICENSE("http://www.openafs.org/dl/license10.html");
_ACEOF
! echo make -C $LINUX_KERNEL_PATH M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&AS_MESSAGE_LOG_FD &&
! make -C $LINUX_KERNEL_PATH M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&AS_MESSAGE_LOG_FD 2>conftest.err &&
! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then [$3]
else
--- 27,34 ----
MODULE_LICENSE("http://www.openafs.org/dl/license10.html");
_ACEOF
! echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&AS_MESSAGE_LOG_FD &&
! make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&AS_MESSAGE_LOG_FD 2>conftest.err &&
! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
then [$3]
else
Index: openafs/src/cf/linux-test4.m4
diff -c openafs/src/cf/linux-test4.m4:1.29.2.45 openafs/src/cf/linux-test4.m4:1.29.2.47
*** openafs/src/cf/linux-test4.m4:1.29.2.45 Sat Aug 16 15:42:58 2008
--- openafs/src/cf/linux-test4.m4 Sat Nov 8 11:49:43 2008
***************
*** 1092,1094 ****
--- 1092,1119 ----
AC_DEFINE([LINUX_SEMAPHORE_H], 1, [define if linux/semaphore.h exists])
fi])
+ AC_DEFUN([LINUX_HAVE_BDI_INIT], [
+ AC_MSG_CHECKING([for linux bdi_init()])
+ AC_CACHE_VAL([ac_cv_linux_bdi_init], [
+ AC_TRY_KBUILD(
+ [#include ],
+ [bdi_init(NULL);],
+ ac_cv_linux_bdi_init=yes,
+ ac_cv_linux_bdi_init=no)])
+ AC_MSG_RESULT($ac_cv_linux_bdi_init)
+ if test "x$ac_cv_linux_bdi_init" = "xyes"; then
+ AC_DEFINE([HAVE_BDI_INIT], 1, [define if your kernel has a bdi_init()])
+ fi])
+
+ AC_DEFUN([LINUX_HAVE_WRITE_BEGIN_AOP], [
+ AC_MSG_CHECKING([for linux write_begin() address space op])
+ AC_CACHE_VAL([ac_cv_linux_write_begin], [
+ AC_TRY_KBUILD(
+ [#include ],
+ [simple_write_begin(NULL, NULL, 0, 0, 0, NULL, NULL);],
+ ac_cv_linux_write_begin=yes,
+ ac_cv_linux_write_begin=no)])
+ AC_MSG_RESULT($ac_cv_linux_write_begin)
+ if test "x$ac_cv_linux_write_begin" = "xyes"; then
+ AC_DEFINE([HAVE_WRITE_BEGIN], 1, [define if your kernel has a write_begin() address space op])
+ fi])
Index: openafs/src/cf/linux-test5.m4
diff -c openafs/src/cf/linux-test5.m4:1.3 openafs/src/cf/linux-test5.m4:1.3.14.1
*** openafs/src/cf/linux-test5.m4:1.3 Thu Jun 3 01:13:30 2004
--- openafs/src/cf/linux-test5.m4 Mon Oct 20 08:35:16 2008
***************
*** 3,16 ****
AC_MSG_CHECKING(if $CC accepts -march=pentium)
save_CFLAGS="$CFLAGS"
CFLAGS="-MARCH=pentium"
! AC_CACHE_VAL(openafs_gcc_supports_march,[
AC_TRY_COMPILE(
[],
[int x;],
! openafs_gcc_supports_march=yes,
! openafs_gcc_supports_march=no)])
! AC_MSG_RESULT($openafs_gcc_supports_march)
! if test x$openafs_gcc_supports_march = xyes; then
P5PLUS_KOPTS="-march=pentium"
else
P5PLUS_KOPTS="-m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2"
--- 3,16 ----
AC_MSG_CHECKING(if $CC accepts -march=pentium)
save_CFLAGS="$CFLAGS"
CFLAGS="-MARCH=pentium"
! AC_CACHE_VAL(openafs_cv_gcc_supports_march,[
AC_TRY_COMPILE(
[],
[int x;],
! openafs_cv_gcc_supports_march=yes,
! openafs_cv_gcc_supports_march=no)])
! AC_MSG_RESULT($openafs_cv_gcc_supports_march)
! if test x$openafs_cv_gcc_supports_march = xyes; then
P5PLUS_KOPTS="-march=pentium"
else
P5PLUS_KOPTS="-m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2"
***************
*** 22,35 ****
AC_MSG_CHECKING(if $CC needs -fno-strict-aliasing)
save_CFLAGS="$CFLAGS"
CFLAGS="-fno-strict-aliasing"
! AC_CACHE_VAL(openafs_gcc_needs_no_strict_aliasing,[
AC_TRY_COMPILE(
[],
[int x;],
! openafs_gcc_needs_no_strict_aliasing=yes,
! openafs_gcc_needs_no_strict_aliasing=no)])
! AC_MSG_RESULT($openafs_gcc_needs_no_strict_aliasing)
! if test x$openafs_gcc_needs_no_strict_aliasing = xyes; then
LINUX_GCC_KOPTS="$LINUX_GCC_KOPTS -fno-strict-aliasing"
fi
CFLAGS="$save_CFLAGS"
--- 22,35 ----
AC_MSG_CHECKING(if $CC needs -fno-strict-aliasing)
save_CFLAGS="$CFLAGS"
CFLAGS="-fno-strict-aliasing"
! AC_CACHE_VAL(openafs_cv_gcc_needs_no_strict_aliasing,[
AC_TRY_COMPILE(
[],
[int x;],
! openafs_cv_gcc_needs_no_strict_aliasing=yes,
! openafs_cv_gcc_needs_no_strict_aliasing=no)])
! AC_MSG_RESULT($openafs_cv_gcc_needs_no_strict_aliasing)
! if test x$openafs_cv_gcc_needs_no_strict_aliasing = xyes; then
LINUX_GCC_KOPTS="$LINUX_GCC_KOPTS -fno-strict-aliasing"
fi
CFLAGS="$save_CFLAGS"
***************
*** 39,52 ****
AC_MSG_CHECKING(if $CC needs -fno-strength-reduce)
save_CFLAGS="$CFLAGS"
CFLAGS="-fno-strength-reduce"
! AC_CACHE_VAL(openafs_gcc_needs_no_strength_reduce,[
AC_TRY_COMPILE(
[],
[int x;],
! openafs_gcc_needs_no_strength_reduce=yes,
! openafs_gcc_needs_no_strength_reduce=no)])
! AC_MSG_RESULT($openafs_gcc_needs_no_strength_reduce)
! if test x$openafs_gcc_needs_no_strength_reduce = xyes; then
LINUX_GCC_KOPTS="$LINUX_GCC_KOPTS -fno-strength-reduce"
fi
CFLAGS="$save_CFLAGS"
--- 39,52 ----
AC_MSG_CHECKING(if $CC needs -fno-strength-reduce)
save_CFLAGS="$CFLAGS"
CFLAGS="-fno-strength-reduce"
! AC_CACHE_VAL(openafs_cv_gcc_needs_no_strength_reduce,[
AC_TRY_COMPILE(
[],
[int x;],
! openafs_cv_gcc_needs_no_strength_reduce=yes,
! openafs_cv_gcc_needs_no_strength_reduce=no)])
! AC_MSG_RESULT($openafs_cv_gcc_needs_no_strength_reduce)
! if test x$openafs_cv_gcc_needs_no_strength_reduce = xyes; then
LINUX_GCC_KOPTS="$LINUX_GCC_KOPTS -fno-strength-reduce"
fi
CFLAGS="$save_CFLAGS"
***************
*** 56,69 ****
AC_MSG_CHECKING(if $CC supports -fno-common)
save_CFLAGS="$CFLAGS"
CFLAGS="-fno-common"
! AC_CACHE_VAL(openafs_gcc_supports_no_common,[
AC_TRY_COMPILE(
[],
[int x;],
! openafs_gcc_supports_no_common=yes,
! openafs_gcc_supports_no_common=no)])
! AC_MSG_RESULT($openafs_gcc_supports_no_common)
! if test x$openafs_gcc_supports_no_common = xyes; then
LINUX_GCC_KOPTS="$LINUX_GCC_KOPTS -fno-common"
fi
CFLAGS="$save_CFLAGS"
--- 56,69 ----
AC_MSG_CHECKING(if $CC supports -fno-common)
save_CFLAGS="$CFLAGS"
CFLAGS="-fno-common"
! AC_CACHE_VAL(openafs_cv_gcc_supports_no_common,[
AC_TRY_COMPILE(
[],
[int x;],
! openafs_cv_gcc_supports_no_common=yes,
! openafs_cv_gcc_supports_no_common=no)])
! AC_MSG_RESULT($openafs_cv_gcc_supports_no_common)
! if test x$openafs_cv_gcc_supports_no_common = xyes; then
LINUX_GCC_KOPTS="$LINUX_GCC_KOPTS -fno-common"
fi
CFLAGS="$save_CFLAGS"
***************
*** 73,86 ****
AC_MSG_CHECKING(if $CC supports -pipe)
save_CFLAGS="$CFLAGS"
CFLAGS="-pipe"
! AC_CACHE_VAL(openafs_gcc_supports_pipe,[
AC_TRY_COMPILE(
[],
[int x;],
! openafs_gcc_supports_pipe=yes,
! openafs_gcc_supports_pipe=no)])
! AC_MSG_RESULT($openafs_gcc_supports_pipe)
! if test x$openafs_gcc_supports_pipe = xyes; then
LINUX_GCC_KOPTS="$LINUX_GCC_KOPTS -pipe"
fi
CFLAGS="$save_CFLAGS"
--- 73,86 ----
AC_MSG_CHECKING(if $CC supports -pipe)
save_CFLAGS="$CFLAGS"
CFLAGS="-pipe"
! AC_CACHE_VAL(openafs_cv_gcc_supports_pipe,[
AC_TRY_COMPILE(
[],
[int x;],
! openafs_cv_gcc_supports_pipe=yes,
! openafs_cv_gcc_supports_pipe=no)])
! AC_MSG_RESULT($openafs_cv_gcc_supports_pipe)
! if test x$openafs_cv_gcc_supports_pipe = xyes; then
LINUX_GCC_KOPTS="$LINUX_GCC_KOPTS -pipe"
fi
CFLAGS="$save_CFLAGS"
Index: openafs/src/config/Makefile.config.in
diff -c openafs/src/config/Makefile.config.in:1.12.2.4 openafs/src/config/Makefile.config.in:1.12.2.5
*** openafs/src/config/Makefile.config.in:1.12.2.4 Tue Jul 1 18:51:54 2008
--- openafs/src/config/Makefile.config.in Sun Oct 12 14:02:19 2008
***************
*** 48,53 ****
--- 48,54 ----
LIB_AFSDB = @LIB_AFSDB@
LIBS = @LIBS@
LINUX_KERNEL_PATH = @LINUX_KERNEL_PATH@
+ LINUX_KERNEL_BUILD = @LINUX_KERNEL_BUILD@
LINUX_LIBAFS_NAME=@LINUX_LIBAFS_NAME@
LINUX_KERNEL_PACKAGING=@LINUX_KERNEL_PACKAGING@
LINUX_VERSION = @LINUX_VERSION@
Index: openafs/src/config/NTMakefile.amd64_w2k
diff -c openafs/src/config/NTMakefile.amd64_w2k:1.24.2.49 openafs/src/config/NTMakefile.amd64_w2k:1.24.2.50
*** openafs/src/config/NTMakefile.amd64_w2k:1.24.2.49 Tue Oct 7 17:56:55 2008
--- openafs/src/config/NTMakefile.amd64_w2k Fri Nov 7 21:08:36 2008
***************
*** 84,90 ****
#define used in WinNT/2000 installation and program version display
AFSPRODUCT_VER_MAJOR=1
AFSPRODUCT_VER_MINOR=5
! AFSPRODUCT_VER_PATCH=5400
AFSPRODUCT_VER_BUILD=0
AFSPRODUCT_VERSION=$(AFSPRODUCT_VER_MAJOR).$(AFSPRODUCT_VER_MINOR).$(AFSPRODUCT_VER_PATCH)
--- 84,90 ----
#define used in WinNT/2000 installation and program version display
AFSPRODUCT_VER_MAJOR=1
AFSPRODUCT_VER_MINOR=5
! AFSPRODUCT_VER_PATCH=5500
AFSPRODUCT_VER_BUILD=0
AFSPRODUCT_VERSION=$(AFSPRODUCT_VER_MAJOR).$(AFSPRODUCT_VER_MINOR).$(AFSPRODUCT_VER_PATCH)
Index: openafs/src/config/NTMakefile.i386_nt40
diff -c openafs/src/config/NTMakefile.i386_nt40:1.84.2.47 openafs/src/config/NTMakefile.i386_nt40:1.84.2.48
*** openafs/src/config/NTMakefile.i386_nt40:1.84.2.47 Tue Oct 7 17:56:55 2008
--- openafs/src/config/NTMakefile.i386_nt40 Fri Nov 7 21:08:36 2008
***************
*** 84,90 ****
#define used in WinNT/2000 installation and program version display
AFSPRODUCT_VER_MAJOR=1
AFSPRODUCT_VER_MINOR=5
! AFSPRODUCT_VER_PATCH=5400
AFSPRODUCT_VER_BUILD=0
AFSPRODUCT_VERSION=$(AFSPRODUCT_VER_MAJOR).$(AFSPRODUCT_VER_MINOR).$(AFSPRODUCT_VER_PATCH)
--- 84,90 ----
#define used in WinNT/2000 installation and program version display
AFSPRODUCT_VER_MAJOR=1
AFSPRODUCT_VER_MINOR=5
! AFSPRODUCT_VER_PATCH=5500
AFSPRODUCT_VER_BUILD=0
AFSPRODUCT_VERSION=$(AFSPRODUCT_VER_MAJOR).$(AFSPRODUCT_VER_MINOR).$(AFSPRODUCT_VER_PATCH)
Index: openafs/src/config/NTMakefile.i386_w2k
diff -c openafs/src/config/NTMakefile.i386_w2k:1.23.2.51 openafs/src/config/NTMakefile.i386_w2k:1.23.2.52
*** openafs/src/config/NTMakefile.i386_w2k:1.23.2.51 Tue Oct 7 17:56:55 2008
--- openafs/src/config/NTMakefile.i386_w2k Fri Nov 7 21:08:36 2008
***************
*** 88,94 ****
#define used in WinNT/2000 installation and program version display
AFSPRODUCT_VER_MAJOR=1
AFSPRODUCT_VER_MINOR=5
! AFSPRODUCT_VER_PATCH=5400
AFSPRODUCT_VER_BUILD=0
AFSPRODUCT_VERSION=$(AFSPRODUCT_VER_MAJOR).$(AFSPRODUCT_VER_MINOR).$(AFSPRODUCT_VER_PATCH)
--- 88,94 ----
#define used in WinNT/2000 installation and program version display
AFSPRODUCT_VER_MAJOR=1
AFSPRODUCT_VER_MINOR=5
! AFSPRODUCT_VER_PATCH=5500
AFSPRODUCT_VER_BUILD=0
AFSPRODUCT_VERSION=$(AFSPRODUCT_VER_MAJOR).$(AFSPRODUCT_VER_MINOR).$(AFSPRODUCT_VER_PATCH)
Index: openafs/src/kauth/kalocalcell.c
diff -c openafs/src/kauth/kalocalcell.c:1.9.8.1 openafs/src/kauth/kalocalcell.c:1.9.8.2
*** openafs/src/kauth/kalocalcell.c:1.9.8.1 Tue Oct 30 11:16:39 2007
--- openafs/src/kauth/kalocalcell.c Mon Oct 27 19:53:46 2008
***************
*** 15,21 ****
#endif
RCSID
! ("$Header: /cvs/openafs/src/kauth/kalocalcell.c,v 1.9.8.1 2007/10/30 15:16:39 shadow Exp $");
#if defined(UKERNEL)
#include "afs/pthread_glock.h"
--- 15,21 ----
#endif
RCSID
! ("$Header: /cvs/openafs/src/kauth/kalocalcell.c,v 1.9.8.2 2008/10/27 23:53:46 shadow Exp $");
#if defined(UKERNEL)
#include "afs/pthread_glock.h"
***************
*** 79,85 ****
char *
ka_LocalCell(void)
{
! int code;
LOCK_GLOBAL_MUTEX;
if (conf) {
--- 79,85 ----
char *
ka_LocalCell(void)
{
! int code = 0;
LOCK_GLOBAL_MUTEX;
if (conf) {
Index: openafs/src/kauth/knfs.c
diff -c openafs/src/kauth/knfs.c:1.8.14.2 openafs/src/kauth/knfs.c:1.8.14.3
*** openafs/src/kauth/knfs.c:1.8.14.2 Wed Oct 31 00:09:30 2007
--- openafs/src/kauth/knfs.c Mon Oct 27 19:41:45 2008
***************
*** 15,21 ****
#include
RCSID
! ("$Header: /cvs/openafs/src/kauth/knfs.c,v 1.8.14.2 2007/10/31 04:09:30 shadow Exp $");
#include
#include
--- 15,21 ----
#include
RCSID
! ("$Header: /cvs/openafs/src/kauth/knfs.c,v 1.8.14.3 2008/10/27 23:41:45 shadow Exp $");
#include
#include
***************
*** 103,109 ****
struct ViceIoctl iob;
afs_int32 pheader[6];
char tbuffer[1024];
! register afs_int32 code;
int index, newIndex;
char *stp; /* secret token ptr */
struct ClearToken ct;
--- 103,109 ----
struct ViceIoctl iob;
afs_int32 pheader[6];
char tbuffer[1024];
! afs_int32 code = 0;
int index, newIndex;
char *stp; /* secret token ptr */
struct ClearToken ct;
Index: openafs/src/kauth/kpwvalid.c
diff -c openafs/src/kauth/kpwvalid.c:1.6.14.2 openafs/src/kauth/kpwvalid.c:1.6.14.3
*** openafs/src/kauth/kpwvalid.c:1.6.14.2 Mon Nov 26 16:08:42 2007
--- openafs/src/kauth/kpwvalid.c Mon Oct 27 19:53:46 2008
***************
*** 11,17 ****
#include
RCSID
! ("$Header: /cvs/openafs/src/kauth/kpwvalid.c,v 1.6.14.2 2007/11/26 21:08:42 shadow Exp $");
#include
#include
--- 11,17 ----
#include
RCSID
! ("$Header: /cvs/openafs/src/kauth/kpwvalid.c,v 1.6.14.3 2008/10/27 23:53:46 shadow Exp $");
#include
#include
***************
*** 27,33 ****
{
char oldpassword[512];
char password[512];
! int rc;
if (fgets(oldpassword, 512, stdin))
while (fgets(password, 512, stdin)) {
--- 27,33 ----
{
char oldpassword[512];
char password[512];
! int rc = 1;
if (fgets(oldpassword, 512, stdin))
while (fgets(password, 512, stdin)) {
Index: openafs/src/libadmin/cfg/cfgdb.c
diff -c openafs/src/libadmin/cfg/cfgdb.c:1.6 openafs/src/libadmin/cfg/cfgdb.c:1.6.14.1
*** openafs/src/libadmin/cfg/cfgdb.c:1.6 Fri Apr 2 01:54:05 2004
--- openafs/src/libadmin/cfg/cfgdb.c Mon Oct 27 19:41:45 2008
***************
*** 15,21 ****
#include
RCSID
! ("$Header: /cvs/openafs/src/libadmin/cfg/cfgdb.c,v 1.6 2004/04/02 06:54:05 jaltman Exp $");
#include
--- 15,21 ----
#include
RCSID
! ("$Header: /cvs/openafs/src/libadmin/cfg/cfgdb.c,v 1.6.14.1 2008/10/27 23:41:45 shadow Exp $");
#include
***************
*** 233,239 ****
void *bosHandle;
char dbhostName[MAXHOSTSPERCELL][BOS_MAX_NAME_LEN];
char dbhostCell[BOS_MAX_NAME_LEN];
! int dbhostCount;
if (!afsclient_NullCellOpen(&cellHandle, &tst2)) {
tst = tst2;
--- 233,239 ----
void *bosHandle;
char dbhostName[MAXHOSTSPERCELL][BOS_MAX_NAME_LEN];
char dbhostCell[BOS_MAX_NAME_LEN];
! int dbhostCount = 0;
if (!afsclient_NullCellOpen(&cellHandle, &tst2)) {
tst = tst2;
***************
*** 488,494 ****
free(ctrlBlockp);
} else {
/* fill name blocks, handing each to a worker thread */
! void *nameBlockIter;
short workersStarted = 0;
if (!NameBlockGetBegin
--- 488,494 ----
free(ctrlBlockp);
} else {
/* fill name blocks, handing each to a worker thread */
! void *nameBlockIter = NULL;
short workersStarted = 0;
if (!NameBlockGetBegin
Index: openafs/src/libadmin/cfg/cfghost.c
diff -c openafs/src/libadmin/cfg/cfghost.c:1.6 openafs/src/libadmin/cfg/cfghost.c:1.6.14.1
*** openafs/src/libadmin/cfg/cfghost.c:1.6 Fri Apr 2 01:54:05 2004
--- openafs/src/libadmin/cfg/cfghost.c Mon Oct 27 19:41:45 2008
***************
*** 15,21 ****
#include
RCSID
! ("$Header: /cvs/openafs/src/libadmin/cfg/cfghost.c,v 1.6 2004/04/02 06:54:05 jaltman Exp $");
#include
--- 15,21 ----
#include
RCSID
! ("$Header: /cvs/openafs/src/libadmin/cfg/cfghost.c,v 1.6.14.1 2008/10/27 23:41:45 shadow Exp $");
#include
***************
*** 502,508 ****
if (tst == 0) {
kas_identity_t afsIdentity;
kas_encryptionKey_t afsKey;
! int afsKvno;
strcpy(afsIdentity.principal, "afs");
afsIdentity.instance[0] = '\0';
--- 502,508 ----
if (tst == 0) {
kas_identity_t afsIdentity;
kas_encryptionKey_t afsKey;
! int afsKvno = 0;
strcpy(afsIdentity.principal, "afs");
afsIdentity.instance[0] = '\0';
Index: openafs/src/libadmin/cfg/cfgservers.c
diff -c openafs/src/libadmin/cfg/cfgservers.c:1.6 openafs/src/libadmin/cfg/cfgservers.c:1.6.14.1
*** openafs/src/libadmin/cfg/cfgservers.c:1.6 Fri Apr 2 01:54:05 2004
--- openafs/src/libadmin/cfg/cfgservers.c Mon Oct 27 19:41:45 2008
***************
*** 19,25 ****
#include
RCSID
! ("$Header: /cvs/openafs/src/libadmin/cfg/cfgservers.c,v 1.6 2004/04/02 06:54:05 jaltman Exp $");
#include
--- 19,25 ----
#include
RCSID
! ("$Header: /cvs/openafs/src/libadmin/cfg/cfgservers.c,v 1.6.14.1 2008/10/27 23:41:45 shadow Exp $");
#include
***************
*** 1938,1944 ****
if (dirp != NULL) {
/* check that not a portition of a larger path */
! char oneBefore, oneAfter, twoAfter;
oneBefore = *(dirp - 1);
oneAfter = *(dirp + sizeof(AFSDIR_CANONICAL_SERVER_ETC_DIRPATH) - 1);
--- 1938,1945 ----
if (dirp != NULL) {
/* check that not a portition of a larger path */
! char oneBefore, oneAfter;
! char twoAfter = 0;
oneBefore = *(dirp - 1);
oneAfter = *(dirp + sizeof(AFSDIR_CANONICAL_SERVER_ETC_DIRPATH) - 1);
***************
*** 1962,1968 ****
if (dirp != NULL) {
/* check that not a portition of a larger path */
! char oneBefore, oneAfter, twoAfter;
oneBefore = *(dirp - 1);
oneAfter = *(dirp + sizeof(AFSDIR_CANONICAL_SERVER_BIN_DIRPATH) - 1);
--- 1963,1970 ----
if (dirp != NULL) {
/* check that not a portition of a larger path */
! char oneBefore, oneAfter;
! char twoAfter = 0;
oneBefore = *(dirp - 1);
oneAfter = *(dirp + sizeof(AFSDIR_CANONICAL_SERVER_BIN_DIRPATH) - 1);
***************
*** 2041,2047 ****
tst = tst2;
dbhostDone = 1;
} else {
! short isSyncSite, isWriteReady;
/* ignore errors fetching Ubik vote status; there might be
* an unreachable dbserver yet a reachable sync site.
--- 2043,2050 ----
tst = tst2;
dbhostDone = 1;
} else {
! short isSyncSite = 0;
! short isWriteReady = 0;
/* ignore errors fetching Ubik vote status; there might be
* an unreachable dbserver yet a reachable sync site.
Index: openafs/src/libadmin/client/afs_clientAdmin.c
diff -c openafs/src/libadmin/client/afs_clientAdmin.c:1.11.4.3 openafs/src/libadmin/client/afs_clientAdmin.c:1.11.4.4
*** openafs/src/libadmin/client/afs_clientAdmin.c:1.11.4.3 Thu Feb 28 20:27:57 2008
--- openafs/src/libadmin/client/afs_clientAdmin.c Mon Oct 27 19:41:46 2008
***************
*** 11,17 ****
#include
RCSID
! ("$Header: /cvs/openafs/src/libadmin/client/afs_clientAdmin.c,v 1.11.4.3 2008/02/29 01:27:57 jaltman Exp $");
#include
#include "afs_clientAdmin.h"
--- 11,17 ----
#include
RCSID
! ("$Header: /cvs/openafs/src/libadmin/client/afs_clientAdmin.c,v 1.11.4.4 2008/10/27 23:41:46 shadow Exp $");
#include
#include "afs_clientAdmin.h"
***************
*** 1835,1841 ****
(afs_admin_iterator_p) malloc(sizeof(afs_admin_iterator_t));
server_get_p serv = (server_get_p) calloc(1, sizeof(server_get_t));
server_get_p serv_cache = NULL;
! const char *cellName;
void *database_iter;
util_databaseServerEntry_t database_entry;
void *fileserver_iter;
--- 1835,1841 ----
(afs_admin_iterator_p) malloc(sizeof(afs_admin_iterator_t));
server_get_p serv = (server_get_p) calloc(1, sizeof(server_get_t));
server_get_p serv_cache = NULL;
! const char *cellName = NULL;
void *database_iter;
util_databaseServerEntry_t database_entry;
void *fileserver_iter;
Index: openafs/src/libadmin/test/bos.c
diff -c openafs/src/libadmin/test/bos.c:1.10.14.1 openafs/src/libadmin/test/bos.c:1.10.14.2
*** openafs/src/libadmin/test/bos.c:1.10.14.1 Wed Oct 31 00:09:31 2007
--- openafs/src/libadmin/test/bos.c Mon Oct 27 19:41:46 2008
***************
*** 15,21 ****
#include
RCSID
! ("$Header: /cvs/openafs/src/libadmin/test/bos.c,v 1.10.14.1 2007/10/31 04:09:31 shadow Exp $");
#include "bos.h"
--- 15,21 ----
#include
RCSID
! ("$Header: /cvs/openafs/src/libadmin/test/bos.c,v 1.10.14.2 2008/10/27 23:41:46 shadow Exp $");
#include "bos.h"
***************
*** 88,94 ****
LocalParseLine(char *aline, struct token **alist)
{
char tbuffer[256];
! register char *tptr;
int inToken;
struct token *first, *last;
register struct token *ttok;
--- 88,94 ----
LocalParseLine(char *aline, struct token **alist)
{
char tbuffer[256];
! char *tptr = NULL;
int inToken;
struct token *first, *last;
register struct token *ttok;
***************
*** 481,487 ****
const char *process = NULL;
int stop = 0;
int run = 0;
! bos_ProcessExecutionState_t state;
if (as->parms[SERVER].items) {
if (!bos_ServerOpen
--- 481,487 ----
const char *process = NULL;
int stop = 0;
int run = 0;
! bos_ProcessExecutionState_t state = 0;
if (as->parms[SERVER].items) {
if (!bos_ServerOpen
***************
*** 532,538 ****
const char *process = NULL;
int stop = 0;
int run = 0;
! bos_ProcessExecutionState_t state;
if (as->parms[SERVER].items) {
if (!bos_ServerOpen
--- 532,538 ----
const char *process = NULL;
int stop = 0;
int run = 0;
! bos_ProcessExecutionState_t state = 0;
if (as->parms[SERVER].items) {
if (!bos_ServerOpen
***************
*** 926,932 ****
typedef enum { SERVER, ADMIN } DoBosAdminCreate_parm_t;
afs_status_t st = 0;
void *bos_server = NULL;
! const char *admin;
if (as->parms[SERVER].items) {
if (!bos_ServerOpen
--- 926,932 ----
typedef enum { SERVER, ADMIN } DoBosAdminCreate_parm_t;
afs_status_t st = 0;
void *bos_server = NULL;
! const char *admin = NULL;
if (as->parms[SERVER].items) {
if (!bos_ServerOpen
***************
*** 954,960 ****
typedef enum { SERVER, ADMIN } DoBosAdminDelete_parm_t;
afs_status_t st = 0;
void *bos_server = NULL;
! const char *admin;
if (as->parms[SERVER].items) {
if (!bos_ServerOpen
--- 954,960 ----
typedef enum { SERVER, ADMIN } DoBosAdminDelete_parm_t;
afs_status_t st = 0;
void *bos_server = NULL;
! const char *admin = NULL;
if (as->parms[SERVER].items) {
if (!bos_ServerOpen
***************
*** 1021,1027 ****
typedef enum { SERVER, VERSIONNUMBER, KEY } DoBosKeyCreate_parm_t;
afs_status_t st = 0;
void *bos_server = NULL;
! int version_number;
kas_encryptionKey_t key = { {0, 0, 0, 0, 0, 0, 0, 0} };
const char *cell;
--- 1021,1027 ----
typedef enum { SERVER, VERSIONNUMBER, KEY } DoBosKeyCreate_parm_t;
afs_status_t st = 0;
void *bos_server = NULL;
! int version_number = 0;
kas_encryptionKey_t key = { {0, 0, 0, 0, 0, 0, 0, 0} };
const char *cell;
***************
*** 1063,1069 ****
typedef enum { SERVER, VERSIONNUMBER } DoBosKeyDelete_parm_t;
afs_status_t st = 0;
void *bos_server = NULL;
! int version_number;
if (as->parms[SERVER].items) {
if (!bos_ServerOpen
--- 1063,1069 ----
typedef enum { SERVER, VERSIONNUMBER } DoBosKeyDelete_parm_t;
afs_status_t st = 0;
void *bos_server = NULL;
! int version_number = 0;
if (as->parms[SERVER].items) {
if (!bos_ServerOpen
***************
*** 1150,1156 ****
typedef enum { SERVER, CELL } DoBosCellSet_parm_t;
afs_status_t st = 0;
void *bos_server = NULL;
! const char *cell;
if (as->parms[SERVER].items) {
if (!bos_ServerOpen
--- 1150,1156 ----
typedef enum { SERVER, CELL } DoBosCellSet_parm_t;
afs_status_t st = 0;
void *bos_server = NULL;
! const char *cell = NULL;
if (as->parms[SERVER].items) {
if (!bos_ServerOpen
***************
*** 1204,1210 ****
typedef enum { SERVER, HOST } DoBosHostCreate_parm_t;
afs_status_t st = 0;
void *bos_server = NULL;
! const char *host;
if (as->parms[SERVER].items) {
if (!bos_ServerOpen
--- 1204,1210 ----
typedef enum { SERVER, HOST } DoBosHostCreate_parm_t;
afs_status_t st = 0;
void *bos_server = NULL;
! const char *host = NULL;
if (as->parms[SERVER].items) {
if (!bos_ServerOpen
***************
*** 1232,1238 ****
typedef enum { SERVER, HOST } DoBosHostDelete_parm_t;
afs_status_t st = 0;
void *bos_server = NULL;
! const char *host;
if (as->parms[SERVER].items) {
if (!bos_ServerOpen
--- 1232,1238 ----
typedef enum { SERVER, HOST } DoBosHostDelete_parm_t;
afs_status_t st = 0;
void *bos_server = NULL;
! const char *host = NULL;
if (as->parms[SERVER].items) {
if (!bos_ServerOpen
***************
*** 1435,1441 ****
} DoBosExecutableRestartTimeSet_parm_t;
afs_status_t st = 0;
void *bos_server = NULL;
! bos_Restart_t type;
int have_daily = 0;
int have_weekly = 0;
bos_RestartTime_t time;
--- 1435,1441 ----
} DoBosExecutableRestartTimeSet_parm_t;
afs_status_t st = 0;
void *bos_server = NULL;
! bos_Restart_t type = 0;
int have_daily = 0;
int have_weekly = 0;
bos_RestartTime_t time;
***************
*** 1534,1540 ****
} DoBosExecutableRestartTimeGet_parm_t;
afs_status_t st = 0;
void *bos_server = NULL;
! bos_Restart_t type;
int have_daily = 0;
int have_weekly = 0;
bos_RestartTime_t restart_time;
--- 1534,1540 ----
} DoBosExecutableRestartTimeGet_parm_t;
afs_status_t st = 0;
void *bos_server = NULL;
! bos_Restart_t type = 0;
int have_daily = 0;
int have_weekly = 0;
bos_RestartTime_t restart_time;
***************
*** 1583,1589 ****
typedef enum { SERVER, LOGFILE } DoBosLogGet_parm_t;
afs_status_t st = 0;
void *bos_server = NULL;
! const char *log_file;
unsigned long buf_size = INITIAL_BUF_SIZE;
char *buf = NULL;
--- 1583,1589 ----
typedef enum { SERVER, LOGFILE } DoBosLogGet_parm_t;
afs_status_t st = 0;
void *bos_server = NULL;
! const char *log_file = NULL;
unsigned long buf_size = INITIAL_BUF_SIZE;
char *buf = NULL;
***************
*** 1631,1637 ****
typedef enum { SERVER, REQUIREAUTH, DISABLEAUTH } DoBosAuthSet_parm_t;
afs_status_t st = 0;
void *bos_server = NULL;
! bos_Auth_t auth;
int have_req = 0;
int have_dis = 0;
--- 1631,1637 ----
typedef enum { SERVER, REQUIREAUTH, DISABLEAUTH } DoBosAuthSet_parm_t;
afs_status_t st = 0;
void *bos_server = NULL;
! bos_Auth_t auth = 0;
int have_req = 0;
int have_dis = 0;
***************
*** 1675,1681 ****
typedef enum { SERVER, COMMAND } DoBosCommandExecute_parm_t;
afs_status_t st = 0;
void *bos_server = NULL;
! const char *command;
if (as->parms[SERVER].items) {
if (!bos_ServerOpen
--- 1675,1681 ----
typedef enum { SERVER, COMMAND } DoBosCommandExecute_parm_t;
afs_status_t st = 0;
void *bos_server = NULL;
! const char *command = NULL;
if (as->parms[SERVER].items) {
if (!bos_ServerOpen
Index: openafs/src/libadmin/test/client.c
diff -c openafs/src/libadmin/test/client.c:1.8.14.1 openafs/src/libadmin/test/client.c:1.8.14.2
*** openafs/src/libadmin/test/client.c:1.8.14.1 Wed Oct 31 00:09:31 2007
--- openafs/src/libadmin/test/client.c Mon Oct 27 19:41:46 2008
***************
*** 15,21 ****
#include
RCSID
! ("$Header: /cvs/openafs/src/libadmin/test/client.c,v 1.8.14.1 2007/10/31 04:09:31 shadow Exp $");
#include "client.h"
#include
--- 15,21 ----
#include
RCSID
! ("$Header: /cvs/openafs/src/libadmin/test/client.c,v 1.8.14.2 2008/10/27 23:41:46 shadow Exp $");
#include "client.h"
#include
***************
*** 283,290 ****
CHECK
} DoClientMountPointCreate_parm_t;
afs_status_t st = 0;
! const char *directory;
! const char *volume;
vol_type_t vol_type = READ_ONLY;
vol_check_t vol_check = DONT_CHECK_VOLUME;
--- 283,290 ----
CHECK
} DoClientMountPointCreate_parm_t;
afs_status_t st = 0;
! const char *directory = NULL;
! const char *volume = NULL;
vol_type_t vol_type = READ_ONLY;
vol_check_t vol_check = DONT_CHECK_VOLUME;
***************
*** 335,341 ****
{
typedef enum { SERVER } DoClientAFSServerGet_parm_t;
afs_status_t st = 0;
! const char *server;
afs_serverEntry_t entry;
if (as->parms[SERVER].items) {
--- 335,341 ----
{
typedef enum { SERVER } DoClientAFSServerGet_parm_t;
afs_status_t st = 0;
! const char *server = NULL;
afs_serverEntry_t entry;
if (as->parms[SERVER].items) {
***************
*** 486,493 ****
int servAddr = 0;
afs_stat_source_t type;
int srvrPort;
! int typeIsValid;
! afs_stat_type_t which;
afs_RPCStatsState_t state;
if (as->parms[PROCESS].items) {
--- 486,493 ----
int servAddr = 0;
afs_stat_source_t type;
int srvrPort;
! int typeIsValid = 0;
! afs_stat_type_t which = 0;
afs_RPCStatsState_t state;
if (as->parms[PROCESS].items) {
***************
*** 544,551 ****
int servAddr = 0;
afs_stat_source_t type;
int srvrPort;
! int typeIsValid;
! afs_stat_type_t which;
if (as->parms[PROCESS].items) {
typeIsValid =
--- 544,551 ----
int servAddr = 0;
afs_stat_source_t type;
int srvrPort;
! int typeIsValid = 0;
! afs_stat_type_t which = 0;
if (as->parms[PROCESS].items) {
typeIsValid =
***************
*** 600,607 ****
int servAddr = 0;
afs_stat_source_t type;
int srvrPort;
! int typeIsValid;
! afs_stat_type_t which;
if (as->parms[PROCESS].items) {
typeIsValid =
--- 600,607 ----
int servAddr = 0;
afs_stat_source_t type;
int srvrPort;
! int typeIsValid = 0;
! afs_stat_type_t which = 0;
if (as->parms[PROCESS].items) {
typeIsValid =
***************
*** 702,712 ****
int servAddr = 0;
afs_stat_source_t type;
int srvrPort;
! int typeIsValid;
! afs_stat_type_t which;
afs_RPCStats_t stats;
void *iter;
! int i;
#ifdef AFS_NT40_ENV
(pthread_func_list_done
--- 702,712 ----
int servAddr = 0;
afs_stat_source_t type;
int srvrPort;
! int typeIsValid = 0;
! afs_stat_type_t which = 0;
afs_RPCStats_t stats;
void *iter;
! int i = 0;
#ifdef AFS_NT40_ENV
(pthread_func_list_done
***************
*** 833,840 ****
int servAddr = 0;
afs_stat_source_t type;
int srvrPort;
! int typeIsValid;
! afs_stat_type_t which;
afs_RPCStatsClearFlag_t flag = 0;
int seen_all = 0;
int seen_any = 0;
--- 833,840 ----
int servAddr = 0;
afs_stat_source_t type;
int srvrPort;
! int typeIsValid = 0;
! afs_stat_type_t which = 0;
afs_RPCStatsClearFlag_t flag = 0;
int seen_all = 0;
int seen_any = 0;
***************
*** 999,1005 ****
afs_stat_source_t type;
int servAddr = 0;
int srvrPort;
! int typeIsValid;
afs_RPCStatsVersion_t version;
if (as->parms[PROCESS].items) {
--- 999,1005 ----
afs_stat_source_t type;
int servAddr = 0;
int srvrPort;
! int typeIsValid = 0;
afs_RPCStatsVersion_t version;
if (as->parms[PROCESS].items) {
Index: openafs/src/libadmin/test/vos.c
diff -c openafs/src/libadmin/test/vos.c:1.9.4.2 openafs/src/libadmin/test/vos.c:1.9.4.3
*** openafs/src/libadmin/test/vos.c:1.9.4.2 Mon Apr 21 15:40:01 2008
--- openafs/src/libadmin/test/vos.c Mon Oct 27 19:41:46 2008
***************
*** 21,27 ****
#endif
RCSID
! ("$Header: /cvs/openafs/src/libadmin/test/vos.c,v 1.9.4.2 2008/04/21 19:40:01 shadow Exp $");
#include "vos.h"
--- 21,27 ----
#endif
RCSID
! ("$Header: /cvs/openafs/src/libadmin/test/vos.c,v 1.9.4.3 2008/10/27 23:41:46 shadow Exp $");
#include "vos.h"
***************
*** 151,157 ****
{
typedef enum { VOLUME } DoVosBackupVolumeCreate_parm_t;
afs_status_t st = 0;
! unsigned int volume_id;
if (as->parms[VOLUME].items) {
const char *volume = as->parms[VOLUME].items->data;
--- 151,157 ----
{
typedef enum { VOLUME } DoVosBackupVolumeCreate_parm_t;
afs_status_t st = 0;
! unsigned int volume_id = 0;
if (as->parms[VOLUME].items) {
const char *volume = as->parms[VOLUME].items->data;
***************
*** 222,228 ****
typedef enum { SERVER, PARTITION } DoVosPartitionGet_parm_t;
afs_status_t st = 0;
void *vos_server = NULL;
! unsigned int partition_id;
vos_partitionEntry_t entry;
if (as->parms[SERVER].items) {
--- 222,228 ----
typedef enum { SERVER, PARTITION } DoVosPartitionGet_parm_t;
afs_status_t st = 0;
void *vos_server = NULL;
! unsigned int partition_id = 0;
vos_partitionEntry_t entry;
if (as->parms[SERVER].items) {
***************
*** 318,324 ****
NEWADDRESS
} DoVosFileServerAddressChange_parm_t;
afs_status_t st = 0;
! int old_addr, new_addr;
if (as->parms[OLDADDRESS].items) {
const char *addr = as->parms[OLDADDRESS].items->data;
--- 318,325 ----
NEWADDRESS
} DoVosFileServerAddressChange_parm_t;
afs_status_t st = 0;
! int old_addr = 0;
! int new_addr = 0;
if (as->parms[OLDADDRESS].items) {
const char *addr = as->parms[OLDADDRESS].items->data;
***************
*** 341,347 ****
{
typedef enum { ADDRESS } DoVosFileServerAddressRemove_parm_t;
afs_status_t st = 0;
! int address;
if (as->parms[ADDRESS].items) {
const char *addr = as->parms[ADDRESS].items->data;
--- 342,348 ----
{
typedef enum { ADDRESS } DoVosFileServerAddressRemove_parm_t;
afs_status_t st = 0;
! int address = 0;
if (as->parms[ADDRESS].items) {
const char *addr = as->parms[ADDRESS].items->data;
***************
*** 678,684 ****
{
typedef enum { VOLUME } DoVosVLDBEntryLoc_parm_tk;
afs_status_t st = 0;
! unsigned int volume_id;
if (as->parms[VOLUME].items) {
const char *volume = as->parms[VOLUME].items->data;
--- 679,685 ----
{
typedef enum { VOLUME } DoVosVLDBEntryLoc_parm_tk;
afs_status_t st = 0;
! unsigned int volume_id = 0;
if (as->parms[VOLUME].items) {
const char *volume = as->parms[VOLUME].items->data;
***************
*** 697,703 ****
{
typedef enum { VOLUME } DoVosVLDBEntryUnlock_parm_t;
afs_status_t st = 0;
! unsigned int volume_id;
if (as->parms[VOLUME].items) {
const char *volume = as->parms[VOLUME].items->data;
--- 698,704 ----
{
typedef enum { VOLUME } DoVosVLDBEntryUnlock_parm_t;
afs_status_t st = 0;
! unsigned int volume_id = 0;
if (as->parms[VOLUME].items) {
const char *volume = as->parms[VOLUME].items->data;
***************
*** 719,726 ****
} DoVosVLDBReadOnlySiteCreate_parm_t;
afs_status_t st = 0;
void *vos_server = NULL;
! unsigned int partition_id;
! unsigned int volume_id;
if (as->parms[SERVER].items) {
if (!vos_ServerOpen
--- 720,727 ----
} DoVosVLDBReadOnlySiteCreate_parm_t;
afs_status_t st = 0;
void *vos_server = NULL;
! unsigned int partition_id = 0;
! unsigned int volume_id = 0;
if (as->parms[SERVER].items) {
if (!vos_ServerOpen
***************
*** 754,761 ****
} DoVosVLDBReadOnlySiteDelete_parm_t;
afs_status_t st = 0;
void *vos_server = NULL;
! unsigned int partition_id;
! unsigned int volume_id;
if (as->parms[SERVER].items) {
if (!vos_ServerOpen
--- 755,762 ----
} DoVosVLDBReadOnlySiteDelete_parm_t;
afs_status_t st = 0;
void *vos_server = NULL;
! unsigned int partition_id = 0;
! unsigned int volume_id = 0;
if (as->parms[SERVER].items) {
if (!vos_ServerOpen
***************
*** 829,838 ****
} DoVosVolumeCreate_parm_t;
afs_status_t st = 0;
void *vos_server = NULL;
! unsigned int partition_id;
unsigned int volume_id;
const char *volume = NULL;
! unsigned int quota;
if (as->parms[SERVER].items) {
if (!vos_ServerOpen
--- 830,839 ----
} DoVosVolumeCreate_parm_t;
afs_status_t st = 0;
void *vos_server = NULL;
! unsigned int partition_id = 0;
unsigned int volume_id;
const char *volume = NULL;
! unsigned int quota = 0;
if (as->parms[SERVER].items) {
if (!vos_ServerOpen
***************
*** 872,879 ****
typedef enum { SERVER, PARTITION, VOLUME } DoVosVolumeDelete_parm_t;
afs_status_t st = 0;
void *vos_server = NULL;
! unsigned int partition_id;
! unsigned int volume_id;
if (as->parms[SERVER].items) {
if (!vos_ServerOpen
--- 873,880 ----
typedef enum { SERVER, PARTITION, VOLUME } DoVosVolumeDelete_parm_t;
afs_status_t st = 0;
void *vos_server = NULL;
! unsigned int partition_id = 0;
! unsigned int volume_id = 0;
if (as->parms[SERVER].items) {
if (!vos_ServerOpen
***************
*** 905,912 ****
{
typedef enum { OLDVOLUME, NEWVOLUME } DoVosVolumeRename_parm_t;
afs_status_t st = 0;
! unsigned int old_volume;
! const char *new_volume;
if (as->parms[OLDVOLUME].items) {
const char *volume = as->parms[OLDVOLUME].items->data;
--- 906,913 ----
{
typedef enum { OLDVOLUME, NEWVOLUME } DoVosVolumeRename_parm_t;
afs_status_t st = 0;
! unsigned int old_volume = 0;
! const char *new_volume = 0;
if (as->parms[OLDVOLUME].items) {
const char *volume = as->parms[OLDVOLUME].items->data;
***************
*** 935,943 ****
unsigned int partition_id;
unsigned int *part_ptr = NULL;
int have_server = 0;
! unsigned int volume_id;
! unsigned int start_time;
! const char *dumpfile;
if (as->parms[SERVER].items) {
if (!vos_ServerOpen
--- 936,944 ----
unsigned int partition_id;
unsigned int *part_ptr = NULL;
int have_server = 0;
! unsigned int volume_id = 0;
! unsigned int start_time = 0;
! const char *dumpfile = NULL;
if (as->parms[SERVER].items) {
if (!vos_ServerOpen
***************
*** 988,998 ****
} DoVosVolumeRestore_parm_t;
afs_status_t st = 0;
void *vos_server = NULL;
! unsigned int partition_id;
unsigned int volume_id;
unsigned int *vol_ptr = NULL;
! const char *dumpfile;
! const char *volume_name;
vos_volumeRestoreType_t restore = VOS_RESTORE_INCREMENTAL;
if (as->parms[SERVER].items) {
--- 989,999 ----
} DoVosVolumeRestore_parm_t;
afs_status_t st = 0;
void *vos_server = NULL;
! unsigned int partition_id = 0;
unsigned int volume_id;
unsigned int *vol_ptr = NULL;
! const char *dumpfile = NULL;
! const char *volume_name = NULL;
vos_volumeRestoreType_t restore = VOS_RESTORE_INCREMENTAL;
if (as->parms[SERVER].items) {
***************
*** 1042,1050 ****
} DoVosVolumeOnline_parm_t;
afs_status_t st = 0;
void *vos_server = NULL;
! unsigned int partition_id;
! unsigned int volume_id;
! unsigned int sleep;
vos_volumeOnlineType_t type = VOS_ONLINE_OFFLINE;
if (as->parms[SERVER].items) {
--- 1043,1051 ----
} DoVosVolumeOnline_parm_t;
afs_status_t st = 0;
void *vos_server = NULL;
! unsigned int partition_id = 0;
! unsigned int volume_id = 0;
! unsigned int sleep = 0;
vos_volumeOnlineType_t type = VOS_ONLINE_OFFLINE;
if (as->parms[SERVER].items) {
***************
*** 1088,1095 ****
typedef enum { SERVER, PARTITION, VOLUME } DoVosVolumeOffline_parm_t;
afs_status_t st = 0;
void *vos_server = NULL;
! unsigned int partition_id;
! unsigned int volume_id;
if (as->parms[SERVER].items) {
if (!vos_ServerOpen
--- 1089,1096 ----
typedef enum { SERVER, PARTITION, VOLUME } DoVosVolumeOffline_parm_t;
afs_status_t st = 0;
void *vos_server = NULL;
! unsigned int partition_id = 0;
! unsigned int volume_id = 0;
if (as->parms[SERVER].items) {
if (!vos_ServerOpen
***************
*** 1345,1352 ****
typedef enum { SERVER, PARTITION, VOLUME } DoVosVolumeGet_parm_t;
afs_status_t st = 0;
void *vos_server = NULL;
! unsigned int partition_id;
! unsigned int volume_id;
vos_volumeEntry_t entry;
if (as->parms[SERVER].items) {
--- 1346,1353 ----
typedef enum { SERVER, PARTITION, VOLUME } DoVosVolumeGet_parm_t;
afs_status_t st = 0;
void *vos_server = NULL;
! unsigned int partition_id = 0;
! unsigned int volume_id = 0;
vos_volumeEntry_t entry;
if (as->parms[SERVER].items) {
***************
*** 1383,1389 ****
afs_status_t st = 0;
void *vos_server = NULL;
void *iter = NULL;
! unsigned int partition_id;
vos_volumeEntry_t entry;
if (as->parms[SERVER].items) {
--- 1384,1390 ----
afs_status_t st = 0;
void *vos_server = NULL;
void *iter = NULL;
! unsigned int partition_id = 0;
vos_volumeEntry_t entry;
if (as->parms[SERVER].items) {
***************
*** 1431,1439 ****
afs_status_t st = 0;
void *from_server = NULL;
void *to_server = NULL;
! unsigned int from_partition;
! unsigned int to_partition;
! unsigned int volume_id;
if (as->parms[FROMSERVER].items) {
if (!vos_ServerOpen
--- 1432,1440 ----
afs_status_t st = 0;
void *from_server = NULL;
void *to_server = NULL;
! unsigned int from_partition = 0;
! unsigned int to_partition = 0;
! unsigned int volume_id = 0;
if (as->parms[FROMSERVER].items) {
if (!vos_ServerOpen
***************
*** 1479,1485 ****
{
typedef enum { VOLUME, FORCE } DoVosVolumeRelease_parm_t;
afs_status_t st = 0;
! unsigned int volume_id;
vos_force_t force = VOS_NORMAL;
if (as->parms[VOLUME].items) {
--- 1480,1486 ----
{
typedef enum { VOLUME, FORCE } DoVosVolumeRelease_parm_t;
afs_status_t st = 0;
! unsigned int volume_id = 0;
vos_force_t force = VOS_NORMAL;
if (as->parms[VOLUME].items) {
***************
*** 1503,1510 ****
typedef enum { SERVER, PARTITION, VOLUME, FORCE } DoVosVolumeZap_parm_t;
afs_status_t st = 0;
void *vos_server = NULL;
! unsigned int partition_id;
! unsigned int volume_id;
vos_force_t force = VOS_NORMAL;
if (as->parms[SERVER].items) {
--- 1504,1511 ----
typedef enum { SERVER, PARTITION, VOLUME, FORCE } DoVosVolumeZap_parm_t;
afs_status_t st = 0;
void *vos_server = NULL;
! unsigned int partition_id = 0;
! unsigned int volume_id = 0;
vos_force_t force = VOS_NORMAL;
if (as->parms[SERVER].items) {
***************
*** 1541,1547 ****
{
typedef enum { PARTITION } DoVosPartitionNameToId_parm_t;
afs_status_t st = 0;
! unsigned int partition_id;
if (as->parms[PARTITION].items) {
partition_id =
--- 1542,1548 ----
{
typedef enum { PARTITION } DoVosPartitionNameToId_parm_t;
afs_status_t st = 0;
! unsigned int partition_id = 0;
if (as->parms[PARTITION].items) {
partition_id =
***************
*** 1559,1565 ****
{
typedef enum { PARTITIONID } DoVosPartitionIdToName_parm_t;
afs_status_t st = 0;
! unsigned int partition_id;
char partition[VOS_MAX_PARTITION_NAME_LEN];
if (as->parms[PARTITIONID].items) {
--- 1560,1566 ----
{
typedef enum { PARTITIONID } DoVosPartitionIdToName_parm_t;
afs_status_t st = 0;
! unsigned int partition_id = 0;
char partition[VOS_MAX_PARTITION_NAME_LEN];
if (as->parms[PARTITIONID].items) {
***************
*** 1585,1593 ****
} DoVosVolumeQuotaChange_parm_t;
afs_status_t st = 0;
void *vos_server = NULL;
! unsigned int partition_id;
! unsigned int volume_id;
! unsigned int quota;
if (as->parms[SERVER].items) {
if (!vos_ServerOpen
--- 1586,1594 ----
} DoVosVolumeQuotaChange_parm_t;
afs_status_t st = 0;
void *vos_server = NULL;
! unsigned int partition_id = 0;
! unsigned int volume_id = 0;
! unsigned int quota = 0;
if (as->parms[SERVER].items) {
if (!vos_ServerOpen
***************
*** 1733,1740 ****
typedef enum { SERVER, PARTITION, VOLUME } DoVosVolumeGet_parm_t;
afs_status_t st = 0;
void *vos_server = NULL;
! afs_uint32 partition_id;
! afs_uint32 volume_id;
volintInfo info;
memset(&info, 0, sizeof(struct volintInfo));
--- 1734,1741 ----
typedef enum { SERVER, PARTITION, VOLUME } DoVosVolumeGet_parm_t;
afs_status_t st = 0;
void *vos_server = NULL;
! afs_uint32 partition_id = 0;
! afs_uint32 volume_id = 0;
volintInfo info;
memset(&info, 0, sizeof(struct volintInfo));
***************
*** 1775,1782 ****
typedef enum { SERVER, PARTITION, VOLUME } DoVosVolumeGet_parm_t;
afs_status_t st = 0;
void *vos_server = NULL;
! unsigned int partition_id;
! unsigned int volume_id;
if (as->parms[SERVER].items) {
if (!vos_ServerOpen
--- 1776,1783 ----
typedef enum { SERVER, PARTITION, VOLUME } DoVosVolumeGet_parm_t;
afs_status_t st = 0;
void *vos_server = NULL;
! unsigned int partition_id = 0;
! unsigned int volume_id = 0;
if (as->parms[SERVER].items) {
if (!vos_ServerOpen
Index: openafs/src/libafs/MakefileProto.LINUX.in
diff -c openafs/src/libafs/MakefileProto.LINUX.in:1.54.4.6 openafs/src/libafs/MakefileProto.LINUX.in:1.54.4.7
*** openafs/src/libafs/MakefileProto.LINUX.in:1.54.4.6 Wed Sep 3 12:59:18 2008
--- openafs/src/libafs/MakefileProto.LINUX.in Sun Oct 12 14:02:19 2008
***************
*** 60,65 ****
--- 60,66 ----
COMMON_DEFINES=-D__KERNEL__ -DKERNEL -D_KERNEL -DMODULE ${SMP_DEF}
LINUX_KERNEL_PATH=@LINUX_KERNEL_PATH@
+ LINUX_KERNEL_BUILD=@LINUX_KERNEL_BUILD@
# System specific build commands and flags
***************
*** 295,301 ****
.FORCE:
${LINUX_LIBAFS_NAME}.ko afspag.ko: .FORCE
env EXTRA_CFLAGS="${EXTRA_CFLAGS}" @TOP_SRCDIR@/libafs/make_kbuild_makefile.pl ${KDIR} $@ @TOP_OBJDIR@/src/config/Makefile.config Makefile.afs Makefile.common
! env EXTRA_CFLAGS="${EXTRA_CFLAGS}" $(MAKE) -C ${LINUX_KERNEL_PATH} M=@TOP_OBJDIR@/src/libafs/${KDIR} modules
${LIBAFS}: $(AFSAOBJS) $(AFSNONFSOBJS)
--- 296,302 ----
.FORCE:
${LINUX_LIBAFS_NAME}.ko afspag.ko: .FORCE
env EXTRA_CFLAGS="${EXTRA_CFLAGS}" @TOP_SRCDIR@/libafs/make_kbuild_makefile.pl ${KDIR} $@ @TOP_OBJDIR@/src/config/Makefile.config Makefile.afs Makefile.common
! env EXTRA_CFLAGS="${EXTRA_CFLAGS}" $(MAKE) -C ${LINUX_KERNEL_BUILD} M=@TOP_OBJDIR@/src/libafs/${KDIR} modules
${LIBAFS}: $(AFSAOBJS) $(AFSNONFSOBJS)
Index: openafs/src/libafsrpc/afsrpc.def
diff -c openafs/src/libafsrpc/afsrpc.def:1.11.4.8 openafs/src/libafsrpc/afsrpc.def:1.11.4.9
*** openafs/src/libafsrpc/afsrpc.def:1.11.4.8 Tue Oct 7 18:28:49 2008
--- openafs/src/libafsrpc/afsrpc.def Wed Oct 8 17:15:10 2008
***************
*** 233,238 ****
--- 233,241 ----
clock_now @238
clock_UpdateTime @239
clock_haveCurrentTime @240
+ rx_SetRxDeadTime @241
+ rx_GetMinUdpBufSize @242
+ rx_SetUdpBufSize @243
; for performance testing
rx_TSFPQGlobSize @2001 DATA
Index: openafs/src/packaging/RedHat/openafs.spec.in
diff -c openafs/src/packaging/RedHat/openafs.spec.in:1.2.2.26 openafs/src/packaging/RedHat/openafs.spec.in:1.2.2.27
*** openafs/src/packaging/RedHat/openafs.spec.in:1.2.2.26 Tue Aug 26 09:44:43 2008
--- openafs/src/packaging/RedHat/openafs.spec.in Wed Nov 5 16:29:47 2008
***************
*** 1,4 ****
! # Openafs Spec $Revision: 1.2.2.26 $
%define afsvers @VERSION@
%define pkgvers @LINUX_PKGVER@
--- 1,4 ----
! # Openafs Spec $Revision: 1.2.2.27 $
%define afsvers @VERSION@
%define pkgvers @LINUX_PKGVER@
***************
*** 1497,1502 ****
--- 1497,1503 ----
%{_mandir}/man5/fms.log.*
%{_mandir}/man5/kaserver.DB0.*
%{_mandir}/man5/kaserverauxdb.*
+ %{_mandir}/man5/krb.conf.*
%{_mandir}/man5/prdb.DB0.*
%{_mandir}/man5/salvage.lock.*
%{_mandir}/man5/tapeconfig.*
Index: openafs/src/ptserver/db_verify.c
diff -c openafs/src/ptserver/db_verify.c:1.16.14.5 openafs/src/ptserver/db_verify.c:1.16.14.6
*** openafs/src/ptserver/db_verify.c:1.16.14.5 Wed Oct 31 00:09:32 2007
--- openafs/src/ptserver/db_verify.c Mon Oct 27 19:53:46 2008
***************
*** 12,18 ****
#include
RCSID
! ("$Header: /cvs/openafs/src/ptserver/db_verify.c,v 1.16.14.5 2007/10/31 04:09:32 shadow Exp $");
/*
* (3) Define a structure, idused, instead of an
--- 12,18 ----
#include
RCSID
! ("$Header: /cvs/openafs/src/ptserver/db_verify.c,v 1.16.14.6 2008/10/27 23:53:46 shadow Exp $");
/*
* (3) Define a structure, idused, instead of an
***************
*** 395,402 ****
struct prentry c; /* continuation entry */
afs_int32 na; /* next thread */
int ni;
! afs_int32 eid;
! int count; /* number of members */
int i;
int noErrors = 1;
int length; /* length of chain */
--- 395,403 ----
struct prentry c; /* continuation entry */
afs_int32 na; /* next thread */
int ni;
! afs_int32 eid = 0;
! int count = 0; /* number of members, set to > 9999 if */
! /* list ends early */
int i;
int noErrors = 1;
int length; /* length of chain */
***************
*** 410,416 ****
head = ntohl(e->next);
eid = ntohl(e->id);
bit = MAP_CONT;
- count = 0; /* set to >9999 if list ends early */
#if defined(SUPERGROUPS)
sgcount = 0;
sghead = ntohl(g->next);
--- 411,416 ----
***************
*** 713,719 ****
struct prentry c; /* continuation entry */
afs_int32 na; /* next thread */
int ni;
! afs_int32 eid;
int length; /* length of chain */
if (e) {
--- 713,719 ----
struct prentry c; /* continuation entry */
afs_int32 na; /* next thread */
int ni;
! afs_int32 eid = 0;
int length; /* length of chain */
if (e) {
Index: openafs/src/ptserver/pt_util.c
diff -c openafs/src/ptserver/pt_util.c:1.11.4.6 openafs/src/ptserver/pt_util.c:1.11.4.7
*** openafs/src/ptserver/pt_util.c:1.11.4.6 Tue Jul 1 01:57:35 2008
--- openafs/src/ptserver/pt_util.c Mon Oct 27 19:53:46 2008
***************
*** 1,4 ****
! /* $Id: pt_util.c,v 1.11.4.6 2008/07/01 05:57:35 rra Exp $ */
/*
*
--- 1,4 ----
! /* $Id: pt_util.c,v 1.11.4.7 2008/10/27 23:53:46 shadow Exp $ */
/*
*
***************
*** 23,29 ****
#include
RCSID
! ("$Header: /cvs/openafs/src/ptserver/pt_util.c,v 1.11.4.6 2008/07/01 05:57:35 rra Exp $");
#include /*Command line parsing */
#include
--- 23,29 ----
#include
RCSID
! ("$Header: /cvs/openafs/src/ptserver/pt_util.c,v 1.11.4.7 2008/10/27 23:53:46 shadow Exp $");
#include /*Command line parsing */
#include
***************
*** 133,140 ****
CommandProc(register struct cmd_syndesc *a_as, void *arock)
{
register int i;
! register long code;
! long cc, upos, gpos;
struct prentry uentry, gentry;
struct ubik_hdr *uh;
char *dfile = 0;
--- 133,141 ----
CommandProc(register struct cmd_syndesc *a_as, void *arock)
{
register int i;
! long code = 0;
! long cc, upos;
! long gpos = 0;
struct prentry uentry, gentry;
struct ubik_hdr *uh;
char *dfile = 0;
Index: openafs/src/ptserver/ptutils.c
diff -c openafs/src/ptserver/ptutils.c:1.19.6.5 openafs/src/ptserver/ptutils.c:1.19.6.6
*** openafs/src/ptserver/ptutils.c:1.19.6.5 Wed Apr 2 15:51:56 2008
--- openafs/src/ptserver/ptutils.c Sun Oct 26 03:50:55 2008
***************
*** 24,30 ****
#include
RCSID
! ("$Header: /cvs/openafs/src/ptserver/ptutils.c,v 1.19.6.5 2008/04/02 19:51:56 shadow Exp $");
#include
#include
--- 24,30 ----
#include
RCSID
! ("$Header: /cvs/openafs/src/ptserver/ptutils.c,v 1.19.6.6 2008/10/26 07:50:55 jaltman Exp $");
#include
#include
***************
*** 294,300 ****
return 1;
if (cid == SYSADMINID)
return 1; /* special case fileserver */
! if (restricted && ((mem == PRP_ADD_MEM) || (mem == any == 0)))
return 0;
if (tentry) {
flags = tentry->flags;
--- 294,300 ----
return 1;
if (cid == SYSADMINID)
return 1; /* special case fileserver */
! if (restricted && ((mem == PRP_ADD_MEM) || (mem == PRP_REMOVE_MEM)) && (any == 0))
return 0;
if (tentry) {
flags = tentry->flags;
Index: openafs/src/ptserver/testpt.c
diff -c openafs/src/ptserver/testpt.c:1.14.14.4 openafs/src/ptserver/testpt.c:1.14.14.5
*** openafs/src/ptserver/testpt.c:1.14.14.4 Wed Oct 31 00:09:32 2007
--- openafs/src/ptserver/testpt.c Mon Oct 27 19:41:46 2008
***************
*** 11,17 ****
#include
RCSID
! ("$Header: /cvs/openafs/src/ptserver/testpt.c,v 1.14.14.4 2007/10/31 04:09:32 shadow Exp $");
#include
#include
--- 11,17 ----
#include
RCSID
! ("$Header: /cvs/openafs/src/ptserver/testpt.c,v 1.14.14.5 2008/10/27 23:41:46 shadow Exp $");
#include
#include
***************
*** 272,279 ****
char name[16];
afs_int32 id = 0;
afs_int32 flags = PRGRP;
! afs_int32 owner;
! char *ownerName;
int ownerType; /* type of ownership */
static char *lastGroupPrefix; /* prefix used for type==2 */
--- 272,279 ----
char name[16];
afs_int32 id = 0;
afs_int32 flags = PRGRP;
! afs_int32 owner = 0;
! char *ownerName = NULL;
int ownerType; /* type of ownership */
static char *lastGroupPrefix; /* prefix used for type==2 */
Index: openafs/src/rx/rx_globals.c
diff -c openafs/src/rx/rx_globals.c:1.9.8.3 openafs/src/rx/rx_globals.c:1.9.8.4
*** openafs/src/rx/rx_globals.c:1.9.8.3 Mon Dec 18 22:19:08 2006
--- openafs/src/rx/rx_globals.c Wed Oct 8 17:15:10 2008
***************
*** 26,32 ****
#endif
RCSID
! ("$Header: /cvs/openafs/src/rx/rx_globals.c,v 1.9.8.3 2006/12/19 03:19:08 shadow Exp $");
/* Enable data initialization when the header file is included */
#define GLOBALSINIT(stuff) = stuff
--- 26,32 ----
#endif
RCSID
! ("$Header: /cvs/openafs/src/rx/rx_globals.c,v 1.9.8.4 2008/10/08 21:15:10 jaltman Exp $");
/* Enable data initialization when the header file is included */
#define GLOBALSINIT(stuff) = stuff
***************
*** 47,49 ****
--- 47,69 ----
#endif /* KERNEL */
#include "rx_globals.h"
+
+ #ifdef AFS_NT40_ENV
+
+ void rx_SetRxDeadTime(int seconds)
+ {
+ rx_connDeadTime = seconds;
+ }
+
+ int rx_GetMinUdpBufSize(void)
+ {
+ return 64*1024;
+ }
+
+ void rx_SetUdpBufSize(int x)
+ {
+ if (x > rx_GetMinUdpBufSize())
+ rx_UdpBufSize = x;
+ }
+
+ #endif /* AFS_NT40_ENV */
Index: openafs/src/rx/rx_globals.h
diff -c openafs/src/rx/rx_globals.h:1.21.2.21 openafs/src/rx/rx_globals.h:1.21.2.22
*** openafs/src/rx/rx_globals.h:1.21.2.21 Fri Oct 3 10:57:19 2008
--- openafs/src/rx/rx_globals.h Wed Oct 8 17:15:10 2008
***************
*** 81,88 ****
--- 81,93 ----
/* Time until an unresponsive connection is declared dead */
EXT int rx_connDeadTime GLOBALSINIT(12);
+
/* Set rx default connection dead time; set on both services and connections at creation time */
+ #ifdef AFS_NT40_ENV
+ void rx_SetRxDeadTime(int seconds);
+ #else
#define rx_SetRxDeadTime(seconds) (rx_connDeadTime = (seconds))
+ #endif
/* Time until we toss an idle connection */
EXT int rx_idleConnectionTime GLOBALSINIT(700);
***************
*** 94,102 ****
/* UDP rcv buffer size */
EXT int rx_UdpBufSize GLOBALSINIT(64 * 1024);
#define rx_GetMinUdpBufSize() (64*1024)
#define rx_SetUdpBufSize(x) (((x)>rx_GetMinUdpBufSize()) ? (rx_UdpBufSize = (x)):0)
!
/*
* Variables to control RX overload management. When the number of calls
* waiting for a thread exceed the threshold, new calls are aborted
--- 99,111 ----
/* UDP rcv buffer size */
EXT int rx_UdpBufSize GLOBALSINIT(64 * 1024);
+ #ifdef AFS_NT40_ENV
+ int rx_GetMinUdpBufSize(void);
+ void rx_SetUdpBufSize(int x);
+ #else
#define rx_GetMinUdpBufSize() (64*1024)
#define rx_SetUdpBufSize(x) (((x)>rx_GetMinUdpBufSize()) ? (rx_UdpBufSize = (x)):0)
! #endif
/*
* Variables to control RX overload management. When the number of calls
* waiting for a thread exceed the threshold, new calls are aborted
Index: openafs/src/rx/rx_rdwr.c
diff -c openafs/src/rx/rx_rdwr.c:1.29.2.9 openafs/src/rx/rx_rdwr.c:1.29.2.10
*** openafs/src/rx/rx_rdwr.c:1.29.2.9 Thu Oct 2 07:53:18 2008
--- openafs/src/rx/rx_rdwr.c Sun Oct 26 17:17:41 2008
***************
*** 15,21 ****
#endif
RCSID
! ("$Header: /cvs/openafs/src/rx/rx_rdwr.c,v 1.29.2.9 2008/10/02 11:53:18 jaltman Exp $");
#ifdef KERNEL
#ifndef UKERNEL
--- 15,21 ----
#endif
RCSID
! ("$Header: /cvs/openafs/src/rx/rx_rdwr.c,v 1.29.2.10 2008/10/26 21:17:41 jaltman Exp $");
#ifdef KERNEL
#ifndef UKERNEL
***************
*** 387,393 ****
call->curpos = tcurpos + sizeof(afs_int32);
call->curlen = (u_short)(tcurlen - sizeof(afs_int32));
call->nLeft = (u_short)(tnLeft - sizeof(afs_int32));
! if (!call->nLeft) {
/* out of packet. Get another one. */
NETPRI;
MUTEX_ENTER(&call->lock);
--- 387,393 ----
call->curpos = tcurpos + sizeof(afs_int32);
call->curlen = (u_short)(tcurlen - sizeof(afs_int32));
call->nLeft = (u_short)(tnLeft - sizeof(afs_int32));
! if (!call->nLeft && call->currentPacket != NULL) {
/* out of packet. Get another one. */
NETPRI;
MUTEX_ENTER(&call->lock);
Index: openafs/src/rxgen/rpc_parse.c
diff -c openafs/src/rxgen/rpc_parse.c:1.20.4.4 openafs/src/rxgen/rpc_parse.c:1.20.4.5
*** openafs/src/rxgen/rpc_parse.c:1.20.4.4 Thu Nov 1 12:02:29 2007
--- openafs/src/rxgen/rpc_parse.c Mon Oct 27 19:41:46 2008
***************
*** 36,42 ****
#include
RCSID
! ("$Header: /cvs/openafs/src/rxgen/rpc_parse.c,v 1.20.4.4 2007/11/01 16:02:29 shadow Exp $");
#include
#include
--- 36,42 ----
#include
RCSID
! ("$Header: /cvs/openafs/src/rxgen/rpc_parse.c,v 1.20.4.5 2008/10/27 23:41:46 shadow Exp $");
#include
#include
***************
*** 933,939 ****
handle_split_proc(definition * defp, int multi_flag)
{
char *startname = SplitStart, *endname = SplitEnd;
! int numofparams;
if (!startname)
startname = "Start";
--- 933,939 ----
handle_split_proc(definition * defp, int multi_flag)
{
char *startname = SplitStart, *endname = SplitEnd;
! int numofparams = 0;
if (!startname)
startname = "Start";
Index: openafs/src/scout/scout.c
diff -c openafs/src/scout/scout.c:1.10.2.3 openafs/src/scout/scout.c:1.10.2.4
*** openafs/src/scout/scout.c:1.10.2.3 Mon Nov 26 16:08:43 2007
--- openafs/src/scout/scout.c Mon Oct 27 19:41:46 2008
***************
*** 15,21 ****
#include
RCSID
! ("$Header: /cvs/openafs/src/scout/scout.c,v 1.10.2.3 2007/11/26 21:08:43 shadow Exp $");
#undef IN
#ifdef AFS_AIX32_ENV
--- 15,21 ----
#include
RCSID
! ("$Header: /cvs/openafs/src/scout/scout.c,v 1.10.2.4 2008/10/27 23:41:46 shadow Exp $");
#undef IN
#ifdef AFS_AIX32_ENV
***************
*** 470,476 ****
int num_src_chars; /*# of chars in source */
int true_num_src_chars; /*# src chars before truncation */
int trunc_needed; /*Is truncation needed? */
! char diskChar; /*Disk name prefix */
if (scout_debug) {
fprintf(scout_debugfd, "[%s] Called with '%s', dest width=%d\n", rn,
--- 470,476 ----
int num_src_chars; /*# of chars in source */
int true_num_src_chars; /*# src chars before truncation */
int trunc_needed; /*Is truncation needed? */
! char diskChar = 0; /*Disk name prefix */
if (scout_debug) {
fprintf(scout_debugfd, "[%s] Called with '%s', dest width=%d\n", rn,
Index: openafs/src/sys/pioctl_nt.c
diff -c openafs/src/sys/pioctl_nt.c:1.34.4.16 openafs/src/sys/pioctl_nt.c:1.34.4.19
*** openafs/src/sys/pioctl_nt.c:1.34.4.16 Sat Aug 16 12:50:06 2008
--- openafs/src/sys/pioctl_nt.c Sun Oct 26 17:52:43 2008
***************
*** 11,17 ****
#include
RCSID
! ("$Header: /cvs/openafs/src/sys/pioctl_nt.c,v 1.34.4.16 2008/08/16 16:50:06 jaltman Exp $");
#include
#include
--- 11,17 ----
#include
RCSID
! ("$Header: /cvs/openafs/src/sys/pioctl_nt.c,v 1.34.4.19 2008/10/26 21:52:43 jaltman Exp $");
#include
#include
***************
*** 397,402 ****
--- 397,483 ----
return success;
}
+ static BOOL
+ DriveIsMappedToAFS(char *drivestr, char *NetbiosName)
+ {
+ DWORD dwResult, dwResultEnum;
+ HANDLE hEnum;
+ DWORD cbBuffer = 16384; // 16K is a good size
+ DWORD cEntries = -1; // enumerate all possible entries
+ LPNETRESOURCE lpnrLocal; // pointer to enumerated structures
+ DWORD i;
+ BOOL bIsAFS = FALSE;
+
+ //
+ // Call the WNetOpenEnum function to begin the enumeration.
+ //
+ dwResult = WNetOpenEnum(RESOURCE_CONNECTED,
+ RESOURCETYPE_DISK,
+ RESOURCEUSAGE_ALL,
+ NULL, // NULL first time the function is called
+ &hEnum); // handle to the resource
+
+ if (dwResult != NO_ERROR)
+ return FALSE;
+
+ //
+ // Call the GlobalAlloc function to allocate resources.
+ //
+ lpnrLocal = (LPNETRESOURCE) GlobalAlloc(GPTR, cbBuffer);
+ if (lpnrLocal == NULL)
+ return FALSE;
+
+ do {
+ //
+ // Initialize the buffer.
+ //
+ ZeroMemory(lpnrLocal, cbBuffer);
+ //
+ // Call the WNetEnumResource function to continue
+ // the enumeration.
+ //
+ cEntries = -1;
+ dwResultEnum = WNetEnumResource(hEnum, // resource handle
+ &cEntries, // defined locally as -1
+ lpnrLocal, // LPNETRESOURCE
+ &cbBuffer); // buffer size
+ //
+ // If the call succeeds, loop through the structures.
+ //
+ if (dwResultEnum == NO_ERROR) {
+ for (i = 0; i < cEntries; i++) {
+ if (lpnrLocal[i].lpLocalName &&
+ toupper(lpnrLocal[i].lpLocalName[0]) == toupper(drivestr[0])) {
+ //
+ // Skip the two backslashes at the start of the UNC device name
+ //
+ if ( _strnicmp( &(lpnrLocal[i].lpRemoteName[2]), NetbiosName, strlen(NetbiosName)) == 0 )
+ {
+ bIsAFS = TRUE;
+ break;
+ }
+ }
+ }
+ }
+ // Process errors.
+ //
+ else if (dwResultEnum != ERROR_NO_MORE_ITEMS)
+ break;
+ }
+ while (dwResultEnum != ERROR_NO_MORE_ITEMS);
+
+ //
+ // Call the GlobalFree function to free the memory.
+ //
+ GlobalFree((HGLOBAL) lpnrLocal);
+ //
+ // Call WNetCloseEnum to end the enumeration.
+ //
+ dwResult = WNetCloseEnum(hEnum);
+
+ return bIsAFS;
+ }
+
static long
GetIoctlHandle(char *fileNamep, HANDLE * handlep)
{
***************
*** 424,429 ****
--- 505,513 ----
CurrentState != SERVICE_RUNNING)
return -1;
+ // Populate the Netbios Name
+ lana_GetNetbiosName(netbiosName,LANA_NETBIOS_NAME_FULL);
+
if (fileNamep) {
drivep = strchr(fileNamep, ':');
if (drivep && (drivep - fileNamep) >= 1) {
***************
*** 437,443 ****
switch (driveType) {
case DRIVE_UNKNOWN:
case DRIVE_REMOTE:
! strcpy(&tbuffer[2], SMB_IOCTL_FILENAME);
break;
default:
return -1;
--- 521,530 ----
switch (driveType) {
case DRIVE_UNKNOWN:
case DRIVE_REMOTE:
! if (DriveIsMappedToAFS(tbuffer, netbiosName))
! strcpy(&tbuffer[2], SMB_IOCTL_FILENAME);
! else
! return -1;
break;
default:
return -1;
***************
*** 487,493 ****
}
if (!tbuffer[0]) {
/* No file name starting with drive colon specified, use UNC name */
- lana_GetNetbiosName(netbiosName,LANA_NETBIOS_NAME_FULL);
sprintf(tbuffer,"\\\\%s\\all%s",netbiosName,SMB_IOCTL_FILENAME);
}
--- 574,579 ----
Index: openafs/src/tbutc/NTMakefile
diff -c openafs/src/tbutc/NTMakefile:1.16.4.5 openafs/src/tbutc/NTMakefile:1.16.4.6
*** openafs/src/tbutc/NTMakefile:1.16.4.5 Tue Oct 7 18:26:44 2008
--- openafs/src/tbutc/NTMakefile Wed Oct 8 17:15:10 2008
***************
*** 76,86 ****
$(BUTMLIBS) \
$(DESTDIR)\lib\afs\afsvldb.lib \
$(DESTDIR)\lib\afs\afskauth.lib \
- $(DESTDIR)\lib\afsubik.lib \
$(DESTDIR)\lib\afs\afsauth.lib \
$(DESTDIR)\lib\afsrpc.lib \
$(DESTDIR)\lib\afsrxkad.lib \
! $(DESTDIR)\lib\afslwp.lib \
$(DESTDIR)\lib\afs\afsutil.lib \
$(DESTDIR)\lib\afs\afsusd.lib \
$(DESTDIR)\lib\afs\afspioctl.lib \
--- 76,85 ----
$(BUTMLIBS) \
$(DESTDIR)\lib\afs\afsvldb.lib \
$(DESTDIR)\lib\afs\afskauth.lib \
$(DESTDIR)\lib\afs\afsauth.lib \
$(DESTDIR)\lib\afsrpc.lib \
$(DESTDIR)\lib\afsrxkad.lib \
! $(DESTDIR)\lib\afsubik.lib \
$(DESTDIR)\lib\afs\afsutil.lib \
$(DESTDIR)\lib\afs\afsusd.lib \
$(DESTDIR)\lib\afs\afspioctl.lib \
Index: openafs/src/ubik/recovery.c
diff -c openafs/src/ubik/recovery.c:1.14.4.8 openafs/src/ubik/recovery.c:1.14.4.9
*** openafs/src/ubik/recovery.c:1.14.4.8 Sat Jul 19 02:15:02 2008
--- openafs/src/ubik/recovery.c Sat Oct 18 11:24:45 2008
***************
*** 11,17 ****
#include
RCSID
! ("$Header: /cvs/openafs/src/ubik/recovery.c,v 1.14.4.8 2008/07/19 06:15:02 rra Exp $");
#include
#ifdef AFS_NT40_ENV
--- 11,17 ----
#include
RCSID
! ("$Header: /cvs/openafs/src/ubik/recovery.c,v 1.14.4.9 2008/10/18 15:24:45 jaltman Exp $");
#include
#ifdef AFS_NT40_ENV
***************
*** 605,610 ****
--- 605,611 ----
}
#endif
+ pass = 0;
while (length > 0) {
tlen = (length > sizeof(tbuffer) ? sizeof(tbuffer) : length);
#ifndef AFS_PTHREAD_ENV
Index: openafs/src/ubik/remote.c
diff -c openafs/src/ubik/remote.c:1.15.4.7 openafs/src/ubik/remote.c:1.15.4.9
*** openafs/src/ubik/remote.c:1.15.4.7 Sat Jul 19 02:15:02 2008
--- openafs/src/ubik/remote.c Mon Oct 27 19:53:46 2008
***************
*** 11,17 ****
#include
RCSID
! ("$Header: /cvs/openafs/src/ubik/remote.c,v 1.15.4.7 2008/07/19 06:15:02 rra Exp $");
#include
#ifdef AFS_NT40_ENV
--- 11,17 ----
#include
RCSID
! ("$Header: /cvs/openafs/src/ubik/remote.c,v 1.15.4.9 2008/10/27 23:53:46 shadow Exp $");
#include
#ifdef AFS_NT40_ENV
***************
*** 489,506 ****
struct ubik_version *avers;
{
register afs_int32 code;
! register struct ubik_dbase *dbase;
char tbuffer[1024];
afs_int32 offset;
struct ubik_version tversion;
register int tlen;
struct rx_peer *tpeer;
struct rx_connection *tconn;
! afs_uint32 otherHost;
#ifndef OLD_URECOVERY
char pbuffer[1028];
int flen, fd = -1;
! afs_int32 epoch, pass;
#endif
/* send the file back to the requester */
--- 489,507 ----
struct ubik_version *avers;
{
register afs_int32 code;
! struct ubik_dbase *dbase = NULL;
char tbuffer[1024];
afs_int32 offset;
struct ubik_version tversion;
register int tlen;
struct rx_peer *tpeer;
struct rx_connection *tconn;
! afs_uint32 otherHost = 0;
#ifndef OLD_URECOVERY
char pbuffer[1028];
int flen, fd = -1;
! afs_int32 epoch = 0;
! afs_int32 pass;
#endif
/* send the file back to the requester */
***************
*** 560,566 ****
close(fd);
goto failed;
}
- #else
pass = 0;
#endif
memcpy(&ubik_dbase->version, &tversion, sizeof(struct ubik_version));
--- 561,566 ----
***************
*** 639,646 ****
#ifndef OLD_URECOVERY
unlink(pbuffer);
/* Failed to sync. Allow reads again for now. */
! tversion.epoch = epoch;
! (*dbase->setlabel) (dbase, file, &tversion);
#endif
ubik_print
("Ubik: Synchronize database with server %s failed (error = %d)\n",
--- 639,648 ----
#ifndef OLD_URECOVERY
unlink(pbuffer);
/* Failed to sync. Allow reads again for now. */
! if (dbase != NULL) {
! tversion.epoch = epoch;
! (*dbase->setlabel) (dbase, file, &tversion);
! }
#endif
ubik_print
("Ubik: Synchronize database with server %s failed (error = %d)\n",
Index: openafs/src/uss/uss.c
diff -c openafs/src/uss/uss.c:1.8.14.3 openafs/src/uss/uss.c:1.8.14.4
*** openafs/src/uss/uss.c:1.8.14.3 Mon Nov 26 16:08:45 2007
--- openafs/src/uss/uss.c Mon Oct 27 19:41:46 2008
***************
*** 19,25 ****
#include
RCSID
! ("$Header: /cvs/openafs/src/uss/uss.c,v 1.8.14.3 2007/11/26 21:08:45 shadow Exp $");
#ifdef AFS_AIX32_ENV
#include
--- 19,25 ----
#include
RCSID
! ("$Header: /cvs/openafs/src/uss/uss.c,v 1.8.14.4 2008/10/27 23:41:46 shadow Exp $");
#ifdef AFS_AIX32_ENV
#include
***************
*** 1319,1325 ****
int code;
int line_no = 0;
! int error;
char tbuf[USS_BULK_BUF_CHARS];
/*
--- 1319,1325 ----
int code;
int line_no = 0;
! int error = 0;
char tbuf[USS_BULK_BUF_CHARS];
/*
Index: openafs/src/uss/uss_procs.c
diff -c openafs/src/uss/uss_procs.c:1.9.14.1 openafs/src/uss/uss_procs.c:1.9.14.2
*** openafs/src/uss/uss_procs.c:1.9.14.1 Tue Oct 30 11:16:48 2007
--- openafs/src/uss/uss_procs.c Mon Oct 27 19:41:46 2008
***************
*** 19,25 ****
#include
RCSID
! ("$Header: /cvs/openafs/src/uss/uss_procs.c,v 1.9.14.1 2007/10/30 15:16:48 shadow Exp $");
#include "uss_procs.h" /*Module interface */
#include "uss_common.h" /*Common defs & operations */
--- 19,25 ----
#include
RCSID
! ("$Header: /cvs/openafs/src/uss/uss_procs.c,v 1.9.14.2 2008/10/27 23:41:46 shadow Exp $");
#include "uss_procs.h" /*Module interface */
#include "uss_common.h" /*Common defs & operations */
***************
*** 694,700 ****
char cd[300]; /*Current directory for search */
! int i, count, MinIndex, mina = 10000;
struct dirent *dp;
DIR *dirp;
char dirname[300];
--- 694,700 ----
char cd[300]; /*Current directory for search */
! int i, count, MinIndex = 0, mina = 10000;
struct dirent *dp;
DIR *dirp;
char dirname[300];
Index: openafs/src/uss/uss_vol.c
diff -c openafs/src/uss/uss_vol.c:1.10.14.3 openafs/src/uss/uss_vol.c:1.10.14.4
*** openafs/src/uss/uss_vol.c:1.10.14.3 Tue Oct 30 11:16:48 2007
--- openafs/src/uss/uss_vol.c Mon Oct 27 19:41:46 2008
***************
*** 19,25 ****
#include
RCSID
! ("$Header: /cvs/openafs/src/uss/uss_vol.c,v 1.10.14.3 2007/10/30 15:16:48 shadow Exp $");
#include "uss_vol.h" /*Interface to this module */
#include "uss_common.h" /*Common definitions */
--- 19,25 ----
#include
RCSID
! ("$Header: /cvs/openafs/src/uss/uss_vol.c,v 1.10.14.4 2008/10/27 23:41:46 shadow Exp $");
#include "uss_vol.h" /*Interface to this module */
#include "uss_common.h" /*Common definitions */
***************
*** 935,941 ****
{ /*uss_vol_DeleteVol */
static char rn[] = "uss_vol_DeleteVol"; /*Routine name */
! register afs_int32 code; /*Return code */
/*
* Make sure we've initialized our VLDB connection(s) before
--- 935,941 ----
{ /*uss_vol_DeleteVol */
static char rn[] = "uss_vol_DeleteVol"; /*Routine name */
! register afs_int32 code = 0; /*Return code */
/*
* Make sure we've initialized our VLDB connection(s) before
Index: openafs/src/venus/cmdebug.c
diff -c openafs/src/venus/cmdebug.c:1.19.4.7 openafs/src/venus/cmdebug.c:1.19.4.8
*** openafs/src/venus/cmdebug.c:1.19.4.7 Sat Jan 12 10:44:40 2008
--- openafs/src/venus/cmdebug.c Fri Oct 10 07:54:29 2008
***************
*** 11,17 ****
#include
RCSID
! ("$Header: /cvs/openafs/src/venus/cmdebug.c,v 1.19.4.7 2008/01/12 15:44:40 jaltman Exp $");
#include
--- 11,17 ----
#include
RCSID
! ("$Header: /cvs/openafs/src/venus/cmdebug.c,v 1.19.4.8 2008/10/10 11:54:29 jaltman Exp $");
#include
***************
*** 266,272 ****
struct AFSDBCacheEntry centry;
char *cellname;
! for (i = 0; i < 10000; i++) {
code = RXAFSCB_GetCE(aconn, i, ¢ry);
if (code) {
if (code == 1)
--- 266,272 ----
struct AFSDBCacheEntry centry;
char *cellname;
! for (i = 0; i < 1000000; i++) {
code = RXAFSCB_GetCE(aconn, i, ¢ry);
if (code) {
if (code == 1)
***************
*** 363,369 ****
char *cellname;
int ce64 = 0;
! for (i = 0; i < 10000; i++) {
code = RXAFSCB_GetCE64(aconn, i, ¢ry);
if (code) {
if (code == 1)
--- 363,369 ----
char *cellname;
int ce64 = 0;
! for (i = 0; i < 1000000; i++) {
code = RXAFSCB_GetCE64(aconn, i, ¢ry);
if (code) {
if (code == 1)
Index: openafs/src/venus/fstrace.c
diff -c openafs/src/venus/fstrace.c:1.23.2.3 openafs/src/venus/fstrace.c:1.23.2.4
*** openafs/src/venus/fstrace.c:1.23.2.3 Mon Nov 26 16:08:45 2007
--- openafs/src/venus/fstrace.c Mon Oct 27 19:41:46 2008
***************
*** 14,20 ****
#include
RCSID
! ("$Header: /cvs/openafs/src/venus/fstrace.c,v 1.23.2.3 2007/11/26 21:08:45 shadow Exp $");
#include
#include
--- 14,20 ----
#include
RCSID
! ("$Header: /cvs/openafs/src/venus/fstrace.c,v 1.23.2.4 2008/10/27 23:41:46 shadow Exp $");
#include
#include
***************
*** 1662,1668 ****
for (i = 0; i < ICL_LOGSPERSET; i++) {
code =
afs_syscall(AFSCALL_ICL, ICL_OP_ENUMLOGSBYSET, (long)setname,
! i, (long)tname, sizeof(tname));
if (code) {
if (errno == EBADF) {
code = 0;
--- 1662,1668 ----
for (i = 0; i < ICL_LOGSPERSET; i++) {
code =
afs_syscall(AFSCALL_ICL, ICL_OP_ENUMLOGSBYSET, (long)setname,
! i, (long)tname, sizeof(tname), 0, 0);
if (code) {
if (errno == EBADF) {
code = 0;
***************
*** 1672,1678 ****
}
code =
afs_syscall(AFSCALL_ICL, ICL_OP_GETLOGINFO, (long)tname,
! (long)&dummy, (long)&dummy2, 0);
if (code)
break;
found++;
--- 1672,1678 ----
}
code =
afs_syscall(AFSCALL_ICL, ICL_OP_GETLOGINFO, (long)tname,
! (long)&dummy, (long)&dummy2, 0, 0, 0);
if (code)
break;
found++;
***************
*** 1691,1697 ****
for (i = 0; i < 1000; i++) {
code =
afs_syscall(AFSCALL_ICL, ICL_OP_ENUMLOGS, i, (long)tname,
! sizeof(tname), (long)&dummy);
if (code)
break;
if (dummy > bufferSize) /* find biggest log */
--- 1691,1697 ----
for (i = 0; i < 1000; i++) {
code =
afs_syscall(AFSCALL_ICL, ICL_OP_ENUMLOGS, i, (long)tname,
! sizeof(tname), (long)&dummy, 0, 0);
if (code)
break;
if (dummy > bufferSize) /* find biggest log */
***************
*** 1727,1733 ****
code =
afs_syscall(AFSCALL_ICL, ICL_OP_COPYOUT, (long)lip->name,
(long)(bufferp + nwords), bufferSize - nwords,
! (long)&i);
if (code < 0) {
/* otherwise we've got an error */
fprintf(outFilep, "Returned error %d dumping log.\n", errno);
--- 1727,1733 ----
code =
afs_syscall(AFSCALL_ICL, ICL_OP_COPYOUT, (long)lip->name,
(long)(bufferp + nwords), bufferSize - nwords,
! (long)&i, 0, 0);
if (code < 0) {
/* otherwise we've got an error */
fprintf(outFilep, "Returned error %d dumping log.\n", errno);
***************
*** 1786,1792 ****
{
afs_int32 code;
! code = afs_syscall(AFSCALL_ICL, ICL_OP_CLRLOG, (long)name, 0, 0, 0);
return code;
}
--- 1786,1792 ----
{
afs_int32 code;
! code = afs_syscall(AFSCALL_ICL, ICL_OP_CLRLOG, (long)name, 0, 0, 0, 0, 0);
return code;
}
***************
*** 1796,1802 ****
{
afs_int32 code;
! code = afs_syscall(AFSCALL_ICL, ICL_OP_CLRSET, (long)name, 0, 0, 0);
return code;
}
--- 1796,1802 ----
{
afs_int32 code;
! code = afs_syscall(AFSCALL_ICL, ICL_OP_CLRSET, (long)name, 0, 0, 0, 0, 0);
return code;
}
***************
*** 1805,1811 ****
{
afs_int32 code;
! code = afs_syscall(AFSCALL_ICL, ICL_OP_CLRALL, 0, 0, 0, 0);
return code;
}
--- 1805,1811 ----
{
afs_int32 code;
! code = afs_syscall(AFSCALL_ICL, ICL_OP_CLRALL, 0, 0, 0, 0, 0, 0);
return code;
}
***************
*** 1822,1828 ****
for (i = 0; i < 1000; i++) {
code =
afs_syscall(AFSCALL_ICL, ICL_OP_ENUMSETS, i, (long)tname,
! sizeof(tname), (long)&states);
if (code)
break;
(void)fprintf(outFileP, "%s %s%s%s\n", tname,
--- 1822,1828 ----
for (i = 0; i < 1000; i++) {
code =
afs_syscall(AFSCALL_ICL, ICL_OP_ENUMSETS, i, (long)tname,
! sizeof(tname), (long)&states, 0, 0);
if (code)
break;
(void)fprintf(outFileP, "%s %s%s%s\n", tname,
***************
*** 1849,1862 ****
for (i = 0; i < 1000; i++) {
code =
afs_syscall(AFSCALL_ICL, ICL_OP_ENUMLOGS, i, (long)tname,
! sizeof(tname), (long)&logSize);
if (code)
break;
if (int32flg) {
/* get more information on the log */
code =
afs_syscall(AFSCALL_ICL, ICL_OP_GETLOGINFO, (long)tname,
! (long)&logSize, (long)&allocated, 0);
if (code)
break;
(void)fprintf(outFileP, "%s : %d kbytes (%s)\n", tname,
--- 1849,1862 ----
for (i = 0; i < 1000; i++) {
code =
afs_syscall(AFSCALL_ICL, ICL_OP_ENUMLOGS, i, (long)tname,
! sizeof(tname), (long)&logSize, 0, 0);
if (code)
break;
if (int32flg) {
/* get more information on the log */
code =
afs_syscall(AFSCALL_ICL, ICL_OP_GETLOGINFO, (long)tname,
! (long)&logSize, (long)&allocated, 0, 0, 0);
if (code)
break;
(void)fprintf(outFileP, "%s : %d kbytes (%s)\n", tname,
***************
*** 1885,1891 ****
for (i = 0; i < ICL_LOGSPERSET; i++) {
code =
afs_syscall(AFSCALL_ICL, ICL_OP_ENUMLOGSBYSET, (long)setname, i,
! (long)tname, sizeof(tname));
if (code) {
if (errno == EBADF) {
code = 0;
--- 1885,1891 ----
for (i = 0; i < ICL_LOGSPERSET; i++) {
code =
afs_syscall(AFSCALL_ICL, ICL_OP_ENUMLOGSBYSET, (long)setname, i,
! (long)tname, sizeof(tname), 0, 0);
if (code) {
if (errno == EBADF) {
code = 0;
***************
*** 1897,1903 ****
/* get more information on the log */
code =
afs_syscall(AFSCALL_ICL, ICL_OP_GETLOGINFO, (long)tname,
! (long)&logSize, (long)&allocated, 0);
if (code)
break;
(void)fprintf(outFileP, "%s : %d kbytes (%s)\n", tname,
--- 1897,1903 ----
/* get more information on the log */
code =
afs_syscall(AFSCALL_ICL, ICL_OP_GETLOGINFO, (long)tname,
! (long)&logSize, (long)&allocated, 0, 0, 0);
if (code)
break;
(void)fprintf(outFileP, "%s : %d kbytes (%s)\n", tname,
***************
*** 1918,1924 ****
{
afs_int32 code;
! code = afs_syscall(AFSCALL_ICL, ICL_OP_SETSTAT, (long)name, op, 0, 0);
return code;
}
--- 1918,1924 ----
{
afs_int32 code;
! code = afs_syscall(AFSCALL_ICL, ICL_OP_SETSTAT, (long)name, op, 0, 0, 0, 0);
return code;
}
***************
*** 1929,1935 ****
{
afs_int32 code;
! code = afs_syscall(AFSCALL_ICL, ICL_OP_SETSTATALL, op, 0, 0, 0);
return code;
}
--- 1929,1935 ----
{
afs_int32 code;
! code = afs_syscall(AFSCALL_ICL, ICL_OP_SETSTATALL, op, 0, 0, 0, 0, 0);
return code;
}
***************
*** 1943,1949 ****
code =
afs_syscall(AFSCALL_ICL, ICL_OP_SETLOGSIZE, (long)name, logSize, 0,
! 0);
return code;
}
--- 1943,1949 ----
code =
afs_syscall(AFSCALL_ICL, ICL_OP_SETLOGSIZE, (long)name, logSize, 0,
! 0, 0, 0);
return code;
}
***************
*** 1957,1963 ****
afs_int32 code;
code =
afs_syscall(AFSCALL_ICL, ICL_OP_GETLOGINFO, (long)logname,
! (long)logSizeP, (long)allocatedP, 0);
return code;
}
--- 1957,1963 ----
afs_int32 code;
code =
afs_syscall(AFSCALL_ICL, ICL_OP_GETLOGINFO, (long)logname,
! (long)logSizeP, (long)allocatedP, 0, 0, 0);
return code;
}
***************
*** 1970,1976 ****
afs_int32 code;
code =
afs_syscall(AFSCALL_ICL, ICL_OP_GETSETINFO, (long)setname,
! (long)stateP, 0, 0);
return code;
}
--- 1970,1976 ----
afs_int32 code;
code =
afs_syscall(AFSCALL_ICL, ICL_OP_GETSETINFO, (long)setname,
! (long)stateP, 0, 0, 0, 0);
return code;
}
***************
*** 1993,1999 ****
/* get information about the specified log */
code =
afs_syscall(AFSCALL_ICL, ICL_OP_GETLOGINFO, (long)logname,
! (long)&bufferSize, (long)&allocated, 0);
if (code) {
if (errno == ENOENT)
(void)fprintf(stderr, "'%s' not found\n", logname);
--- 1993,1999 ----
/* get information about the specified log */
code =
afs_syscall(AFSCALL_ICL, ICL_OP_GETLOGINFO, (long)logname,
! (long)&bufferSize, (long)&allocated, 0, 0, 0);
if (code) {
if (errno == ENOENT)
(void)fprintf(stderr, "'%s' not found\n", logname);
***************
*** 2030,2036 ****
code =
afs_syscall(AFSCALL_ICL, ICL_OP_COPYOUTCLR, (long)logname,
(long)(bufferp + nwords), bufferSize - nwords,
! (long)&i);
if (code < 0) {
/* otherwise we've got an error */
fprintf(stderr, "returned error %d dumping log.\n", errno);
--- 2030,2036 ----
code =
afs_syscall(AFSCALL_ICL, ICL_OP_COPYOUTCLR, (long)logname,
(long)(bufferp + nwords), bufferSize - nwords,
! (long)&i, 0, 0);
if (code < 0) {
/* otherwise we've got an error */
fprintf(stderr, "returned error %d dumping log.\n", errno);
***************
*** 2078,2084 ****
/* see if things have changed */
code =
afs_syscall(AFSCALL_ICL, ICL_OP_GETLOGINFO, (long)logname,
! (long)&newBufferSize, (long)&allocated, 0);
if (code) {
if (errno == ENOENT)
(void)fprintf(stderr, "'%s' not found\n", logname);
--- 2078,2084 ----
/* see if things have changed */
code =
afs_syscall(AFSCALL_ICL, ICL_OP_GETLOGINFO, (long)logname,
! (long)&newBufferSize, (long)&allocated, 0, 0, 0);
if (code) {
if (errno == ENOENT)
(void)fprintf(stderr, "'%s' not found\n", logname);
Index: openafs/src/venus/test/getinitparams.c
diff -c openafs/src/venus/test/getinitparams.c:1.5.14.1 openafs/src/venus/test/getinitparams.c:1.5.14.2
*** openafs/src/venus/test/getinitparams.c:1.5.14.1 Wed Oct 31 00:09:42 2007
--- openafs/src/venus/test/getinitparams.c Mon Oct 27 19:41:47 2008
***************
*** 11,17 ****
#include
RCSID
! ("$Header: /cvs/openafs/src/venus/test/getinitparams.c,v 1.5.14.1 2007/10/31 04:09:42 shadow Exp $");
#include
#include
--- 11,17 ----
#include
RCSID
! ("$Header: /cvs/openafs/src/venus/test/getinitparams.c,v 1.5.14.2 2008/10/27 23:41:47 shadow Exp $");
#include
#include
***************
*** 41,47 ****
int code;
int len;
char *file = 0;
! int fd;
if (as->parms[0].items) {
file = as->parms[0].items->data;
--- 41,47 ----
int code;
int len;
char *file = 0;
! int fd = 0;
if (as->parms[0].items) {
file = as->parms[0].items->data;
Index: openafs/src/viced/afsfileprocs.c
diff -c openafs/src/viced/afsfileprocs.c:1.113.2.28 openafs/src/viced/afsfileprocs.c:1.113.2.29
*** openafs/src/viced/afsfileprocs.c:1.113.2.28 Fri Sep 5 12:57:55 2008
--- openafs/src/viced/afsfileprocs.c Mon Oct 27 19:41:47 2008
***************
*** 29,35 ****
#include
RCSID
! ("$Header: /cvs/openafs/src/viced/afsfileprocs.c,v 1.113.2.28 2008/09/05 16:57:55 shadow Exp $");
#include
#include
--- 29,35 ----
#include
RCSID
! ("$Header: /cvs/openafs/src/viced/afsfileprocs.c,v 1.113.2.29 2008/10/27 23:41:47 shadow Exp $");
#include
#include
***************
*** 7151,7161 ****
afs_sfsize_t tlen; /* temp for xfr length */
Inode tinode; /* inode for I/O */
afs_int32 optSize; /* optimal transfer size */
! afs_sfsize_t DataLength; /* size of inode */
afs_sfsize_t TruncatedLength; /* size after ftruncate */
afs_fsize_t NewLength; /* size after this store completes */
afs_sfsize_t adjustSize; /* bytes to call VAdjust... with */
! int linkCount; /* link count on inode */
FdHandle_t *fdP;
struct in_addr logHostAddr; /* host ip holder for inet_ntoa */
--- 7151,7161 ----
afs_sfsize_t tlen; /* temp for xfr length */
Inode tinode; /* inode for I/O */
afs_int32 optSize; /* optimal transfer size */
! afs_sfsize_t DataLength = 0; /* size of inode */
afs_sfsize_t TruncatedLength; /* size after ftruncate */
afs_fsize_t NewLength; /* size after this store completes */
afs_sfsize_t adjustSize; /* bytes to call VAdjust... with */
! int linkCount = 0; /* link count on inode */
FdHandle_t *fdP;
struct in_addr logHostAddr; /* host ip holder for inet_ntoa */
Index: openafs/src/viced/callback.c
diff -c openafs/src/viced/callback.c:1.77.2.15 openafs/src/viced/callback.c:1.77.2.16
*** openafs/src/viced/callback.c:1.77.2.15 Mon Feb 18 14:20:53 2008
--- openafs/src/viced/callback.c Mon Oct 27 19:41:47 2008
***************
*** 85,91 ****
#include
RCSID
! ("$Header: /cvs/openafs/src/viced/callback.c,v 1.77.2.15 2008/02/18 19:20:53 shadow Exp $");
#include
#include /* for malloc() */
--- 85,91 ----
#include
RCSID
! ("$Header: /cvs/openafs/src/viced/callback.c,v 1.77.2.16 2008/10/27 23:41:47 shadow Exp $");
#include
#include /* for malloc() */
***************
*** 532,538 ****
struct FileEntry *fe;
struct CallBack *cb = 0, *lastcb = 0;
struct FileEntry *newfe = 0;
! afs_uint32 time_out;
afs_uint32 *Thead = thead;
struct CallBack *newcb = 0;
int safety;
--- 532,538 ----
struct FileEntry *fe;
struct CallBack *cb = 0, *lastcb = 0;
struct FileEntry *newfe = 0;
! afs_uint32 time_out = 0;
afs_uint32 *Thead = thead;
struct CallBack *newcb = 0;
int safety;
Index: openafs/src/viced/host.c
diff -c openafs/src/viced/host.c:1.93.2.34 openafs/src/viced/host.c:1.93.2.35
*** openafs/src/viced/host.c:1.93.2.34 Thu May 8 17:18:56 2008
--- openafs/src/viced/host.c Mon Oct 27 19:53:47 2008
***************
*** 13,19 ****
#include
RCSID
! ("$Header: /cvs/openafs/src/viced/host.c,v 1.93.2.34 2008/05/08 21:18:56 shadow Exp $");
#include
#include
--- 13,19 ----
#include
RCSID
! ("$Header: /cvs/openafs/src/viced/host.c,v 1.93.2.35 2008/10/27 23:53:47 shadow Exp $");
#include
#include
***************
*** 1122,1128 ****
h_Enumerate_r(int (*proc) (), struct host *enumstart, char *param)
{
register struct host *host, *next;
! register int held, nheld;
if (hostCount == 0) {
return;
--- 1122,1129 ----
h_Enumerate_r(int (*proc) (), struct host *enumstart, char *param)
{
register struct host *host, *next;
! int held = 0;
! int nheld = 0;
if (hostCount == 0) {
return;
***************
*** 2118,2126 ****
h_FindClient_r(struct rx_connection *tcon)
{
register struct client *client;
! register struct host *host;
struct client *oldClient;
! afs_int32 viceid;
afs_int32 expTime;
afs_int32 code;
int authClass;
--- 2119,2127 ----
h_FindClient_r(struct rx_connection *tcon)
{
register struct client *client;
! struct host *host = NULL;
struct client *oldClient;
! afs_int32 viceid = 0;
afs_int32 expTime;
afs_int32 code;
int authClass;
***************
*** 3754,3760 ****
int
h_DeleteHostFromAddrHashTable_r(afs_uint32 addr, afs_uint16 port, struct host *host)
{
! int flag;
register struct h_AddrHashChain **hp, *th;
for (hp = &hostAddrHashTable[h_HashIndex(addr)]; (th = *hp);) {
--- 3755,3761 ----
int
h_DeleteHostFromAddrHashTable_r(afs_uint32 addr, afs_uint16 port, struct host *host)
{
! int flag = 0;
register struct h_AddrHashChain **hp, *th;
for (hp = &hostAddrHashTable[h_HashIndex(addr)]; (th = *hp);) {
Index: openafs/src/vlserver/vldb_check.c
diff -c openafs/src/vlserver/vldb_check.c:1.11.14.5 openafs/src/vlserver/vldb_check.c:1.11.14.6
*** openafs/src/vlserver/vldb_check.c:1.11.14.5 Tue Oct 7 11:38:29 2008
--- openafs/src/vlserver/vldb_check.c Mon Oct 27 19:53:47 2008
***************
*** 43,49 ****
#include
RCSID
! ("$Header: /cvs/openafs/src/vlserver/vldb_check.c,v 1.11.14.5 2008/10/07 15:38:29 shadow Exp $");
#include
#include
--- 43,49 ----
#include
RCSID
! ("$Header: /cvs/openafs/src/vlserver/vldb_check.c,v 1.11.14.6 2008/10/27 23:53:47 shadow Exp $");
#include
#include
***************
*** 501,507 ****
int freecount = 0, mhcount = 0, vlcount = 0;
int rwcount = 0, rocount = 0, bkcount = 0;
struct nvlentry vlentry;
! afs_uint32 addr, entrysize, maxvolid = 0;
if (verbose)
printf("Read each entry in the database\n");
--- 501,509 ----
int freecount = 0, mhcount = 0, vlcount = 0;
int rwcount = 0, rocount = 0, bkcount = 0;
struct nvlentry vlentry;
! afs_uint32 addr;
! afs_uint32 entrysize = 0;
! afs_uint32 maxvolid = 0;
if (verbose)
printf("Read each entry in the database\n");
***************
*** 570,576 ****
entrysize = VL_ADDREXTBLK_SIZE;
mhcount++;
} else {
! printf("Unknown entry at %u\n", addr);
}
}
if (verbose) {
--- 572,579 ----
entrysize = VL_ADDREXTBLK_SIZE;
mhcount++;
} else {
! printf("Unknown entry at %u. Aborting\n", addr);
! break;
}
}
if (verbose) {
***************
*** 1111,1121 ****
if (verbose)
printf("Verify each volume entry\n");
for (i = 0; i < maxentries; i++) {
! int nextp;
! int reft;
! int hash, nexthash = 0;
! int *nextpp;
! char *which;
if (record[i].type == 0)
continue;
--- 1114,1125 ----
if (verbose)
printf("Verify each volume entry\n");
for (i = 0; i < maxentries; i++) {
! int nextp = 0;
! int reft = 0;
! int hash = 0;
! int nexthash = 0;
! int *nextpp = NULL;
! char *which = NULL;
if (record[i].type == 0)
continue;
Index: openafs/src/vlserver/vlprocs.c
diff -c openafs/src/vlserver/vlprocs.c:1.15.4.3 openafs/src/vlserver/vlprocs.c:1.15.4.4
*** openafs/src/vlserver/vlprocs.c:1.15.4.3 Wed Apr 2 15:51:57 2008
--- openafs/src/vlserver/vlprocs.c Mon Oct 27 19:41:47 2008
***************
*** 11,17 ****
#include
RCSID
! ("$Header: /cvs/openafs/src/vlserver/vlprocs.c,v 1.15.4.3 2008/04/02 19:51:57 shadow Exp $");
#include
#include
--- 11,17 ----
#include
RCSID
! ("$Header: /cvs/openafs/src/vlserver/vlprocs.c,v 1.15.4.4 2008/10/27 23:41:47 shadow Exp $");
#include
#include
***************
*** 1131,1137 ****
return VL_SIZEEXCEEDED;
}
} else {
! afs_int32 nextblockindex = 0, count = 0, k, match = 0;
while (nextblockindex =
NextEntry(trans, nextblockindex, &tentry, &count)) {
if (++pollcount > 50) {
--- 1131,1137 ----
return VL_SIZEEXCEEDED;
}
} else {
! afs_int32 nextblockindex = 0, count = 0, k = 0, match = 0;
while (nextblockindex =
NextEntry(trans, nextblockindex, &tentry, &count)) {
if (++pollcount > 50) {
***************
*** 1271,1277 ****
return VL_SIZEEXCEEDED;
}
} else {
! afs_int32 nextblockindex = 0, count = 0, k, match = 0;
while (nextblockindex =
NextEntry(trans, nextblockindex, &tentry, &count)) {
if (++pollcount > 50) {
--- 1271,1277 ----
return VL_SIZEEXCEEDED;
}
} else {
! afs_int32 nextblockindex = 0, count = 0, k = 0, match = 0;
while (nextblockindex =
NextEntry(trans, nextblockindex, &tentry, &count)) {
if (++pollcount > 50) {
***************
*** 1371,1382 ****
struct ubik_trans *trans;
struct nvlentry tentry;
struct nvldbentry *Vldbentry = 0, *VldbentryFirst = 0, *VldbentryLast = 0;
! afs_int32 blockindex = 0, count = 0, k, match, matchindex;
int serverindex = -1; /* no server found */
int findserver = 0, findpartition = 0, findflag = 0, findname = 0;
char *t;
int pollcount = 0;
! int namematchRWBK, namematchRO, thismatch, matchtype;
char volumename[VL_MAXNAMELEN];
#ifdef HAVE_POSIX_REGEX
regex_t re;
--- 1371,1384 ----
struct ubik_trans *trans;
struct nvlentry tentry;
struct nvldbentry *Vldbentry = 0, *VldbentryFirst = 0, *VldbentryLast = 0;
! afs_int32 blockindex = 0, count = 0, k, match;
! afs_int32 matchindex = 0;
int serverindex = -1; /* no server found */
int findserver = 0, findpartition = 0, findflag = 0, findname = 0;
char *t;
int pollcount = 0;
! int namematchRWBK, namematchRO, thismatch;
! int matchtype = 0;
char volumename[VL_MAXNAMELEN];
#ifdef HAVE_POSIX_REGEX
regex_t re;
***************
*** 1640,1646 ****
struct ubik_trans *trans;
struct nvlentry tentry;
vldblist vllist, *vllistptr;
! afs_int32 blockindex, count, k, match;
int serverindex;
int pollcount = 0;
--- 1642,1649 ----
struct ubik_trans *trans;
struct nvlentry tentry;
vldblist vllist, *vllistptr;
! afs_int32 blockindex, count, match;
! afs_int32 k = 0;
int serverindex;
int pollcount = 0;
***************
*** 1768,1774 ****
struct ubik_trans *trans;
struct nvlentry tentry;
nvldblist vllist, *vllistptr;
! afs_int32 blockindex, count, k, match;
int serverindex;
int pollcount = 0;
--- 1771,1778 ----
struct ubik_trans *trans;
struct nvlentry tentry;
nvldblist vllist, *vllistptr;
! afs_int32 blockindex, count, match;
! afs_int32 k = 0;
int serverindex;
int pollcount = 0;
***************
*** 1974,1981 ****
afs_uint32 addrs[VL_MAXIPADDRS_PERMH];
afs_int32 fbase;
int count, willChangeEntry, foundUuidEntry, willReplaceCnt;
! int WillReplaceEntry, WillChange[MAXSERVERID + 1], FoundUuid,
! ReplaceEntry;
int srvidx, mhidx;
COUNT_REQ(VLREGADDR);
--- 1978,1986 ----
afs_uint32 addrs[VL_MAXIPADDRS_PERMH];
afs_int32 fbase;
int count, willChangeEntry, foundUuidEntry, willReplaceCnt;
! int WillReplaceEntry, WillChange[MAXSERVERID + 1];
! int FoundUuid = 0;
! int ReplaceEntry = 0;
int srvidx, mhidx;
COUNT_REQ(VLREGADDR);
***************
*** 3136,3143 ****
{
int i, j;
afs_int32 code;
! struct extentaddr *exp;
! int base, index, mhidx;
afsUUID tuuid;
afs_int32 blockindex, count;
int pollcount = 0;
--- 3141,3149 ----
{
int i, j;
afs_int32 code;
! struct extentaddr *exp = NULL;
! int base = 0;
! int index, mhidx;
afsUUID tuuid;
afs_int32 blockindex, count;
int pollcount = 0;
Index: openafs/src/vlserver/vlserver.c
diff -c openafs/src/vlserver/vlserver.c:1.22.2.11 openafs/src/vlserver/vlserver.c:1.22.2.12
*** openafs/src/vlserver/vlserver.c:1.22.2.11 Wed Sep 24 17:36:52 2008
--- openafs/src/vlserver/vlserver.c Sat Oct 18 11:09:07 2008
***************
*** 11,17 ****
#include
RCSID
! ("$Header: /cvs/openafs/src/vlserver/vlserver.c,v 1.22.2.11 2008/09/24 21:36:52 shadow Exp $");
#include
#include
--- 11,17 ----
#include
RCSID
! ("$Header: /cvs/openafs/src/vlserver/vlserver.c,v 1.22.2.12 2008/10/18 15:09:07 jaltman Exp $");
#include
#include
***************
*** 198,204 ****
fprintf(stderr, "missing argument for -rxmaxmtu\n");
return -1;
}
! rxMaxMTU = atoi(argv[++i]);
if ((rxMaxMTU < RX_MIN_PACKET_SIZE) ||
(rxMaxMTU > RX_MAX_PACKET_DATA_SIZE)) {
printf("rxMaxMTU %d invalid; must be between %d-%d\n",
--- 198,204 ----
fprintf(stderr, "missing argument for -rxmaxmtu\n");
return -1;
}
! rxMaxMTU = atoi(argv[++index]);
if ((rxMaxMTU < RX_MIN_PACKET_SIZE) ||
(rxMaxMTU > RX_MAX_PACKET_DATA_SIZE)) {
printf("rxMaxMTU %d invalid; must be between %d-%d\n",
Index: openafs/src/vol/clone.c
diff -c openafs/src/vol/clone.c:1.19.2.8 openafs/src/vol/clone.c:1.19.2.9
*** openafs/src/vol/clone.c:1.19.2.8 Wed Mar 5 16:53:30 2008
--- openafs/src/vol/clone.c Mon Oct 27 19:41:47 2008
***************
*** 19,25 ****
#include
RCSID
! ("$Header: /cvs/openafs/src/vol/clone.c,v 1.19.2.8 2008/03/05 21:53:30 shadow Exp $");
#include
#include
--- 19,25 ----
#include
RCSID
! ("$Header: /cvs/openafs/src/vol/clone.c,v 1.19.2.9 2008/10/27 23:41:47 shadow Exp $");
#include
#include
***************
*** 168,177 ****
char buf[SIZEOF_LARGEDISKVNODE], dbuf[SIZEOF_LARGEDISKVNODE];
struct VnodeDiskObject *rwvnode = (struct VnodeDiskObject *)buf;
struct VnodeDiskObject *clvnode = (struct VnodeDiskObject *)dbuf;
! Inode rwinode, clinode;
struct clone_head decHead;
struct clone_rock decRock;
! afs_int32 offset, dircloned, inodeinced;
struct VnodeClassInfo *vcp = &VnodeClassInfo[class];
int ReadWriteOriginal = VolumeWriteable(rwvp);
--- 168,179 ----
char buf[SIZEOF_LARGEDISKVNODE], dbuf[SIZEOF_LARGEDISKVNODE];
struct VnodeDiskObject *rwvnode = (struct VnodeDiskObject *)buf;
struct VnodeDiskObject *clvnode = (struct VnodeDiskObject *)dbuf;
! Inode rwinode = 0;
! Inode clinode;
struct clone_head decHead;
struct clone_rock decRock;
! afs_int32 offset = 0;
! afs_int32 dircloned, inodeinced;
struct VnodeClassInfo *vcp = &VnodeClassInfo[class];
int ReadWriteOriginal = VolumeWriteable(rwvp);
Index: openafs/src/vol/ihandle.c
diff -c openafs/src/vol/ihandle.c:1.19.8.4 openafs/src/vol/ihandle.c:1.19.8.5
*** openafs/src/vol/ihandle.c:1.19.8.4 Mon Nov 26 16:47:29 2007
--- openafs/src/vol/ihandle.c Mon Oct 27 19:53:47 2008
***************
*** 15,21 ****
#include
RCSID
! ("$Header: /cvs/openafs/src/vol/ihandle.c,v 1.19.8.4 2007/11/26 21:47:29 shadow Exp $");
#include
#include
--- 15,21 ----
#include
RCSID
! ("$Header: /cvs/openafs/src/vol/ihandle.c,v 1.19.8.5 2008/10/27 23:53:47 shadow Exp $");
#include
#include
***************
*** 507,513 ****
StreamHandle_t *
stream_open(const char *filename, const char *mode)
{
! FD_t fd;
if (strcmp(mode, "r") == 0) {
fd = OS_OPEN(filename, O_RDONLY, 0);
--- 507,513 ----
StreamHandle_t *
stream_open(const char *filename, const char *mode)
{
! FD_t fd = INVALID_FD;
if (strcmp(mode, "r") == 0) {
fd = OS_OPEN(filename, O_RDONLY, 0);
Index: openafs/src/vol/namei_ops.c
diff -c openafs/src/vol/namei_ops.c:1.28.2.16 openafs/src/vol/namei_ops.c:1.28.2.17
*** openafs/src/vol/namei_ops.c:1.28.2.16 Wed Mar 5 16:53:30 2008
--- openafs/src/vol/namei_ops.c Fri Oct 10 10:42:40 2008
***************
*** 13,19 ****
#include
RCSID
! ("$Header: /cvs/openafs/src/vol/namei_ops.c,v 1.28.2.16 2008/03/05 21:53:30 shadow Exp $");
#ifdef AFS_NAMEI_ENV
#include
--- 13,19 ----
#include
RCSID
! ("$Header: /cvs/openafs/src/vol/namei_ops.c,v 1.28.2.17 2008/10/10 14:42:40 shadow Exp $");
#ifdef AFS_NAMEI_ENV
#include
***************
*** 993,1000 ****
if ((row & coldata) == 0)
break;
}
! if (col >= NAMEI_MAXVOLS)
goto badGetFreeTag;
coldata = 1 << (col * 3);
row |= coldata;
--- 993,1002 ----
if ((row & coldata) == 0)
break;
}
! if (col >= NAMEI_MAXVOLS) {
! errno = ENOSPC;
goto badGetFreeTag;
+ }
coldata = 1 << (col * 3);
row |= coldata;
Index: openafs/src/vol/vnode.c
diff -c openafs/src/vol/vnode.c:1.27.2.4 openafs/src/vol/vnode.c:1.27.2.5
*** openafs/src/vol/vnode.c:1.27.2.4 Mon Feb 4 13:51:39 2008
--- openafs/src/vol/vnode.c Mon Oct 27 19:41:47 2008
***************
*** 20,26 ****
#define MAXINT (~(1<<((sizeof(int)*8)-1)))
RCSID
! ("$Header: /cvs/openafs/src/vol/vnode.c,v 1.27.2.4 2008/02/04 18:51:39 shadow Exp $");
#include
#include
--- 20,26 ----
#define MAXINT (~(1<<((sizeof(int)*8)-1)))
RCSID
! ("$Header: /cvs/openafs/src/vol/vnode.c,v 1.27.2.5 2008/10/27 23:41:47 shadow Exp $");
#include
#include
***************
*** 109,117 ****
static afs_int32 theLog[THELOGSIZE];
static afs_int32 vnLogPtr = 0;
void
! VNLog(aop, anparms, av1, av2, av3, av4)
! afs_int32 aop, anparms;
! afs_int32 av1, av2, av3, av4;
{
register afs_int32 temp;
afs_int32 data[4];
--- 109,116 ----
static afs_int32 theLog[THELOGSIZE];
static afs_int32 vnLogPtr = 0;
void
! VNLog(afs_int32 aop, afs_int32 anparms, afs_int32 av1, afs_int32 av2,
! afs_int32 av3, afs_int32 av4)
{
register afs_int32 temp;
afs_int32 data[4];
***************
*** 487,493 ****
if (Vn_refcount(vnp) != 0 || CheckLock(&vnp->lock))
Abort("VGetFreeVnode_r: locked vnode in lruq");
#endif
! VNLog(1, 2, Vn_id(vnp), (afs_int32) vnp);
/*
* it's going to be overwritten soon enough.
--- 486,492 ----
if (Vn_refcount(vnp) != 0 || CheckLock(&vnp->lock))
Abort("VGetFreeVnode_r: locked vnode in lruq");
#endif
! VNLog(1, 2, Vn_id(vnp), (afs_int32) vnp, 0, 0);
/*
* it's going to be overwritten soon enough.
***************
*** 654,666 ****
*/
vnrehash:
! VNLog(2, 1, vnodeNumber);
/* Prepare to move it to the new hash chain */
vnp = VLookupVnode(vp, vnodeNumber);
if (vnp) {
/* slot already exists. May even not be in lruq (consider store file locking a file being deleted)
* so we may have to wait for it below */
! VNLog(3, 2, vnodeNumber, (afs_int32) vnp);
VnCreateReservation_r(vnp);
if (Vn_refcount(vnp) == 1) {
--- 653,665 ----
*/
vnrehash:
! VNLog(2, 1, vnodeNumber, 0, 0, 0);
/* Prepare to move it to the new hash chain */
vnp = VLookupVnode(vp, vnodeNumber);
if (vnp) {
/* slot already exists. May even not be in lruq (consider store file locking a file being deleted)
* so we may have to wait for it below */
! VNLog(3, 2, vnodeNumber, (afs_int32) vnp, 0, 0);
VnCreateReservation_r(vnp);
if (Vn_refcount(vnp) == 1) {
***************
*** 817,829 ****
}
sane:
! VNLog(4, 2, vnodeNumber, (afs_int32) vnp);
#ifndef AFS_DEMAND_ATTACH_FS
AddToVnHash(vnp);
#endif
}
! VNLog(5, 1, (afs_int32) vnp);
memset(&vnp->disk, 0, sizeof(vnp->disk));
vnp->changed_newTime = 0; /* set this bit when vnode is updated */
vnp->changed_oldTime = 0; /* set this on CopyOnWrite. */
--- 816,828 ----
}
sane:
! VNLog(4, 2, vnodeNumber, (afs_int32) vnp, 0, 0);
#ifndef AFS_DEMAND_ATTACH_FS
AddToVnHash(vnp);
#endif
}
! VNLog(5, 1, (afs_int32) vnp, 0, 0, 0);
memset(&vnp->disk, 0, sizeof(vnp->disk));
vnp->changed_newTime = 0; /* set this bit when vnode is updated */
vnp->changed_oldTime = 0; /* set this on CopyOnWrite. */
***************
*** 1119,1125 ****
return NULL;
}
! VNLog(100, 1, vnodeNumber);
#ifdef AFS_DEMAND_ATTACH_FS
/*
--- 1118,1124 ----
return NULL;
}
! VNLog(100, 1, vnodeNumber, 0, 0, 0);
#ifdef AFS_DEMAND_ATTACH_FS
/*
***************
*** 1167,1173 ****
if (vnp) {
/* vnode is in cache */
! VNLog(101, 2, vnodeNumber, (afs_int32) vnp);
VnCreateReservation_r(vnp);
#ifdef AFS_DEMAND_ATTACH_FS
--- 1166,1172 ----
if (vnp) {
/* vnode is in cache */
! VNLog(101, 2, vnodeNumber, (afs_int32) vnp, 0, 0);
VnCreateReservation_r(vnp);
#ifdef AFS_DEMAND_ATTACH_FS
***************
*** 1254,1260 ****
/* Check that the vnode hasn't been removed while we were obtaining
* the lock */
! VNLog(102, 2, vnodeNumber, (afs_int32) vnp);
if ((vnp->disk.type == vNull) || (Vn_cacheCheck(vnp) == 0)) {
VnUnlock(vnp, locktype);
VnCancelReservation_r(vnp);
--- 1253,1259 ----
/* Check that the vnode hasn't been removed while we were obtaining
* the lock */
! VNLog(102, 2, vnodeNumber, (afs_int32) vnp, 0, 0);
if ((vnp->disk.type == vNull) || (Vn_cacheCheck(vnp) == 0)) {
VnUnlock(vnp, locktype);
VnCancelReservation_r(vnp);
***************
*** 1317,1323 ****
class = vnodeIdToClass(Vn_id(vnp));
vcp = &VnodeClassInfo[class];
assert(vnp->disk.vnodeMagic == vcp->magic);
! VNLog(200, 2, Vn_id(vnp), (afs_int32) vnp);
#ifdef AFS_DEMAND_ATTACH_FS
writeLocked = (Vn_state(vnp) == VN_STATE_EXCLUSIVE);
--- 1316,1322 ----
class = vnodeIdToClass(Vn_id(vnp));
vcp = &VnodeClassInfo[class];
assert(vnp->disk.vnodeMagic == vcp->magic);
! VNLog(200, 2, Vn_id(vnp), (afs_int32) vnp, 0, 0);
#ifdef AFS_DEMAND_ATTACH_FS
writeLocked = (Vn_state(vnp) == VN_STATE_EXCLUSIVE);
***************
*** 1336,1342 ****
VNLog(201, 2, (afs_int32) vnp,
((vnp->changed_newTime) << 1) | ((vnp->
changed_oldTime) << 1) | vnp->
! delete);
if (thisProcess != vnp->writer)
Abort("VPutVnode: Vnode at 0x%x locked by another process!\n",
vnp);
--- 1335,1341 ----
VNLog(201, 2, (afs_int32) vnp,
((vnp->changed_newTime) << 1) | ((vnp->
changed_oldTime) << 1) | vnp->
! delete, 0, 0);
if (thisProcess != vnp->writer)
Abort("VPutVnode: Vnode at 0x%x locked by another process!\n",
vnp);
***************
*** 1351,1357 ****
/* No longer any directory entries for this vnode. Free the Vnode */
memset(&vnp->disk, 0, sizeof(vnp->disk));
/* delete flag turned off further down */
! VNLog(202, 2, Vn_id(vnp), (afs_int32) vnp);
} else if (vnp->changed_newTime) {
vnp->disk.serverModifyTime = now;
}
--- 1350,1356 ----
/* No longer any directory entries for this vnode. Free the Vnode */
memset(&vnp->disk, 0, sizeof(vnp->disk));
/* delete flag turned off further down */
! VNLog(202, 2, Vn_id(vnp), (afs_int32) vnp, 0, 0);
} else if (vnp->changed_newTime) {
vnp->disk.serverModifyTime = now;
}
***************
*** 1458,1464 ****
class = vnodeIdToClass(Vn_id(vnp));
vcp = &VnodeClassInfo[class];
assert(vnp->disk.vnodeMagic == vcp->magic);
! VNLog(300, 2, Vn_id(vnp), (afs_int32) vnp);
#ifdef AFS_DEMAND_ATTACH_FS
writeLocked = (Vn_state(vnp) == VN_STATE_EXCLUSIVE);
--- 1457,1463 ----
class = vnodeIdToClass(Vn_id(vnp));
vcp = &VnodeClassInfo[class];
assert(vnp->disk.vnodeMagic == vcp->magic);
! VNLog(300, 2, Vn_id(vnp), (afs_int32) vnp, 0, 0);
#ifdef AFS_DEMAND_ATTACH_FS
writeLocked = (Vn_state(vnp) == VN_STATE_EXCLUSIVE);
***************
*** 1473,1479 ****
VNLog(301, 2, (afs_int32) vnp,
((vnp->changed_newTime) << 1) | ((vnp->
changed_oldTime) << 1) | vnp->
! delete);
/* sanity checks */
#ifdef AFS_PTHREAD_ENV
--- 1472,1478 ----
VNLog(301, 2, (afs_int32) vnp,
((vnp->changed_newTime) << 1) | ((vnp->
changed_oldTime) << 1) | vnp->
! delete, 0, 0);
/* sanity checks */
#ifdef AFS_PTHREAD_ENV
Index: openafs/src/vol/vol-info.c
diff -c openafs/src/vol/vol-info.c:1.22.4.2 openafs/src/vol/vol-info.c:1.22.4.3
*** openafs/src/vol/vol-info.c:1.22.4.2 Wed Mar 5 16:53:30 2008
--- openafs/src/vol/vol-info.c Sat Nov 8 10:58:18 2008
***************
*** 18,24 ****
#include
RCSID
! ("$Header: /cvs/openafs/src/vol/vol-info.c,v 1.22.4.2 2008/03/05 21:53:30 shadow Exp $");
#include
#include