From owner-freebsd-questions Tue Sep 28 7:37:17 1999 Delivered-To: freebsd-questions@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 5589414FA1; Tue, 28 Sep 1999 07:37:09 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from d214.syd2.zeta.org.au (beefcake.zeta.org.au [203.26.10.12]) by mailman.zeta.org.au (8.8.7/8.8.7) with ESMTP id AAA15995; Wed, 29 Sep 1999 00:37:42 +1000 Date: Wed, 29 Sep 1999 00:36:53 +1000 (EST) From: Bruce Evans X-Sender: bde@alphplex.bde.org To: Mike Dracopoulos Cc: freebsd-questions@FreeBSD.ORG, freebsd-fs@FreeBSD.ORG Subject: Re: ext2fs access In-Reply-To: <199909251359.QAA00429@comet.db.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > 1) The FreeBSD port of pine (both 3 & 4) cannot properly access folders on > the ext2fs, since the files get locked and remain so for some 5 minutes. > This is NOT related with file permissions as, if I make $HOME/mail a > symlink to a UFS directory, pine locks work just fine. > > 2) "ls -l" does NOT report correctly on the number of links for ext2fs > files and returns 0 for all. Links in ext2fs were broken by the soft update changes. A quick fix is enclosed. The fix is all in ffs and ufs, although the problem is that ext2fs has too many hooks into ufs. Having any hooks causes maintenance problems. Duplicating code would cause different maintenance problems. There is a related bug for file flags (the immutable flags, etc.). ufs_settatr() messes up ext2fs flags. > I don't know enough about the locking mechanisms implemented in pine but > my feeling is that these two problems may be related. They do seem to be related. pine seems to work with the links fixed here. Bruce diff -c2 sys/ufs/ffs/ffs_vfsops.c~ sys/ufs/ffs/ffs_vfsops.c *** sys/ufs/ffs/ffs_vfsops.c~ Sun Sep 12 00:35:22 1999 --- sys/ufs/ffs/ffs_vfsops.c Mon Sep 27 16:29:43 1999 *************** *** 660,666 **** ump = malloc(sizeof *ump, M_UFSMNT, M_WAITOK); bzero((caddr_t)ump, sizeof *ump); ump->um_malloctype = malloctype; ! ump->um_fs = malloc((u_long)fs->fs_sbsize, M_UFSMNT, ! M_WAITOK); ump->um_blkatoff = ffs_blkatoff; ump->um_truncate = ffs_truncate; --- 651,657 ---- ump = malloc(sizeof *ump, M_UFSMNT, M_WAITOK); bzero((caddr_t)ump, sizeof *ump); + ump->um_i_effnlink_valid = 1; ump->um_malloctype = malloctype; ! ump->um_fs = malloc((u_long)fs->fs_sbsize, M_UFSMNT, M_WAITOK); ump->um_blkatoff = ffs_blkatoff; ump->um_truncate = ffs_truncate; diff -c2 sys/ufs/ufs/ufs_vnops.c~ sys/ufs/ufs/ufs_vnops.c *** sys/ufs/ufs/ufs_vnops.c~ Sun Aug 29 15:18:27 1999 --- sys/ufs/ufs/ufs_vnops.c Mon Sep 27 16:32:21 1999 *************** *** 389,393 **** vap->va_fileid = ip->i_number; vap->va_mode = ip->i_mode & ~IFMT; ! vap->va_nlink = ip->i_effnlink; vap->va_uid = ip->i_uid; vap->va_gid = ip->i_gid; --- 389,394 ---- vap->va_fileid = ip->i_number; vap->va_mode = ip->i_mode & ~IFMT; ! vap->va_nlink = VFSTOUFS(vp->v_mount)->um_i_effnlink_valid ? ! ip->i_effnlink : ip->i_nlink; vap->va_uid = ip->i_uid; vap->va_gid = ip->i_gid; diff -c2 sys/ufs/ufs/ufsmount.h~ sys/ufs/ufs/ufsmount.h *** sys/ufs/ufs/ufsmount.h~ Sun Aug 29 13:27:14 1999 --- sys/ufs/ufs/ufsmount.h Mon Sep 27 16:23:43 1999 *************** *** 95,99 **** struct netexport um_export; /* export information */ int64_t um_savedmaxfilesize; /* XXX - limit maxfilesize */ ! struct malloc_type *um_malloctype; /* The inodes malloctype */ int (*um_blkatoff) __P((struct vnode *, off_t, char **, struct buf **)); int (*um_truncate) __P((struct vnode *, off_t, int, struct ucred *, struct proc *)); --- 88,93 ---- struct netexport um_export; /* export information */ int64_t um_savedmaxfilesize; /* XXX - limit maxfilesize */ ! struct malloc_type *um_malloctype; /* for inodes on this fs */ ! int um_i_effnlink_valid; /* i_effnlink valid? */ int (*um_blkatoff) __P((struct vnode *, off_t, char **, struct buf **)); int (*um_truncate) __P((struct vnode *, off_t, int, struct ucred *, struct proc *)); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message