[OpenAFS-devel] weird issue with reiserfs on 2.4.3 and openafs

Derek Atkins warlord@MIT.EDU
11 Apr 2001 10:06:05 -0400


Most likely the problem is with the call to iget().  I seem to recall
that being a problem on reiserfs.

-derek

"Neulinger, Nathan" <nneul@umr.edu> writes:

> If I attempt to run afs on a afscache partition on reiserfs with 2.4.3 that
> is already created (i.e. after the first time) I get this:
> 
> Apr 11 08:15:29 srvtst02 kernel: Starting AFS cache scan...Can't open inode
> 5
> ... oops snipped since it's just a trace to osi_panic in afsd...
> Apr 11 08:15:29 srvtst02 kernel: 
> Apr 11 08:15:36 srvtst02 kernel: vs-13048: reiserfs_iget: bad_inode. Stat
> data of (2 5) not found
> Apr 11 08:17:03 srvtst02 kernel: vs-13048: reiserfs_iget: bad_inode. Stat
> data of (2 5) not found
> 
> The important part is that can't open inode 5, which corresponds to
> /afscache/V0, which would be the first file afsd would attempt to open. 
> 
> Those vs-13048 errors come after afsd has segfaulted and I attempt to cat
> /afscache/V0, which gives permission denied. Note - before I ran afsd, and
> after I reboot, V0 is fine.
> 
> Note also - this ONLY happens after the first time. If I run it with the
> initial empty /afscache, it works fine that first time only. Also works
> fine. 
> 
> For testing I ran this with a 45MB cache, yielding 4500 cache nodes, which
> should be well below any kernel inode limits, etc. 
> 
> This is the code that handles the open:
> 
> ----------
> void *osi_UFSOpen(ainode)
>     afs_int32 ainode;
> {
>     struct inode *ip;
>     register struct osi_file *afile = NULL;
>     extern int cacheDiskType;
>     afs_int32 code = 0;
>     int dummy;
>     struct inode *tip = NULL;
>     struct file *filp = NULL;
>     AFS_STATCNT(osi_UFSOpen);
>     if(cacheDiskType != AFS_FCACHE_TYPE_UFS) {
>     osi_Panic("UFSOpen called for non-UFS cache\n");
>     }
>     if (!afs_osicred_initialized) {
>     /* valid for alpha_osf, SunOS, Ultrix */
>     bzero((char *)&afs_osi_cred, sizeof(struct AFS_UCRED));
>     crhold(&afs_osi_cred);  /* don't let it evaporate, since it is static */
>     afs_osicred_initialized = 1;
>     }
>     afile = (struct osi_file *) osi_AllocSmallSpace(sizeof(struct
> osi_file));
>     AFS_GUNLOCK();
>     if (!afile) {
>     osi_Panic("osi_UFSOpen: Failed to allocate %d bytes for osi_file.\n",
>            sizeof(struct osi_file));
>     }
>     memset(afile, 0, sizeof(struct osi_file));
>     filp = &afile->file;
>     filp->f_dentry = &afile->dentry;
>     tip = iget(afs_cacheSBp, (u_long)ainode);
>     if (!tip)
>     osi_Panic("Can't get inode %d\n", ainode);
>     FILE_INODE(filp) = tip;
>     tip->i_flags |= MS_NOATIME; /* Disable updating access times. */
>     filp->f_flags = O_RDWR;
> #if defined(AFS_LINUX24_ENV)
>     filp->f_op = fops_get(tip->i_fop);
> #else
>     filp->f_op = tip->i_op->default_file_ops;
> #endif
>     if (filp->f_op && filp->f_op->open)
>     code = filp->f_op->open(tip, filp);
>     if (code)
>     osi_Panic("Can't open inode %d\n", ainode);
>     afile->size = tip->i_size;
>     AFS_GLOCK();
>     afile->offset = 0;
>     afile->proc = (int (*)()) 0;
>     afile->inum = ainode;        /* for hint validity checking */
>     return (void *)afile;
> }
> ----------
> 
> So it seems to be that it's some issue with the f_op for open.
> 
> I modified the above code to print out code and it returns -5. Which appears
> to correspond to EIO.
> 
> Any ideas?
> 
> -- Nathan
> 
> ------------------------------------------------------------
> Nathan Neulinger                       EMail:  nneul@umr.edu
> University of Missouri - Rolla         Phone: (573) 341-4841
> Computing Services                       Fax: (573) 341-4216
> _______________________________________________
> OpenAFS-devel mailing list
> OpenAFS-devel@openafs.org
> https://lists.openafs.org/mailman/listinfo.cgi/openafs-devel

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord@MIT.EDU                        PGP key available