<para>Microsoft Windows 2008 Server R2 (64-bit Intel)</para>
</listitem>
<listitem>
- <para>Microsoft Windows 8 Release Preview (32-bit and 64-bit Intel)</para>
- <para><emphasis role="italic">(not guaranteed to work with the final
- release)</emphasis></para>
+ <para>Microsoft Windows 8 (32-bit and 64-bit Intel)</para>
</listitem>
<listitem>
- <para>Microsoft Windows Server 2012 Release Preview (64-bit Intel)</para>
- <para><emphasis role="italic">(not guaranteed to work with the final
- release)</emphasis></para>
+ <para>Microsoft Windows Server 2012 (64-bit Intel)</para>
</listitem>
</itemizedlist>
</para>
</itemizedlist>
</para>
</section>
+ <section>
+ <title id="windows8_changes">3.56. Changes for Windows 8 and Server 2012</title>
+ <indexterm significance="normal">
+ <primary>Windows 8</primary>
+ </indexterm>
+ <indexterm significance="normal">
+ <primary>Server 2012</primary>
+ </indexterm>
+ <para>
+ In Windows 8 and Server 2012 Microsoft has introduced a new file system, ReFS, and has begun the process of transitioning away from several legacy file system properties including 8.3 compatible short names for all file system objects.
+ The OpenAFS file system has followed suit and is disabling automatic generation of 8.3 compatible names on Windows 8 and Server 2012.
+ </para>
+ </section>
</chapter>
<chapter id="chap_4">
<para>The "fs getverify" and "fs setverify {on, off}" commands can be used to query and
set this value at runtime.</para>
</section>
+ <section>
+ <title id="Regkey_TransarcAFSDaemon_Parameters_ShortNames">Value: ShortNames</title>
+ <indexterm significance="normal">
+ <primary>ShortNames</primary>
+ </indexterm>
+ <para>Regkey: [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</para>
+ <para>Type: DWORD {0, 1}
+ </para>
+ <para>
+ Default: 0 on Windows 8 and Server 2012, 1 otherwise</para>
+ <para>Determines whether or not the AFS Cache Manager will generate 8.3 compatible shortnames for all objects stored in AFS. Short names are disabled by default on Windows 8 and Server 2012. All prior operating systems enable short names by default.</para>
+ <para>0: do not generate 8.3 compatible short names.</para>
+ <para>1: generate 8.3 compatible short names.</para>
+ </section>
</section>
<section>
<title id="Regkey_TransarcAFSDaemon_Parameters_GlobalAutoMapper">Regkey:
extern int cm_dnsEnabled;
extern int cm_readonlyVolumeVersioning;
+extern int cm_shortNames;
extern long rx_mtu;
int cm_chunkSize;
int cm_virtualCache = 0;
afs_int32 cm_verifyData = 0;
+int cm_shortNames = 1;
int smb_UseV3 = 1;
afs_uint32 smb_Enabled = 1;
int cm_NetMtu[CM_MAXINTERFACE_ADDR]; /* client's MTU sizes */
int cm_NetFlags[CM_MAXINTERFACE_ADDR]; /* network flags */
DWORD dwPriority;
+ OSVERSIONINFO osVersion;
+
+ /* Get the version of Windows */
+ memset(&osVersion, 0x00, sizeof(osVersion));
+ osVersion.dwOSVersionInfoSize = sizeof(osVersion);
+ GetVersionEx(&osVersion);
WSAStartup(0x0101, &WSAjunk);
}
afsi_log("CM ReadOnlyVolumeVersioning is %u", cm_readonlyVolumeVersioning);
+ dummyLen = sizeof(DWORD);
+ code = RegQueryValueEx(parmKey, "ShortNames", NULL, NULL,
+ (BYTE *) &dwValue, &dummyLen);
+ if (code == ERROR_SUCCESS) {
+ cm_shortNames = (unsigned short) dwValue;
+ } else {
+ /* disable by default on Win8 and Server 2008 R2 */
+ if (osVersion.dwMajorVersion > 6 ||
+ osVersion.dwMajorVersion == 6 &&
+ osVersion.dwMinorVersion >= 2)
+ cm_shortNames = 0;
+ else
+ cm_shortNames = 1;
+ }
+ afsi_log("CM ShortNames is %u", cm_shortNames);
+
RegCloseKey (parmKey);
cacheBlocks = ((afs_uint64)cacheSize * 1024) / blockSize;
cm_IPAddr[0], cm_SubnetMask[0]);
/*
- * Save client configuration for GetCacheConfig requests
+ * Save client configuration for GetCacheConf\eig requests
*/
cm_initParams.nChunkFiles = 0;
cm_initParams.nStatCaches = stats;
insert(op->scp->dirBplus, key, data);
- if (!cm_Is8Dot3(entry)) {
+ if (cm_shortNames && !cm_Is8Dot3(entry)) {
cm_dirFid_t dfid;
clientchar_t wshortName[13];
}
if (rc != CM_ERROR_AMBIGUOUS_FILENAME) {
- dfid.vnode = htonl(fid.vnode);
- dfid.unique = htonl(fid.unique);
- cm_Gen8Dot3NameIntW(centry, &dfid, shortName, NULL);
-
/* delete first the long name and then the short name */
delete(op->scp->dirBplus, key);
- key.name = shortName;
- delete(op->scp->dirBplus, key);
+
+ if (cm_shortNames) {
+ dfid.vnode = htonl(fid.vnode);
+ dfid.unique = htonl(fid.unique);
+ cm_Gen8Dot3NameIntW(centry, &dfid, shortName, NULL);
+
+ key.name = shortName;
+ delete(op->scp->dirBplus, key);
+ }
}
} /* !NONODE */
} else {
/* the Write lock is held in cm_BPlusDirBuildTree() */
insert(scp->dirBplus, key, data);
- if (!cm_Is8Dot3(data.cname)) {
+ if (cm_shortNames && !cm_Is8Dot3(data.cname)) {
cm_dirFid_t dfid;
wchar_t wshortName[13];
enump->entry[count].name = name;
enump->entry[count].fid = getdatavalue(dataNode).fid;
- if (!cm_Is8Dot3(name)) {
- cm_dirFid_t dfid;
+ if (cm_shortNames) {
+ if (!cm_Is8Dot3(name)) {
+ cm_dirFid_t dfid;
- dfid.vnode = htonl(getdatavalue(dataNode).fid.vnode);
- dfid.unique = htonl(getdatavalue(dataNode).fid.unique);
+ dfid.vnode = htonl(getdatavalue(dataNode).fid.vnode);
+ dfid.unique = htonl(getdatavalue(dataNode).fid.unique);
- cm_Gen8Dot3NameIntW(name, &dfid, enump->entry[count].shortName, NULL);
- } else {
- StringCbCopyW(enump->entry[count].shortName,
- sizeof(enump->entry[count].shortName),
- name);
+ cm_Gen8Dot3NameIntW(name, &dfid, enump->entry[count].shortName, NULL);
+ } else {
+ StringCbCopyW(enump->entry[count].shortName,
+ sizeof(enump->entry[count].shortName),
+ name);
+ }
}
count++;
if (match != 0
&& sp->hasTilde
+ && cm_shortNames
&& !cm_Is8Dot3(matchName)) {
cm_Gen8Dot3NameInt(dep->name, &dep->fid, matchName, NULL);
/* Compute 8.3 name if necessary */
actualName = cm_FsStringToClientStringAlloc(dep->name, -1, NULL);
- if (dep->fid.vnode != 0 && !cm_Is8Dot3(actualName)) {
+ if (dep->fid.vnode != 0 && cm_shortNames && !cm_Is8Dot3(actualName)) {
if (actualName)
free(actualName);
cm_Gen8Dot3NameInt(dep->name, &dep->fid, shortName, &shortNameEnd);
match = cm_MatchMask(matchName, rockp->maskp, caseFold);
if (!match &&
(rockp->flags & SMB_MASKFLAG_TILDE) &&
+ cm_shortNames &&
!cm_Is8Dot3(matchName)) {
cm_Gen8Dot3Name(dep, matchName, NULL);
/* 8.3 matches are always case insensitive */
match = cm_MatchMask(matchName, rockp->maskp, caseFold);
if (!match &&
(rockp->flags & SMB_MASKFLAG_TILDE) &&
+ cm_shortNames &&
!cm_Is8Dot3(matchName)) {
cm_Gen8Dot3Name(dep, matchName, NULL);
match = cm_MatchMask(matchName, rockp->maskp, caseFold);
match = (cm_ClientStrCmp(matchName, rockp->maskp) == 0);
if (!match &&
(rockp->flags & SMB_MASKFLAG_TILDE) &&
+ cm_shortNames &&
!cm_Is8Dot3(matchName)) {
cm_Gen8Dot3Name(dep, matchName, NULL);
match = (cm_ClientStrCmpI(matchName, rockp->maskp) == 0);
return 0;
}
- if (!cm_Is8Dot3(matchName)) {
+ if (cm_shortNames && !cm_Is8Dot3(matchName)) {
clientchar_t shortName[13];
cm_Gen8Dot3Name(dep, shortName, NULL);
fp = (smb_tran2Find_t *) op;
- if (infoLevel == SMB_FIND_FILE_BOTH_DIRECTORY_INFO
- && !cm_Is8Dot3(maskp)) {
+ if (infoLevel == SMB_FIND_FILE_BOTH_DIRECTORY_INFO &&
+ cm_shortNames && !cm_Is8Dot3(maskp)) {
/*
* Since the _._AFS_IOCTL_._ file does not actually exist
/* Need 8.3 name? */
NeedShortName = 0;
if (infoLevel == SMB_FIND_FILE_BOTH_DIRECTORY_INFO &&
+ cm_shortNames &&
!cm_Is8Dot3(cfileName)) {
cm_Gen8Dot3Name(dep, shortName, &shortNameEnd);
NeedShortName = 1;
*pRedirInitInfoLen = (DWORD) (sizeof(AFSRedirectorInitInfo) + (cm_CachePathLen + TempPathLen) * sizeof(WCHAR));
*ppRedirInitInfo = (AFSRedirectorInitInfo *)malloc(*pRedirInitInfoLen);
(*ppRedirInitInfo)->Flags = smb_hideDotFiles ? AFS_REDIR_INIT_FLAG_HIDE_DOT_FILES : 0;
+ (*ppRedirInitInfo)->Flags |= cm_shortNames ? 0 : AFS_REDIR_INIT_FLAG_DISABLE_SHORTNAMES;
(*ppRedirInitInfo)->MaximumChunkLength = cm_data.chunkSize;
(*ppRedirInitInfo)->GlobalFileId.Cell = cm_data.rootFid.cell;
(*ppRedirInitInfo)->GlobalFileId.Volume = cm_data.rootFid.volume;
code = RDR_PopulateCurrentEntry( pCurrentEntry, dwMaxEntryLength,
dscp, scp, userp, &req,
entryp->name,
- cm_Is8Dot3(entryp->name) ? NULL : entryp->shortName,
+ cm_shortNames && cm_Is8Dot3(entryp->name) ? NULL : entryp->shortName,
(bWow64 ? RDR_POP_WOW64 : 0) |
(bSkipStatus ? RDR_POP_NO_GETSTATUS : 0),
code,
code = RDR_PopulateCurrentEntryNoScp( pCurrentEntry, dwMaxEntryLength,
dscp, &entryp->fid, userp, &req,
entryp->name,
- cm_Is8Dot3(entryp->name) ? NULL : entryp->shortName,
+ cm_shortNames && cm_Is8Dot3(entryp->name) ? NULL : entryp->shortName,
(bWow64 ? RDR_POP_WOW64 : 0),
code,
&pCurrentEntry, &dwMaxEntryLength);
if (code == 0 && scp) {
wchar_t shortName[13]=L"";
- if (bVol) {
+ if (!cm_shortNames) {
+ shortName[0] = L'\0';
+ } else if (bVol) {
cm_Gen8Dot3VolNameW(scp->fid.cell, scp->fid.volume, shortName, NULL);
} else if (!cm_Is8Dot3(wszName)) {
cm_dirFid_t dfid;
cm_Gen8Dot3NameIntW(FileName, &dfid, shortName, NULL);
} else {
- shortName[0] = '\0';
+ shortName[0] = L'\0';
}
code = RDR_PopulateCurrentEntry(pCurrentEntry, dwRemaining,
cm_SyncOpDone(dscp, NULL, CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS);
lock_ReleaseWrite(&dscp->rw);
- dfid.vnode = htonl(scp->fid.vnode);
- dfid.unique = htonl(scp->fid.unique);
+ if (cm_shortNames) {
+ dfid.vnode = htonl(scp->fid.vnode);
+ dfid.unique = htonl(scp->fid.unique);
- if (!cm_Is8Dot3(FileName))
- cm_Gen8Dot3NameIntW(FileName, &dfid, shortName, NULL);
- else
- shortName[0] = '\0';
+ if (!cm_Is8Dot3(FileName))
+ cm_Gen8Dot3NameIntW(FileName, &dfid, shortName, NULL);
+ else
+ shortName[0] = '\0';
+ }
code = RDR_PopulateCurrentEntry(&pResultCB->DirEnum, dwRemaining,
dscp, scp, userp, &req, FileName, shortName,
cm_SyncOpDone(scp, NULL, CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS);
lock_ReleaseWrite(&scp->rw);
- dfid.vnode = htonl(scp->fid.vnode);
- dfid.unique = htonl(scp->fid.unique);
+ if (cm_shortNames) {
+ dfid.vnode = htonl(scp->fid.vnode);
+ dfid.unique = htonl(scp->fid.unique);
- if (!cm_Is8Dot3(TargetFileName))
- cm_Gen8Dot3NameIntW(TargetFileName, &dfid, shortName, NULL);
- else
- shortName[0] = '\0';
+ if (!cm_Is8Dot3(TargetFileName))
+ cm_Gen8Dot3NameIntW(TargetFileName, &dfid, shortName, NULL);
+ else
+ shortName[0] = '\0';
+ }
RDR_PopulateCurrentEntry(&pResultCB->DirEnum, dwRemaining,
newDscp, scp, userp, &req, TargetFileName, shortName,