From: Marcio Barbosa Date: Thu, 12 Oct 2017 15:42:40 +0000 (-0300) Subject: macos: make the OpenAFS client aware of APFS X-Git-Tag: upstream/1.8.0_pre4^3~12 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=d9bb508e07f32219679c0e696f07f95e3b48886c;p=packages%2Fo%2Fopenafs.git macos: make the OpenAFS client aware of APFS Apple has introduced a new file system called APFS. Starting from High Sierra, APFS replaces Mac OS Extended (HFS+) as the default file system for solid-state drives and other flash storage devices. The current OpenAFS client is not aware of APFS. As a result, the installation of the current client into an APFS volume will panic the machine. To fix this problem, make the OpenAFS client aware of APFS. Reviewed-on: https://gerrit.openafs.org/12743 Tested-by: BuildBot Reviewed-by: Mark Vitale Reviewed-by: Benjamin Kaduk (cherry picked from commit 6e57b22642bafb177e0931b8fb24042707d6d62f) Change-Id: I60d2a57fae3ee227bb3327a5e18962f46b49c991 Reviewed-on: https://gerrit.openafs.org/12827 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk --- diff --git a/src/afs/DARWIN/osi_file.c b/src/afs/DARWIN/osi_file.c index a83dbf2e5..19bfdf9b7 100644 --- a/src/afs/DARWIN/osi_file.c +++ b/src/afs/DARWIN/osi_file.c @@ -53,6 +53,10 @@ afs_InitDualFSCacheOps(struct vnode *vp) else if (strncmp("ufs", vp->v_mount->mnt_vfc->vfc_name, 3) == 0) #endif afs_CacheFSType = AFS_APPL_UFS_CACHE; +#ifdef AFS_DARWIN80_ENV + else if (strncmp("apfs", buffer, 4) == 0) + afs_CacheFSType = AFS_APPL_APFS_CACHE; +#endif else osi_Panic("Unknown cache vnode type\n"); #ifdef AFS_DARWIN80_ENV diff --git a/src/afs/DARWIN/osi_machdep.h b/src/afs/DARWIN/osi_machdep.h index 175005291..a4f01b3e1 100644 --- a/src/afs/DARWIN/osi_machdep.h +++ b/src/afs/DARWIN/osi_machdep.h @@ -214,6 +214,7 @@ extern struct lock__bsd__ afs_global_lock; #define AFS_APPL_UFS_CACHE 1 #define AFS_APPL_HFS_CACHE 2 +#define AFS_APPL_APFS_CACHE 3 extern ino_t VnodeToIno(vnode_t avp); extern dev_t VnodeToDev(vnode_t vp);