[OpenAFS-devel] Solaris 8 patch 108528-20 breaks afs module

Douglas E. Engert deengert@anl.gov
Tue, 06 May 2003 12:41:22 -0500


Looking at the OpenAFS src/afs/Solaris/osi_vfsops.c  it would appear the
read_binding_file does not need to be called at all on sun4x_58.

This is based on the fact that the /etc/name_to_sysnum file already has "afs"
defined, Sun says the read_binding_file should not be called, (and I am 
surprised that AFS ever called it) and that the make_syscallname("afs", AFS_SYSCALL);
was ifdefed out already for AFS_SUN58_ENV. 

I have not tried this but a possible fix for the problem could be 
to ifdef out a lot more by moving the #if !defined(AFS_SUN58_ENV) 
and #endif  This should work on any Sun4x_58 with or without the patch,
as the sysent should have been setup by the OS, and the AFS code should
not have to touch it. 

Any comments?


*** ,osi_vfsops.c       Tue Oct 15 22:58:23 2002
--- osi_vfsops.c        Tue May  6 11:11:15 2003
***************
*** 448,453 ****
--- 448,454 ----
  #endif
  #endif
  #endif
+ #if !defined(AFS_SUN58_ENV)
      /* 
       * Re-read the /etc/name_to_sysnum file to make sure afs isn't added after
       * reboot.  Ideally we would like to call modctl_read_sysbinding_file() but
***************
*** 465,473 ****
  #else
      read_binding_file(sysbind, sb_hashtab);
  #endif
- #if !defined(AFS_SUN58_ENV)
      make_syscallname("afs", AFS_SYSCALL);
- #endif
  
      if (sysent[AFS_SYSCALL].sy_call == nosys) {
        if ((sysn = mod_getsysname(AFS_SYSCALL)) != NULL) {
--- 466,472 ----
***************
*** 481,486 ****
--- 480,486 ----
  #endif        
        }
      }
+ #endif
  
      osi_Init();                               /* initialize global lock, etc */




Frank Batschulat wrote:
> 
> >Delivered-To: openafs-devel@openafs.org
> >From: Sergio Gelato <Sergio.Gelato@astro.su.se>
> >To: openafs-devel@openafs.org
> >
> >Sun has just added a third argument to read_binding_file() in Solaris 8
> >kernel patch 108528-20 (and is likely to do the same in a future Solaris
> >9 patch). The new prototype from <sys/modctl.h> is
> >
> >extern int read_binding_file(char *, struct bind **,
> >    int (*line_parser)(char *, int, char *, struct bind **));
> >
> >I hope, but am not at all certain, that passing a NULL line_parser will
> >do the right thing.
> 
> A callback "int (*line_parser)(char *, int, char *, struct bind **)"
> is invoked for each line of the files parsed.
> 
> However, the new code checks for *line_parse being NULL and
> is a NOP in that case, though you cant really depend on that
> not changing in the future.
> 
> ---
> frankB
> 
> ----------------------------------------------------------
> Frank Batschulat                 Solaris Filesystems Group
> 
> _______________________________________________
> OpenAFS-devel mailing list
> OpenAFS-devel@openafs.org
> https://lists.openafs.org/mailman/listinfo/openafs-devel

-- 

 Douglas E. Engert  <DEEngert@anl.gov>
 Argonne National Laboratory
 9700 South Cass Avenue
 Argonne, Illinois  60439 
 (630) 252-5444