int cr_ngroups;
} cred_t;
#define AFS_UCRED cred
+#define AFS_PROC struct task_struct
#define crhold(c) (c)->cr_ref++
/* UIO manipulation */
{3, "hm_retry_int",
&hm_retry_int, sizeof(afs_int32), 0644, NULL,
&proc_dointvec},
+ {4, "GCPAGs",
+ &afs_gcpags, sizeof(afs_int32), 0644, NULL,
+ &proc_dointvec},
{0}
};
}
#endif
+#if defined(AFS_LINUX22_ENV)
+void afs_osi_TraverseProcTable()
+{
+ struct task_struct *p;
+ for_each_task(p) if (p->pid) {
+ if (p->state & TASK_ZOMBIE)
+ continue;
+#if 0
+ if (p->flags & )
+ continue;
+#endif
+ afs_GCPAGs_perproc_func(p);
+ }
+}
+#endif
+
/* return a pointer (sometimes a static copy ) to the cred for a
* given AFS_PROC.
* subsequent calls may overwrite the previously returned value.
return rv;
}
+#elif defined(AFS_LINUX22_ENV)
+const struct AFS_UCRED *afs_osi_proc2cred(AFS_PROC *pr)
+{
+ struct AFS_UCRED *rv=NULL;
+ static struct AFS_UCRED cr;
+
+ if(pr == NULL) {
+ return NULL;
+ }
+
+ if ((pr->state == TASK_RUNNING) ||
+ (pr->state == TASK_INTERRUPTIBLE) ||
+ (pr->state == TASK_UNINTERRUPTIBLE) ||
+ (pr->state == TASK_STOPPED)) {
+ read_lock(&tasklist_lock);
+ cr.cr_ref=1;
+ cr.cr_uid=pr->uid;
+ cr.cr_ngroups=pr->ngroups;
+ memcpy(cr.cr_groups, pr->groups, NGROUPS * sizeof(gid_t));
+ read_unlock(&tasklist_lock);
+ rv = &cr;
+ }
+
+ return rv;
+}
#else
const struct AFS_UCRED *afs_osi_proc2cred(AFS_PROC *pr)
{
#define AFS_USERSPACE_IP_ADDR 1
#define RXK_LISTENER_ENV 1
-#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
+#define AFS_GCPAGS 2 /* Set to Userdisabled, allow sysctl to override */
/* Machine / Operating system information */
#define SYS_NAME "alpha_linux_22"
#define AFS_USERSPACE_IP_ADDR 1
#define RXK_LISTENER_ENV 1
-#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
+#define AFS_GCPAGS 2 /* Set to Userdisabled, allow sysctl to override */
/* Machine / Operating system information */
#define SYS_NAME "alpha_linux_24"
#define AFS_USERSPACE_IP_ADDR 1
#define RXK_LISTENER_ENV 1
-#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
+#define AFS_GCPAGS 2 /* Set to Userdisabled, allow sysctl to override */
+
/* Machine / Operating system information */
#define SYS_NAME "i386_linux22"
#include <afs/afs_sysnames.h>
#define AFS_USERSPACE_IP_ADDR 1
#define RXK_LISTENER_ENV 1
-#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
+#define AFS_GCPAGS 2 /* Set to Userdisabled, allow sysctl to override */
#define AFSLITTLE_ENDIAN 1
#define AFS_HAVE_FFS 1 /* Use system's ffs. */
#define AFS_USERSPACE_IP_ADDR 1
#define RXK_LISTENER_ENV 1
-#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
+#define AFS_GCPAGS 2 /* Set to Userdisabled, allow sysctl to override */
/* Machine / Operating system information */
#define SYS_NAME "ia64_linux24"
#define AFS_USERSPACE_IP_ADDR 1
#define RXK_LISTENER_ENV 1
-#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
-
+#define AFS_GCPAGS 2 /* Set to Userdisabled, allow sysctl to override */
/* Machine / Operating system information */
#define SYS_NAME "parisc_linux24"
#define AFS_USERSPACE_IP_ADDR 1
#define RXK_LISTENER_ENV 1
-#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
-
+#define AFS_GCPAGS 2 /* Set to Userdisabled, allow sysctl to override */
/* Machine / Operating system information */
#define SYS_NAME "ppc_linux22"
#define AFS_USERSPACE_IP_ADDR 1
#define RXK_LISTENER_ENV 1
-#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
-
+#define AFS_GCPAGS 2 /* Set to Userdisabled, allow sysctl to override */
/* Machine / Operating system information */
#define SYS_NAME "ppc_linux24"
#define AFS_USERSPACE_IP_ADDR 1
#define RXK_LISTENER_ENV 1
-#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
+#define AFS_GCPAGS 2 /* Set to Userdisabled, allow sysctl to override */
/* Machine / Operating system information */
#define SYS_NAME "s390_linux22"
#define AFS_USERSPACE_IP_ADDR 1
#define RXK_LISTENER_ENV 1
-#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
+#define AFS_GCPAGS 2 /* Set to Userdisabled, allow sysctl to override */
/* Machine / Operating system information */
#define SYS_NAME "s390_linux24"
#define AFS_USERSPACE_IP_ADDR 1
#define RXK_LISTENER_ENV 1
-#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
+#define AFS_GCPAGS 2 /* Set to Userdisabled, allow sysctl to override */
/* Machine / Operating system information */
#define SYS_NAME "sparc_linux22"
#define AFS_USERSPACE_IP_ADDR 1
#define RXK_LISTENER_ENV 1
-#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
+#define AFS_GCPAGS 2 /* Set to Userdisabled, allow sysctl to override */
/* Machine / Operating system information */
#define SYS_NAME "sparc_linux24"