From f17fe1ca6ab87af672e4ac1b42c5478c8e13cf1e Mon Sep 17 00:00:00 2001 From: Nathan Neulinger Date: Mon, 3 Mar 2003 15:13:40 +0000 Subject: [PATCH] flock-sysid-20030303 FIXES 1325 featurize flock sysid --- src/afs/VNOPS/afs_vnop_flock.c | 26 +++++++++++++------------- src/config/param.rs_aix42.h | 4 ++++ src/config/param.rs_aix51.h | 4 ++++ src/config/param.sgi_62.h | 2 ++ src/config/param.sgi_63.h | 2 ++ src/config/param.sgi_64.h | 2 ++ src/config/param.sgi_65.h | 2 ++ src/config/param.sun4x_55.h | 2 ++ src/config/param.sun4x_56.h | 2 ++ src/config/param.sun4x_57.h | 2 ++ src/config/param.sun4x_58.h | 2 ++ src/config/param.sun4x_59.h | 2 ++ src/config/param.sunx86_54.h | 2 ++ src/config/param.sunx86_57.h | 3 +++ src/config/param.sunx86_58.h | 2 ++ 15 files changed, 46 insertions(+), 13 deletions(-) diff --git a/src/afs/VNOPS/afs_vnop_flock.c b/src/afs/VNOPS/afs_vnop_flock.c index b586a912b..89f97b415 100644 --- a/src/afs/VNOPS/afs_vnop_flock.c +++ b/src/afs/VNOPS/afs_vnop_flock.c @@ -183,7 +183,7 @@ static int lockIdcmp2(struct AFS_FLOCK *flock1, struct vcache *vp, } for (slp = vp->slocks; slp; slp = slp->next) { -#if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) +#if defined(AFS_HAVE_FLOCK_SYSID) if (flock1->l_sysid != slp->sysid) { continue; } @@ -611,7 +611,7 @@ static int HandleGetLock(register struct vcache *avc, af->l_type = F_WRLCK; af->l_pid = 0; -#if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) +#if defined(AFS_HAVE_FLOCK_SYSID) af->l_sysid = 0; #endif goto done; @@ -633,12 +633,12 @@ static int HandleGetLock(register struct vcache *avc, af->l_type = F_WRLCK; /* not us, so lock would block */ if (avc->slocks) { /* we know who, so tell */ af->l_pid = avc->slocks->pid; -#if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) +#if defined(AFS_HAVE_FLOCK_SYSID) af->l_sysid = avc->slocks->sysid; #endif } else { af->l_pid = 0; /* XXX can't happen?? */ -#if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) +#if defined(AFS_HAVE_FLOCK_SYSID) af->l_sysid = 0; #endif } @@ -654,12 +654,12 @@ static int HandleGetLock(register struct vcache *avc, af->l_type = F_WRLCK; if (avc->slocks) { af->l_pid = avc->slocks->pid; -#if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) +#if defined(AFS_HAVE_FLOCK_SYSID) af->l_sysid = avc->slocks->sysid; #endif } else { af->l_pid = 0; /* XXX can't happen?? */ -#if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) +#if defined(AFS_HAVE_FLOCK_SYSID) af->l_sysid = 0; #endif } @@ -680,14 +680,14 @@ static int HandleGetLock(register struct vcache *avc, af->l_type = F_RDLCK; af->l_pid = 0; -#if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) +#if defined(AFS_HAVE_FLOCK_SYSID) af->l_sysid = 0; #endif /* find a pid that isn't our own */ for (slp = avc->slocks; slp; slp = slp->next) { if (lockIdcmp2(&flock, NULL, slp, 1, clid)) { af->l_pid = slp->pid; -#if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) +#if defined(AFS_HAVE_FLOCK_SYSID) af->l_sysid = avc->slocks->sysid; #endif break; @@ -705,12 +705,12 @@ static int HandleGetLock(register struct vcache *avc, af->l_type = F_WRLCK; if (avc->slocks) { af->l_pid = avc->slocks->pid; -#if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) +#if defined(AFS_HAVE_FLOCK_SYSID) af->l_sysid = avc->slocks->sysid; #endif } else { af->l_pid = 0; /* XXX can't happen?? */ -#if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) +#if defined(AFS_HAVE_FLOCK_SYSID) af->l_sysid = 0; #endif } @@ -730,14 +730,14 @@ static int HandleGetLock(register struct vcache *avc, struct SimpleLocks *slp; af->l_type = F_RDLCK; af->l_pid = 0; -#if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) +#if defined(AFS_HAVE_FLOCK_SYSID) af->l_sysid = 0; #endif /* find a pid that isn't our own */ for (slp = avc->slocks; slp; slp = slp->next) { if (lockIdcmp2(&flock, NULL, slp, 1, clid)) { af->l_pid = slp->pid; -#if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) +#if defined(AFS_HAVE_FLOCK_SYSID) af->l_sysid = avc->slocks->sysid; #endif break; @@ -761,7 +761,7 @@ static int HandleGetLock(register struct vcache *avc, else af->l_type = F_WRLCK; af->l_pid = 0; -#if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) +#if defined(AFS_HAVE_FLOCK_SYSID) af->l_sysid = 0; #endif diff --git a/src/config/param.rs_aix42.h b/src/config/param.rs_aix42.h index 2780b2af9..8e8401a9c 100644 --- a/src/config/param.rs_aix42.h +++ b/src/config/param.rs_aix42.h @@ -25,6 +25,8 @@ #define AFS_64BIT_IOPS_ENV 1 /* needed for NAMEI... */ #endif +#define AFS_HAVE_FLOCK_SYSID 1 + #include /* Global lock in AFS part of client. */ @@ -118,6 +120,8 @@ #define AFS_AIX41_ENV 1 #define AFS_AIX42_ENV 1 +#define AFS_HAVE_FLOCK_SYSID 1 + #endif /* KERNEL */ #include diff --git a/src/config/param.rs_aix51.h b/src/config/param.rs_aix51.h index 8c907683d..e4eef34ba 100644 --- a/src/config/param.rs_aix51.h +++ b/src/config/param.rs_aix51.h @@ -28,6 +28,8 @@ #define BITMAP_LATER 1 #define FAST_RESTART 1 +#define AFS_HAVE_FLOCK_SYSID 1 + #include /* Global lock in AFS part of client. */ @@ -129,6 +131,8 @@ #define AFS_AIX42_ENV 1 #define AFS_AIX51_ENV 1 +#define AFS_HAVE_FLOCK_SYSID 1 + #endif /* KERNEL */ #include diff --git a/src/config/param.sgi_62.h b/src/config/param.sgi_62.h index da0a3f63e..02ebcce39 100644 --- a/src/config/param.sgi_62.h +++ b/src/config/param.sgi_62.h @@ -27,6 +27,8 @@ #define AFS_SGI_EXMAG 1 /* use magic fields in extents for AFS extra fields */ /* AFS_SGI_SHORTSTACK not required since we have a 16K stack. */ +#define AFS_HAVE_FLOCK_SYSID 1 + #define AFS_PAG_LAST_ENV 1 /* PAG comes last in groups. */ #define _ANSI_C_SOURCE 1 /* rx_user.h */ diff --git a/src/config/param.sgi_63.h b/src/config/param.sgi_63.h index 003f84fe5..fa97ad919 100644 --- a/src/config/param.sgi_63.h +++ b/src/config/param.sgi_63.h @@ -28,6 +28,8 @@ #define AFS_SGI_EXMAG 1 /* use magic fields in extents for AFS extra fields */ /* AFS_SGI_SHORTSTACK not required since we have a 16K stack. */ +#define AFS_HAVE_FLOCK_SYSID 1 + #define _ANSI_C_SOURCE 1 /* rx_user.h */ #define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */ diff --git a/src/config/param.sgi_64.h b/src/config/param.sgi_64.h index 589e26825..dfcec84f8 100644 --- a/src/config/param.sgi_64.h +++ b/src/config/param.sgi_64.h @@ -29,6 +29,8 @@ #define AFS_SGI_EXMAG 1 /* use magic fields in extents for AFS extra fields */ /* AFS_SGI_SHORTSTACK not required since we have a 16K stack. */ +#define AFS_HAVE_FLOCK_SYSID 1 + #define _ANSI_C_SOURCE 1 /* rx_user.h */ #define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */ diff --git a/src/config/param.sgi_65.h b/src/config/param.sgi_65.h index 9a82b8daf..90b0752c5 100644 --- a/src/config/param.sgi_65.h +++ b/src/config/param.sgi_65.h @@ -30,6 +30,8 @@ #define AFS_SGI_EXMAG 1 /* use magic fields in extents for AFS extra fields */ /* AFS_SGI_SHORTSTACK not required since we have a 16K stack. */ +#define AFS_HAVE_FLOCK_SYSID 1 + #define RXK_LISTENER_ENV 1 /* Use an rx listener daemon */ #define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */ diff --git a/src/config/param.sun4x_55.h b/src/config/param.sun4x_55.h index 1911cbe88..1a7408cae 100644 --- a/src/config/param.sun4x_55.h +++ b/src/config/param.sun4x_55.h @@ -26,6 +26,8 @@ #define AFS_SUN54_ENV 1 #define AFS_SUN55_ENV 1 +#define AFS_HAVE_FLOCK_SYSID 1 + #include #define RXK_LISTENER_ENV 1 diff --git a/src/config/param.sun4x_56.h b/src/config/param.sun4x_56.h index 396ffb321..16e3c1f85 100644 --- a/src/config/param.sun4x_56.h +++ b/src/config/param.sun4x_56.h @@ -35,6 +35,8 @@ #define AFS_3DISPARES 1 /* Utilize the 3 available disk inode 'spares' */ #define AFS_SYSCALL 105 +#define AFS_HAVE_FLOCK_SYSID 1 + /* File system entry (used if mount.h doesn't define MOUNT_AFS */ #define AFS_MOUNT_AFS "afs" diff --git a/src/config/param.sun4x_57.h b/src/config/param.sun4x_57.h index 0d6e34886..6a2af5025 100644 --- a/src/config/param.sun4x_57.h +++ b/src/config/param.sun4x_57.h @@ -30,6 +30,8 @@ #define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */ +#define AFS_HAVE_FLOCK_SYSID 1 + #include #define AFS_GLOBAL_SUNLOCK 1 /* For global locking */ diff --git a/src/config/param.sun4x_58.h b/src/config/param.sun4x_58.h index badc6454d..573608a11 100644 --- a/src/config/param.sun4x_58.h +++ b/src/config/param.sun4x_58.h @@ -22,6 +22,8 @@ #define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */ +#define AFS_HAVE_FLOCK_SYSID 1 + #ifdef AFS_NAMEI_ENV #define AFS_64BIT_IOPS_ENV 1 /* needed for NAMEI... */ #else /* AFS_NAMEI_ENV */ diff --git a/src/config/param.sun4x_59.h b/src/config/param.sun4x_59.h index edb847a00..5be317847 100644 --- a/src/config/param.sun4x_59.h +++ b/src/config/param.sun4x_59.h @@ -23,6 +23,8 @@ #define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */ +#define AFS_HAVE_FLOCK_SYSID 1 + #ifdef AFS_NAMEI_ENV #define AFS_64BIT_IOPS_ENV 1 /* needed for NAMEI... */ #else /* AFS_NAMEI_ENV */ diff --git a/src/config/param.sunx86_54.h b/src/config/param.sunx86_54.h index 29ffa171e..5cd670f20 100644 --- a/src/config/param.sunx86_54.h +++ b/src/config/param.sunx86_54.h @@ -28,6 +28,8 @@ #define AFS_SUN54_ENV 1 #define AFS_X86_ENV 1 +#define AFS_HAVE_FLOCK_SYSID 1 + #include #define AFS_GLOBAL_SUNLOCK 1 /* For global locking */ diff --git a/src/config/param.sunx86_57.h b/src/config/param.sunx86_57.h index 5fb943a79..d4dd16e8a 100644 --- a/src/config/param.sunx86_57.h +++ b/src/config/param.sunx86_57.h @@ -31,6 +31,9 @@ #define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */ +#define AFS_HAVE_FLOCK_SYSID 1 + + #include #define AFS_GLOBAL_SUNLOCK 1 /* For global locking */ diff --git a/src/config/param.sunx86_58.h b/src/config/param.sunx86_58.h index 31ec5744c..ad0ccd40c 100644 --- a/src/config/param.sunx86_58.h +++ b/src/config/param.sunx86_58.h @@ -32,6 +32,8 @@ #define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */ +#define AFS_HAVE_FLOCK_SYSID 1 + #include #define AFS_GLOBAL_SUNLOCK 1 /* For global locking */ -- 2.39.5