From owner-freebsd-fs Mon Oct 9 9:49:53 2000 Delivered-To: freebsd-fs@freebsd.org Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by hub.freebsd.org (Postfix) with ESMTP id 5345837B503; Mon, 9 Oct 2000 09:49:41 -0700 (PDT) Received: from fledge.watson.org (robert@fledge.pr.watson.org [192.0.2.3]) by fledge.watson.org (8.9.3/8.9.3) with SMTP id MAA12998; Mon, 9 Oct 2000 12:49:40 -0400 (EDT) (envelope-from robert@fledge.watson.org) Date: Mon, 9 Oct 2000 12:49:39 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: freebsd-fs@FreeBSD.org Cc: freebsd-arch@FreeBSD.org, trustedbsd-discuss@TrustedBSD.org Subject: Re: VOP_ACCESS() and new VADMIN/VATTRIB? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org (Apologies again for wide-cross posting :-). As described in my prior e-mail, I have updated my local tree to make use of a new VADMIN right for testing access control requests requiring "ownership" of a file system object to succeed. I've attached below the patches required to support this change in UFS/FFS, although I have not yet updated the other file systems. I'd like to go ahead and commit this support, as it is required for mandatory access control (centralizing the VADMIN decision means MAC policies can block VADMIN requests centrally in VOP_ACCESS() for file system that support labeling, rather than having MAC checks scattered through reems of file system code). However, I'd like to get someone (or several someone's :-) to review the code for correctness. In particular, I'm concerned about VFS locking issues: VOP_ACCESS() requires an exclusive lock on its vp argument, which is good since VOP_GETACL() and label retrieval functions will require a lock in UFS, but the requirement for a lock to test ip->i_uid directly wasn't explicit previously as part of the locking protocol. I believe I've managed to demonstrate to myself that in locations where the VADMIN VOP_ACCESS() test occurs, a lock will always be held on the pertinent vnodes, but I'd like confirmation. If it wasn't require before, the code was probably buggy anyway, but those bugs will become far more visible in a world where VOP_ACCESS() could involve a blocking call to access ACLs or label information. Robert N M Watson robert@fledge.watson.org http://www.watson.org/~robert/ PGP key fingerprint: AF B5 5F FF A6 4A 79 37 ED 5F 55 E9 58 04 6A B1 TIS Labs at Network Associates, Safeport Network Services Index: sys/sys/vnode.h =================================================================== RCS file: /home/ncvs/src/sys/sys/vnode.h,v retrieving revision 1.130 diff -u -r1.130 vnode.h --- sys/sys/vnode.h 2000/10/04 01:29:15 1.130 +++ sys/sys/vnode.h 2000/10/09 16:29:27 @@ -218,12 +218,13 @@ /* * Modes. Some values same as Ixxx entries from inode.h for now. */ -#define VSUID 04000 /* set user id on execution */ -#define VSGID 02000 /* set group id on execution */ -#define VSVTX 01000 /* save swapped text even after use */ -#define VREAD 00400 /* read, write, execute permissions */ -#define VWRITE 00200 -#define VEXEC 00100 +#define VADMIN 010000 /* permission to administer vnode */ +#define VSUID 004000 /* set user id on execution */ +#define VSGID 002000 /* set group id on execution */ +#define VSVTX 001000 /* save swapped text even after use */ +#define VREAD 000400 /* read, write, execute permissions */ +#define VWRITE 000200 +#define VEXEC 000100 /* * Token indicating no attribute value yet assigned. Index: sys/kern/vfs_subr.c =================================================================== RCS file: /home/ncvs/src/sys/kern/vfs_subr.c,v retrieving revision 1.285 diff -u -r1.285 vfs_subr.c --- sys/kern/vfs_subr.c 2000/10/06 08:04:48 1.285 +++ sys/kern/vfs_subr.c 2000/10/09 16:29:33 @@ -3050,6 +3050,7 @@ /* Check the owner. */ if (cred->cr_uid == file_uid) { + dac_granted |= VADMIN; if (file_mode & S_IXUSR) dac_granted |= VEXEC; if (file_mode & S_IRUSR) @@ -3116,6 +3117,10 @@ if ((acc_mode & VWRITE) && ((dac_granted & VWRITE) == 0) && !cap_check_xxx(cred, NULL, CAP_DAC_WRITE, PRISON_ROOT)) cap_granted |= VWRITE; + + if ((acc_mode & VADMIN) && ((dac_granted & VADMIN) == 0) && + !cap_check_xxx(cred, NULL, CAP_FOWNER, PRISON_ROOT)) + cap_granted |= VADMIN; if ((acc_mode & (cap_granted | dac_granted)) == acc_mode) { /* XXX audit: privilege used */ Index: sys/ufs/ufs/ufs_lookup.c =================================================================== RCS file: /home/ncvs/src/sys/ufs/ufs/ufs_lookup.c,v retrieving revision 1.40 diff -u -r1.40 ufs_lookup.c --- sys/ufs/ufs/ufs_lookup.c 2000/09/18 16:13:01 1.40 +++ sys/ufs/ufs/ufs_lookup.c 2000/10/09 16:29:34 @@ -476,9 +476,8 @@ * implements append-only directories. */ if ((dp->i_mode & ISVTX) && - suser_xxx(cred, p, PRISON_ROOT) && - cred->cr_uid != dp->i_uid && - VTOI(tdp)->i_uid != cred->cr_uid) { + VOP_ACCESS(vdp, VADMIN, cred, cnp->cn_proc) && + VOP_ACCESS(tdp, VADMIN, cred, cnp->cn_proc)) { vput(tdp); return (EPERM); } Index: sys/ufs/ufs/ufs_vnops.c =================================================================== RCS file: /home/ncvs/src/sys/ufs/ufs/ufs_vnops.c,v retrieving revision 1.150 diff -u -r1.150 ufs_vnops.c --- sys/ufs/ufs/ufs_vnops.c 2000/10/04 01:29:17 1.150 +++ sys/ufs/ufs/ufs_vnops.c 2000/10/09 16:29:36 @@ -411,13 +411,17 @@ if (vp->v_mount->mnt_flag & MNT_RDONLY) return (EROFS); /* - * Privileged processes in jail() are permitted to modify - * arbitrary user flags on files, but are not permitted - * to modify system flags. + * Callers may only modify the file flags on objects they + * have VADMIN rights for. */ - if (cred->cr_uid != ip->i_uid && - (error = suser_xxx(cred, p, PRISON_ROOT))) + if ((error = VOP_ACCESS(vp, VADMIN, cred, p))) return (error); + /* + * Unprivileged processes and privileged processes in + * jail() are not permitted to set system flags. + * Privileged processes not in jail() may only set system + * flags if the securelevel <= 0. + */ if (!suser_xxx(cred, NULL, 0)) { if ((ip->i_flags & (SF_NOUNLINK | SF_IMMUTABLE | SF_APPEND)) && @@ -450,7 +454,8 @@ if (vap->va_uid != (uid_t)VNOVAL || vap->va_gid != (gid_t)VNOVAL) { if (vp->v_mount->mnt_flag & MNT_RDONLY) return (EROFS); - if ((error = ufs_chown(vp, vap->va_uid, vap->va_gid, cred, p)) != 0) + if ((error = ufs_chown(vp, vap->va_uid, vap->va_gid, cred, + p)) != 0) return (error); } if (vap->va_size != VNOVAL) { @@ -480,8 +485,15 @@ return (EROFS); if ((ip->i_flags & SF_SNAPSHOT) != 0) return (EPERM); - if (cred->cr_uid != ip->i_uid && - (error = suser_xxx(cred, p, PRISON_ROOT)) && + /* + * From utimes(2): + * If times is NULL, ... The caller must be the owner of + * the file, have permission to write the file, or be the + * super-user. + * If times is non-NULL, ... The caller must be the owner of + * the file or be the super-user. + */ + if ((error = VOP_ACCESS(vp, VADMIN, cred, p)) && ((vap->va_vaflags & VA_UTIMES_NULL) == 0 || (error = VOP_ACCESS(vp, VWRITE, cred, p)))) return (error); @@ -529,11 +541,17 @@ register struct inode *ip = VTOI(vp); int error; - if (cred->cr_uid != ip->i_uid) { - error = suser_xxx(cred, p, PRISON_ROOT); - if (error) + /* + * To modify the permissions on a file, must possess VADMIN + * for that file. + */ + if ((error = VOP_ACCESS(vp, VADMIN, cred, p))) return (error); - } + /* + * Privileged processes may set the sticky bit on non-directories, + * as well as set the setgid bit on a file with a group that the + * process is not a member of. + */ if (suser_xxx(cred, NULL, PRISON_ROOT)) { if (vp->v_type != VDIR && (mode & S_ISTXT)) return (EFTYPE); @@ -571,12 +589,18 @@ uid = ip->i_uid; if (gid == (gid_t)VNOVAL) gid = ip->i_gid; + /* + * To modify the ownership of a file, must possess VADMIN + * for that file. + */ + if ((error = VOP_ACCESS(vp, VADMIN, cred, p))) + return (error); /* - * If we don't own the file, are trying to change the owner - * of the file, or are not a member of the target group, - * the caller must be superuser or the call fails. + * To change the owner of a file, or change the group of a file + * to a group of which we are not a member, the caller must + * have privilege. */ - if ((cred->cr_uid != ip->i_uid || uid != ip->i_uid || + if ((uid != ip->i_uid || (gid != ip->i_gid && !groupmember(gid, cred))) && (error = suser_xxx(cred, p, PRISON_ROOT))) return (error); @@ -1095,15 +1119,14 @@ if (xp->i_number == ip->i_number) panic("ufs_rename: same file"); /* - * If the parent directory is "sticky", then the user must - * own the parent directory, or the destination of the rename, - * otherwise the destination may not be changed (except by - * root). This implements append-only directories. + * If the parent directory is "sticky", then the caller + * must possess VADMIN for the parent directory, or the + * destination of the rename. This implements append-only + * directories. */ if ((dp->i_mode & S_ISTXT) && - suser_xxx(tcnp->cn_cred, NULL, PRISON_ROOT) && - tcnp->cn_cred->cr_uid != dp->i_uid && - xp->i_uid != tcnp->cn_cred->cr_uid) { + VOP_ACCESS(tdvp, VADMIN, tcnp->cn_cred, p) && + VOP_ACCESS(tvp, VADMIN, tcnp->cn_cred, p)) { error = EPERM; goto bad; } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Mon Oct 9 20:15:58 2000 Delivered-To: freebsd-fs@freebsd.org Received: from smtp01.primenet.com (smtp01.primenet.com [206.165.6.131]) by hub.freebsd.org (Postfix) with ESMTP id 80E3637B670; Mon, 9 Oct 2000 20:15:51 -0700 (PDT) Received: (from daemon@localhost) by smtp01.primenet.com (8.9.3/8.9.3) id UAA19914; Mon, 9 Oct 2000 20:15:03 -0700 (MST) Received: from usr01.primenet.com(206.165.6.201) via SMTP by smtp01.primenet.com, id smtpdAAAHtaiZM; Mon Oct 9 20:14:55 2000 Received: (from tlambert@localhost) by usr01.primenet.com (8.8.5/8.8.5) id UAA15932; Mon, 9 Oct 2000 20:15:38 -0700 (MST) From: Terry Lambert Message-Id: <200010100315.UAA15932@usr01.primenet.com> Subject: Re: VOP_ACCESS() and new VADMIN/VATTRIB? To: rwatson@FreeBSD.ORG (Robert Watson) Date: Tue, 10 Oct 2000 03:15:38 +0000 (GMT) Cc: freebsd-fs@FreeBSD.ORG, freebsd-arch@FreeBSD.ORG, trustedbsd-discuss@TrustedBSD.org In-Reply-To: from "Robert Watson" at Oct 09, 2000 12:49:39 PM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Robert Watson wrote: > (Apologies again for wide-cross posting :-). > > As described in my prior e-mail, I have updated my local tree to make use > of a new VADMIN right for testing access control requests requiring > "ownership" of a file system object to succeed. I've attached below the > patches required to support this change in UFS/FFS, although I have not > yet updated the other file systems. I'd like to go ahead and commit this > support, as it is required for mandatory access control (centralizing the > VADMIN decision means MAC policies can block VADMIN requests centrally in > VOP_ACCESS() for file system that support labeling, rather than having MAC > checks scattered through reems of file system code). > > However, I'd like to get someone (or several someone's :-) to review the > code for correctness. In particular, I'm concerned about VFS locking > issues: VOP_ACCESS() requires an exclusive lock on its vp argument, which > is good since VOP_GETACL() and label retrieval functions will require a > lock in UFS, but the requirement for a lock to test ip->i_uid directly > wasn't explicit previously as part of the locking protocol. I believe > I've managed to demonstrate to myself that in locations where the VADMIN > VOP_ACCESS() test occurs, a lock will always be held on the pertinent > vnodes, but I'd like confirmation. If it wasn't require before, the code > was probably buggy anyway, but those bugs will become far more visible in > a world where VOP_ACCESS() could involve a blocking call to access ACLs or > label information. I don't believe there are any locking issues; however, I do have some problems with the direction this code is going. It seems to me that these patches centralize some code, at the expense of future ability to reuse and/or maintain the code, without assuming a default vaccess() based implementation. > --- sys/ufs/ufs/ufs_lookup.c 2000/09/18 16:13:01 1.40 > +++ sys/ufs/ufs/ufs_lookup.c 2000/10/09 16:29:34 > @@ -476,9 +476,8 @@ > * implements append-only directories. > */ > if ((dp->i_mode & ISVTX) && > - suser_xxx(cred, p, PRISON_ROOT) && > - cred->cr_uid != dp->i_uid && > - VTOI(tdp)->i_uid != cred->cr_uid) { > + VOP_ACCESS(vdp, VADMIN, cred, cnp->cn_proc) && > + VOP_ACCESS(tdp, VADMIN, cred, cnp->cn_proc)) { > vput(tdp); > return (EPERM); > } The removal of the PRISON check hides the semantics and assumes the use of vaccess() as the default for use by VOP_ACCESS(). This means that if I derive a different FS from the UFS code, and don't use your new code, I'm suddenly vulnerable to a credential exploit. One of the main reasons that I disliked the "default" stuff when it went in was a similar hidden semantics problem it caused by forcing me to explicitly invlude a VFSOP/VNOP for code for which I wanted the default behaviour from a VFS stacking layer ("EOPNOTSUPP"). The problem with this, and which I think gets exacerbated by the credential code changes you are proposing, is that for any VNOP or VFSOP that's unknown to a stacking layer in an arbitrary stack, is that if it is known to an underyling layer (perhaps the underlying layer is newer than that stacked on top of it), there is no way to preclude exposing the underlying layers additional semantics to a caller, even if you wish to only expose a minimal set... you can't. I also think that this is perhaps a case where you want to provide an alternate VNOP array, and expose this is a seperate VFS. I'd argue that the capabilities code should be approached in a similar fashion, although given the extent, impact, and initialization problems inherent to such code, it seems to me that it should be a seperate stacking layer in its own right: basically the same place where I would put the quota code, and implement read-only mounts (through an implied stacking request). You could easily achieve the same effect by replacing the ufs_access call and the other calls you are changing, rather than wiring it into UFS proper. At the very least, I think that it's important to document your assumptions and their impact on the semantics that they bring in with them, should this code go forward, as is. Any VFS author who follows you will inherit these assumptions, and it's encumbant on you to insure that they don't inherit a loaded gun aimed at their foot. I have to say that my preference is that this type of code, which fits very well into the model of a semantics imposition stacking layer, really wants to wait until stacking is fixed, and to be implemented where it fits best. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Tue Oct 10 6:14:44 2000 Delivered-To: freebsd-fs@freebsd.org Received: from mail-relay.eunet.no (mail-relay.eunet.no [193.71.71.242]) by hub.freebsd.org (Postfix) with ESMTP id A7A4A37B503 for ; Tue, 10 Oct 2000 06:14:41 -0700 (PDT) Received: from login-1.eunet.no (login-1.eunet.no [193.75.110.2]) by mail-relay.eunet.no (8.9.3/8.9.3/GN) with ESMTP id PAA63932; Tue, 10 Oct 2000 15:14:25 +0200 (CEST) (envelope-from mbendiks@eunet.no) Received: from localhost (mbendiks@localhost) by login-1.eunet.no (8.9.3/8.8.8) with ESMTP id PAA47474; Tue, 10 Oct 2000 15:14:25 +0200 (CEST) (envelope-from mbendiks@eunet.no) X-Authentication-Warning: login-1.eunet.no: mbendiks owned process doing -bs Date: Tue, 10 Oct 2000 15:14:25 +0200 (CEST) From: Marius Bendiksen To: freebsd-fs@freebsd.org Cc: Greg Lehey Subject: Partition (Slice) tables Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Regarding the earlier discussion on slice tables, I would like to add that there is a legitimate reason for the BIOS to demand a valid slice table. I know a number of manufacturers look for a special partition type entry for their suspend-to-disk feature. This recently came to my renewed attention, as the IBM ThinkPad series now suspend to a partition type 165 (0xA5). Marius To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Tue Oct 10 10:12:54 2000 Delivered-To: freebsd-fs@freebsd.org Received: from peach.ocn.ne.jp (peach.ocn.ne.jp [210.145.254.87]) by hub.freebsd.org (Postfix) with ESMTP id 8DD6737B66F for ; Tue, 10 Oct 2000 10:12:50 -0700 (PDT) Received: from newsguy.com (p46-dn02kiryunisiki.gunma.ocn.ne.jp [211.0.245.111]) by peach.ocn.ne.jp (8.9.1a/OCN/) with ESMTP id CAA23887; Wed, 11 Oct 2000 02:12:39 +0900 (JST) Message-ID: <39E34DC2.573C7635@newsguy.com> Date: Wed, 11 Oct 2000 02:11:30 +0900 From: "Daniel C. Sobral" X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en,pt-BR MIME-Version: 1.0 To: Marius Bendiksen Cc: freebsd-fs@FreeBSD.ORG, Greg Lehey Subject: Re: Partition (Slice) tables References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Marius Bendiksen wrote: > > Regarding the earlier discussion on slice tables, I would like to add that > there is a legitimate reason for the BIOS to demand a valid slice table. I > know a number of manufacturers look for a special partition type entry for > their suspend-to-disk feature. This recently came to my renewed attention, > as the IBM ThinkPad series now suspend to a partition type 165 (0xA5). Stupid idiot bastards! -- Daniel C. Sobral (8-DCS) dcs@newsguy.com dcs@freebsd.org capo@linux.bsdconspiracy.net the ants all left because mtn. dew is sold out again To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Tue Oct 10 10:37:30 2000 Delivered-To: freebsd-fs@freebsd.org Received: from blackhelicopters.org (geburah.blackhelicopters.org [209.69.178.18]) by hub.freebsd.org (Postfix) with ESMTP id 8668237B503 for ; Tue, 10 Oct 2000 10:37:28 -0700 (PDT) Received: (from mwlucas@localhost) by blackhelicopters.org (8.9.3/8.9.3) id NAA04430; Tue, 10 Oct 2000 13:37:18 -0400 (EDT) (envelope-from mwlucas) Date: Tue, 10 Oct 2000 13:37:18 -0400 From: Michael Lucas To: "Daniel C. Sobral" Cc: Marius Bendiksen , freebsd-fs@FreeBSD.ORG, Greg Lehey Subject: Re: Partition (Slice) tables Message-ID: <20001010133718.A4377@blackhelicopters.org> References: <39E34DC2.573C7635@newsguy.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <39E34DC2.573C7635@newsguy.com>; from dcs@newsguy.com on Wed, Oct 11, 2000 at 02:11:30AM +0900 Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Wed, Oct 11, 2000 at 02:11:30AM +0900, Daniel C. Sobral wrote: > > This recently came to my renewed attention, > > as the IBM ThinkPad series now suspend to a partition type 165 (0xA5). > Stupid idiot bastards! Uh, does this mean what I *think* it means? IIRC, BSD has used 165 for years & years... If it does, anyone care to comment for an article? I'm perfectly happy to rant about this anywhere that'll take an article. ==ml -- Michael Lucas mwlucas@blackhelicopters.org http://www.blackhelicopters.org/~mwlucas/ Big Scary Daemons: http://www.oreillynet.com/pub/q/Big_Scary_Daemons To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Tue Oct 10 10:45:31 2000 Delivered-To: freebsd-fs@freebsd.org Received: from peach.ocn.ne.jp (peach.ocn.ne.jp [210.145.254.87]) by hub.freebsd.org (Postfix) with ESMTP id 00B4D37B502 for ; Tue, 10 Oct 2000 10:45:24 -0700 (PDT) Received: from newsguy.com (p46-dn02kiryunisiki.gunma.ocn.ne.jp [211.0.245.111]) by peach.ocn.ne.jp (8.9.1a/OCN/) with ESMTP id CAA29305; Wed, 11 Oct 2000 02:45:08 +0900 (JST) Message-ID: <39E3555F.9258C029@newsguy.com> Date: Wed, 11 Oct 2000 02:43:59 +0900 From: "Daniel C. Sobral" X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en,pt-BR MIME-Version: 1.0 To: Michael Lucas Cc: Marius Bendiksen , freebsd-fs@FreeBSD.ORG, Greg Lehey Subject: Re: Partition (Slice) tables References: <39E34DC2.573C7635@newsguy.com> <20001010133718.A4377@blackhelicopters.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Michael Lucas wrote: > > Uh, does this mean what I *think* it means? IIRC, BSD has used 165 > for years & years... Yes, that's exactly it. > If it does, anyone care to comment for an article? I'm perfectly > happy to rant about this anywhere that'll take an article. I'd like confirmation first, but I'm sure feeling like raising as much hell as possible. -- Daniel C. Sobral (8-DCS) dcs@newsguy.com dcs@freebsd.org capo@linux.bsdconspiracy.net the ants all left because mtn. dew is sold out again To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Tue Oct 10 11: 0:47 2000 Delivered-To: freebsd-fs@freebsd.org Received: from blackhelicopters.org (geburah.blackhelicopters.org [209.69.178.18]) by hub.freebsd.org (Postfix) with ESMTP id 08FA137B502 for ; Tue, 10 Oct 2000 11:00:43 -0700 (PDT) Received: (from mwlucas@localhost) by blackhelicopters.org (8.9.3/8.9.3) id OAA04629; Tue, 10 Oct 2000 14:00:34 -0400 (EDT) (envelope-from mwlucas) Date: Tue, 10 Oct 2000 14:00:34 -0400 From: Michael Lucas To: "Daniel C. Sobral" Cc: Marius Bendiksen , freebsd-fs@FreeBSD.ORG, Greg Lehey Subject: IBM Thinkpad suspending to 165 (was Re: Partition (Slice) tables) Message-ID: <20001010140034.A4550@blackhelicopters.org> References: <39E34DC2.573C7635@newsguy.com> <20001010133718.A4377@blackhelicopters.org> <39E3555F.9258C029@newsguy.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <39E3555F.9258C029@newsguy.com>; from dcs@newsguy.com on Wed, Oct 11, 2000 at 02:43:59AM +0900 Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Wed, Oct 11, 2000 at 02:43:59AM +0900, Daniel C. Sobral wrote: > I'd like confirmation first, but I'm sure feeling like raising as much > hell as possible. I definitely *need* to know the BIOS version or ThinkPad model version that exhibits this behavior, confirmed by two different folks, before putting out the "IBM hates BSD" article. When we have confirmation, it would be a good idea to let advocacy@freebsd in on it. They're pretty good at raising hell when warranted. This warrants not merely raising hell, but breaking out the black candles, heavy robes, and sacrifical goat at some point. (Isn't there a full moon during BSDcon?) You can't tell me that IBM didn't know that FFS uses 165. Is there a master list of file system types anywhere? ==ml -- Michael Lucas mwlucas@blackhelicopters.org http://www.blackhelicopters.org/~mwlucas/ Big Scary Daemons: http://www.oreillynet.com/pub/q/Big_Scary_Daemons To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Tue Oct 10 12:28:51 2000 Delivered-To: freebsd-fs@freebsd.org Received: from smtp01.primenet.com (smtp01.primenet.com [206.165.6.131]) by hub.freebsd.org (Postfix) with ESMTP id 85F1D37B670 for ; Tue, 10 Oct 2000 12:28:44 -0700 (PDT) Received: (from daemon@localhost) by smtp01.primenet.com (8.9.3/8.9.3) id MAA21707; Tue, 10 Oct 2000 12:27:54 -0700 (MST) Received: from usr09.primenet.com(206.165.6.209) via SMTP by smtp01.primenet.com, id smtpdAAAmyaq_P; Tue Oct 10 12:27:27 2000 Received: (from tlambert@localhost) by usr09.primenet.com (8.8.5/8.8.5) id MAA15822; Tue, 10 Oct 2000 12:28:06 -0700 (MST) From: Terry Lambert Message-Id: <200010101928.MAA15822@usr09.primenet.com> Subject: Re: IBM Thinkpad suspending to 165 (was Re: Partition (Slice) tables) To: mwlucas@blackhelicopters.org (Michael Lucas) Date: Tue, 10 Oct 2000 19:28:05 +0000 (GMT) Cc: dcs@newsguy.com (Daniel C. Sobral), mbendiks@eunet.no (Marius Bendiksen), freebsd-fs@FreeBSD.ORG, grog@lemis.com (Greg Lehey) In-Reply-To: <20001010140034.A4550@blackhelicopters.org> from "Michael Lucas" at Oct 10, 2000 02:00:34 PM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > > I'd like confirmation first, but I'm sure feeling like raising as much > > hell as possible. > > I definitely *need* to know the BIOS version or ThinkPad model version > that exhibits this behavior, confirmed by two different folks, before > putting out the "IBM hates BSD" article. > > When we have confirmation, it would be a good idea to let > advocacy@freebsd in on it. They're pretty good at raising hell when > warranted. > > This warrants not merely raising hell, but breaking out the black > candles, heavy robes, and sacrifical goat at some point. (Isn't there > a full moon during BSDcon?) You can't tell me that IBM didn't know > that FFS uses 165. The place this has been reported is with a ThinkPad A320, in a "dangerously dedicated" mode, without a DOS partititon table, and without a "suspend to disk" partitition. You can get the details from the advocacy list archives. In general, the "suspend to disk" function apparently looks for the first non-DOS, non-Extended, non-Linux partition, and will stomp its suspend image there. So the upshot is "if you do something other than an industry standard DOS Partitition table on a ThinkPad A320, BIOS version indeterminate, AND you fail to reserve space for the ``suspend to disk'' function prior to the FreeBSD partitition, then it will happily stomp the FreeBSD partitition". Or in simpler terms, "What part of ``_dangerously_ dedicated'' did you not understand?". > Is there a master list of file system types anywhere? There are several. FreeBSD is on most of them. Probably, Linux used to have the same problem, until they hacked their BIOS to recognize both DOS and Linux, instead of just DOS (and knowing IBM, OS/2). Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Tue Oct 10 12:38:13 2000 Delivered-To: freebsd-fs@freebsd.org Received: from peach.ocn.ne.jp (peach.ocn.ne.jp [210.145.254.87]) by hub.freebsd.org (Postfix) with ESMTP id 90FB137B503 for ; Tue, 10 Oct 2000 12:38:10 -0700 (PDT) Received: from newsguy.com (p46-dn02kiryunisiki.gunma.ocn.ne.jp [211.0.245.111]) by peach.ocn.ne.jp (8.9.1a/OCN/) with ESMTP id EAA28703; Wed, 11 Oct 2000 04:37:59 +0900 (JST) Message-ID: <39E36FD1.8CD43105@newsguy.com> Date: Wed, 11 Oct 2000 04:36:49 +0900 From: "Daniel C. Sobral" X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en,pt-BR MIME-Version: 1.0 To: Terry Lambert Cc: Michael Lucas , Marius Bendiksen , freebsd-fs@FreeBSD.ORG, Greg Lehey Subject: Re: IBM Thinkpad suspending to 165 (was Re: Partition (Slice) tables) References: <200010101928.MAA15822@usr09.primenet.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Terry Lambert wrote: > > The place this has been reported is with a ThinkPad A320, in > a "dangerously dedicated" mode, without a DOS partititon table, > and without a "suspend to disk" partitition. You can get the > details from the advocacy list archives. > > In general, the "suspend to disk" function apparently looks for > the first non-DOS, non-Extended, non-Linux partition, and will > stomp its suspend image there. > > So the upshot is "if you do something other than an industry > standard DOS Partitition table on a ThinkPad A320, BIOS version > indeterminate, AND you fail to reserve space for the ``suspend > to disk'' function prior to the FreeBSD partitition, then it will > happily stomp the FreeBSD partitition". > > Or in simpler terms, "What part of ``_dangerously_ dedicated'' > did you not understand?". I don't understand what does dangerously dedicated has to do with this. If I partition my disk half Windows/half FreeBSD, or even if I have a sole FreeBSD partition, I'm not using dangerously dedicated mode, and still, by your description of the problem, can be affected. Do you have the subject of the thread where this was reported? -- Daniel C. Sobral (8-DCS) dcs@newsguy.com dcs@freebsd.org capo@linux.bsdconspiracy.net the ants all left because mtn. dew is sold out again To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Tue Oct 10 14:19:14 2000 Delivered-To: freebsd-fs@freebsd.org Received: from gta.com (mailgate.gta.com [199.120.225.4]) by hub.freebsd.org (Postfix) with ESMTP id 6D04437B502 for ; Tue, 10 Oct 2000 14:19:12 -0700 (PDT) Received: from gta.com (GTA internal mail system) by gta.com id RAA07047; Tue, 10 Oct 2000 17:15:18 -0400 (EDT) Date: Tue, 10 Oct 2000 17:15:18 -0400 (EDT) Message-Id: <200010102115.RAA07047@gta.com> From: Larry Baird To: freebsd-fs@freebsd.org Cc: Michael Lucas Subject: Re: IBM Thinkpad suspending to 165 (was Re: Partition (Slice) tables) In-Reply-To: <20001010140034.A4550@blackhelicopters.org> Organization: Global Technology Associates, Inc. User-Agent: tin/1.4.2-20000205 ("Possession") (UNIX) (FreeBSD/3.5-STABLE (i386)) Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > Is there a master list of file system types anywhere? As I understand it, there is no official master list for partition types. See http://www.win.tue.nl/~aeb/partitions/partition_types.html for an attempt at creating such a list. Larry -- ------------------------------------------------------------------------ Larry Baird | http://www.gnatbox.com Global Technology Associates, Inc. | Orlando, FL Email: lab@gta.com | TEL 407-380-0220, FAX 407-380-6080 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Tue Oct 10 17: 9:50 2000 Delivered-To: freebsd-fs@freebsd.org Received: from mail-relay.eunet.no (mail-relay.eunet.no [193.71.71.242]) by hub.freebsd.org (Postfix) with ESMTP id 24D1A37B502 for ; Tue, 10 Oct 2000 17:09:48 -0700 (PDT) Received: from login-1.eunet.no (login-1.eunet.no [193.75.110.2]) by mail-relay.eunet.no (8.9.3/8.9.3/GN) with ESMTP id CAA67389; Wed, 11 Oct 2000 02:09:38 +0200 (CEST) (envelope-from mbendiks@eunet.no) Received: from localhost (mbendiks@localhost) by login-1.eunet.no (8.9.3/8.8.8) with ESMTP id CAA51081; Wed, 11 Oct 2000 02:09:38 +0200 (CEST) (envelope-from mbendiks@eunet.no) X-Authentication-Warning: login-1.eunet.no: mbendiks owned process doing -bs Date: Wed, 11 Oct 2000 02:09:38 +0200 (CEST) From: Marius Bendiksen To: "Daniel C. Sobral" Cc: freebsd-fs@FreeBSD.ORG, Greg Lehey Subject: Re: Partition (Slice) tables In-Reply-To: <39E34DC2.573C7635@newsguy.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > > Regarding the earlier discussion on slice tables, I would like to add that > > there is a legitimate reason for the BIOS to demand a valid slice table. I > > know a number of manufacturers look for a special partition type entry for > > their suspend-to-disk feature. This recently came to my renewed attention, > > as the IBM ThinkPad series now suspend to a partition type 165 (0xA5). > Stupid idiot bastards! While possibly an overstatement, I concur that they have been less than desireably brilliant ;) The BIOSes can apparently not be fixed anytime soon. Marius To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Tue Oct 10 17:13:33 2000 Delivered-To: freebsd-fs@freebsd.org Received: from mail-relay.eunet.no (mail-relay.eunet.no [193.71.71.242]) by hub.freebsd.org (Postfix) with ESMTP id D680B37B503 for ; Tue, 10 Oct 2000 17:13:30 -0700 (PDT) Received: from login-1.eunet.no (login-1.eunet.no [193.75.110.2]) by mail-relay.eunet.no (8.9.3/8.9.3/GN) with ESMTP id CAA67540; Wed, 11 Oct 2000 02:13:02 +0200 (CEST) (envelope-from mbendiks@eunet.no) Received: from localhost (mbendiks@localhost) by login-1.eunet.no (8.9.3/8.8.8) with ESMTP id CAA51104; Wed, 11 Oct 2000 02:13:02 +0200 (CEST) (envelope-from mbendiks@eunet.no) X-Authentication-Warning: login-1.eunet.no: mbendiks owned process doing -bs Date: Wed, 11 Oct 2000 02:13:02 +0200 (CEST) From: Marius Bendiksen To: Michael Lucas Cc: "Daniel C. Sobral" , freebsd-fs@FreeBSD.ORG, Greg Lehey Subject: Re: Partition (Slice) tables In-Reply-To: <20001010133718.A4377@blackhelicopters.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > Uh, does this mean what I *think* it means? IIRC, BSD has used 165 > for years & years... FreeBSD, NetBSD and OpenBSD all use 165, IIRC. Thus, the Thinkpad will suspend to your root partition. This is likely an accidental fuckup which just happens to not be destined for a near-future fix, but it could also be an intentional move, what with all their renewed Linux support and all that... Marius To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Tue Oct 10 17:17:19 2000 Delivered-To: freebsd-fs@freebsd.org Received: from mail-relay.eunet.no (mail-relay.eunet.no [193.71.71.242]) by hub.freebsd.org (Postfix) with ESMTP id 128A437B503 for ; Tue, 10 Oct 2000 17:17:16 -0700 (PDT) Received: from login-1.eunet.no (login-1.eunet.no [193.75.110.2]) by mail-relay.eunet.no (8.9.3/8.9.3/GN) with ESMTP id CAA67729; Wed, 11 Oct 2000 02:17:08 +0200 (CEST) (envelope-from mbendiks@eunet.no) Received: from localhost (mbendiks@localhost) by login-1.eunet.no (8.9.3/8.8.8) with ESMTP id CAA51120; Wed, 11 Oct 2000 02:17:08 +0200 (CEST) (envelope-from mbendiks@eunet.no) X-Authentication-Warning: login-1.eunet.no: mbendiks owned process doing -bs Date: Wed, 11 Oct 2000 02:17:08 +0200 (CEST) From: Marius Bendiksen To: Michael Lucas Cc: "Daniel C. Sobral" , freebsd-fs@FreeBSD.ORG, Greg Lehey Subject: Re: IBM Thinkpad suspending to 165 (was Re: Partition (Slice) tables) In-Reply-To: <20001010140034.A4550@blackhelicopters.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > I definitely *need* to know the BIOS version or ThinkPad model version > that exhibits this behavior, confirmed by two different folks, before > putting out the "IBM hates BSD" article. I am going to try to get hold of this by friday. "IBM hates BSD" might be a bit too strong, though. And you'd want to poke IBM first. > Is there a master list of file system types anywhere? I seem to recall having seen a list on an IBM site somewhere, but if not, then you will find a number of such lying about the net. Marius To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Tue Oct 10 17:24:20 2000 Delivered-To: freebsd-fs@freebsd.org Received: from mail-relay.eunet.no (mail-relay.eunet.no [193.71.71.242]) by hub.freebsd.org (Postfix) with ESMTP id 5873537B66D for ; Tue, 10 Oct 2000 17:24:15 -0700 (PDT) Received: from login-1.eunet.no (login-1.eunet.no [193.75.110.2]) by mail-relay.eunet.no (8.9.3/8.9.3/GN) with ESMTP id CAA67977; Wed, 11 Oct 2000 02:24:06 +0200 (CEST) (envelope-from mbendiks@eunet.no) Received: from localhost (mbendiks@localhost) by login-1.eunet.no (8.9.3/8.8.8) with ESMTP id CAA51134; Wed, 11 Oct 2000 02:24:06 +0200 (CEST) (envelope-from mbendiks@eunet.no) X-Authentication-Warning: login-1.eunet.no: mbendiks owned process doing -bs Date: Wed, 11 Oct 2000 02:24:06 +0200 (CEST) From: Marius Bendiksen To: Terry Lambert Cc: Michael Lucas , "Daniel C. Sobral" , freebsd-fs@FreeBSD.ORG, Greg Lehey Subject: Re: IBM Thinkpad suspending to 165 (was Re: Partition (Slice) tables) In-Reply-To: <200010101928.MAA15822@usr09.primenet.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > The place this has been reported is with a ThinkPad A320, in > a "dangerously dedicated" mode, without a DOS partititon table, > and without a "suspend to disk" partitition. You can get the > details from the advocacy list archives. Actually, the place I heard it was not -advocacy, as I am not subscribed there, but rather through an acquaintance which has been selecting these thinkpads for his employer. ISTR this was with a valid partition table. > In general, the "suspend to disk" function apparently looks for > the first non-DOS, non-Extended, non-Linux partition, and will > stomp its suspend image there. That's worth giving them a couple of round of #00 over... it should probably check for a few other types too, like NTFS/HPFS, FFS, SCO, etc. > So the upshot is "if you do something other than an industry > standard DOS Partitition table on a ThinkPad A320, BIOS version > indeterminate, AND you fail to reserve space for the ``suspend > to disk'' function prior to the FreeBSD partitition, then it will > happily stomp the FreeBSD partitition". Or, more correct, "if you fail to provide a first partition with useless data, and take care with the ordering, you will get your FreeBSD stomped". > There are several. FreeBSD is on most of them. Probably, Linux > used to have the same problem, until they hacked their BIOS to > recognize both DOS and Linux, instead of just DOS (and knowing > IBM, OS/2). Actually, OS/2 would mean NT, as they both use type 7, IIRC, though that is irrelevant to the discussion. Marius To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Tue Oct 10 22:21: 7 2000 Delivered-To: freebsd-fs@freebsd.org Received: from charon.fmi.com (charon.fmi.com [157.33.227.4]) by hub.freebsd.org (Postfix) with ESMTP id 82F6D37B503 for ; Tue, 10 Oct 2000 22:21:04 -0700 (PDT) Received: from babylon.nola.fmi.com (root@babylon.nola.fmi.com [157.33.3.49]) by charon.fmi.com (8.9.3/8.9.3) with ESMTP id AAA01639; Wed, 11 Oct 2000 00:19:45 -0500 (CDT) Received: from rinjani.tpra.fmi.com (root@rinjani.tpra.fmi.com [157.47.5.40]) by babylon.nola.fmi.com (8.9.3/8.9.3) with ESMTP id AAA15411; Wed, 11 Oct 2000 00:13:49 -0500 (CDT) Received: from exafserver.irja.fcx.com (exafserver.irja.fcx.com [157.47.15.30]) by rinjani.tpra.fmi.com (8.9.1a/8.9.1 IRJA) with ESMTP id OAA16639; Wed, 11 Oct 2000 14:08:36 +0900 (WIT) Received: from exbfserver.irja.fcx.com (exbfserver.irja.fcx.com [157.47.24.32]) by exafserver.irja.fcx.com (8.9.3/8.9.3) with ESMTP id OAA38205; Wed, 11 Oct 2000 14:19:17 +0900 (JAYT) (envelope-from Brendon_Meyer@fmi.com) Received: from localhost (bmeyer@localhost) by exbfserver.irja.fcx.com (8.9.3/8.9.3) with ESMTP id OAA39410; Wed, 11 Oct 2000 14:19:11 +0900 (JAYT) (envelope-from Brendon_Meyer@fmi.com) X-Authentication-Warning: exbfserver.irja.fcx.com: bmeyer owned process doing -bs Date: Wed, 11 Oct 2000 14:19:11 +0900 (JAYT) From: Brendon Meyer X-Sender: bmeyer@exbfserver.irja.fcx.com To: Marius Bendiksen Cc: Michael Lucas , "Daniel C. Sobral" , freebsd-fs@FreeBSD.ORG, Greg Lehey Subject: Re: IBM Thinkpad suspending to 165 (was Re: Partition (Slice) tables) In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > > I definitely *need* to know the BIOS version or ThinkPad model version > > that exhibits this behavior, confirmed by two different folks, before > > putting out the "IBM hates BSD" article. > > I am going to try to get hold of this by friday. "IBM hates BSD" might be > a bit too strong, though. And you'd want to poke IBM first. I'm included to agree about poking and prodding them a bit first. I don't think that IBM would deliberately set out to produce a product that is deliberately designed to destroy an OS other than one they officially support if it could possibly hurt the overall market for their product. I could be wrong on this though as they have done some pretty backwards things in the past!!! > > Is there a master list of file system types anywhere? > > I seem to recall having seen a list on an IBM site somewhere, but if not, > then you will find a number of such lying about the net. A good list for DOS style partitions can be found in FreeFDISK (see the FreeDOS page). FreeFDISK comes with a reasonably complete .INI file that contains details about a great many DOS partition types. /BGM To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Wed Oct 11 2:21:31 2000 Delivered-To: freebsd-fs@freebsd.org Received: from r7a003272aa.hlb.cable.rcn.com (r7a003272aa.hlb.cable.rcn.com [216.164.35.237]) by hub.freebsd.org (Postfix) with ESMTP id 69ED437B503 for ; Wed, 11 Oct 2000 02:21:23 -0700 (PDT) Received: from majorzoot (sd11-125.sd.odu.edu [128.82.11.125]) by r7a003272aa.hlb.cable.rcn.com (Postfix) with SMTP id F2FFB6007 for ; Wed, 11 Oct 2000 06:17:36 -0400 (EDT) Message-ID: <00ad01c03364$6f07c420$0202a8c0@majorzoot> From: "Kherry Zamore" To: Subject: Overview of UFS Date: Wed, 11 Oct 2000 05:19:59 -0400 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_00AA_01C03342.E6973060" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org This is a multi-part message in MIME format. ------=_NextPart_000_00AA_01C03342.E6973060 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, I was just wondering if there are any places I could go to get an = overview of UFS and an understanding how it works "deep down".=20 -=3D- Kherry Zamore -=3D- (757) 683-7386 -=3D- -=3D- Resident computer and network geek/god -=3D- -=3D- Rogers Hall Main Room 324 -=3D- www.dknj.org -=3D- "Memory is like an orgasm. It's a lot better if you don't have to fake = it." -- Seymour Cray commenting on virtual memory ------=_NextPart_000_00AA_01C03342.E6973060 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi, I was just wondering if there are = any places I=20 could go to get an overview of UFS and an understanding how it works = "deep=20 down". 
 
-=3D- Kherry Zamore -=3D- (757) = 683-7386 -=3D-
-=3D-=20 Resident computer and network geek/god -=3D-
-=3D- Rogers Hall Main = Room 324 -=3D-=20 www.dknj.org -=3D-
"Memory is = like an orgasm.=20 It's a lot better if you don't have to fake it."
    = --=20 Seymour Cray commenting on virtual memory
------=_NextPart_000_00AA_01C03342.E6973060-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Wed Oct 11 3: 5: 3 2000 Delivered-To: freebsd-fs@freebsd.org Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by hub.freebsd.org (Postfix) with ESMTP id DE9F337B66C for ; Wed, 11 Oct 2000 03:04:59 -0700 (PDT) Received: (from des@localhost) by flood.ping.uio.no (8.9.3/8.9.3) id MAA37716; Wed, 11 Oct 2000 12:04:40 +0200 (CEST) (envelope-from des@ofug.org) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: Terry Lambert Cc: mwlucas@blackhelicopters.org (Michael Lucas), dcs@newsguy.com (Daniel C. Sobral), mbendiks@eunet.no (Marius Bendiksen), freebsd-fs@FreeBSD.ORG, grog@lemis.com (Greg Lehey) Subject: Re: IBM Thinkpad suspending to 165 (was Re: Partition (Slice) tables) References: <200010101928.MAA15822@usr09.primenet.com> From: Dag-Erling Smorgrav Date: 11 Oct 2000 12:04:39 +0200 In-Reply-To: Terry Lambert's message of "Tue, 10 Oct 2000 19:28:05 +0000 (GMT)" Message-ID: Lines: 32 User-Agent: Gnus/5.0802 (Gnus v5.8.2) Emacs/20.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Terry Lambert writes: > The place this has been reported is with a ThinkPad A320, in > a "dangerously dedicated" mode, without a DOS partititon table, > and without a "suspend to disk" partitition. You can get the > details from the advocacy list archives. > > In general, the "suspend to disk" function apparently looks for > the first non-DOS, non-Extended, non-Linux partition, and will > stomp its suspend image there. No, it does not. It just freezes during boot. > So the upshot is "if you do something other than an industry > standard DOS Partitition table on a ThinkPad A320, BIOS version > indeterminate, AND you fail to reserve space for the ``suspend > to disk'' function prior to the FreeBSD partitition, then it will > happily stomp the FreeBSD partitition". No, it will not. > Or in simpler terms, "What part of ``_dangerously_ dedicated'' > did you not understand?". Dangerously dedicated has nothing to do with it. The BIOS will freeze even on machines with a proper partition table and Windows 98 or 2000 installed alongside FreeBSD. Terry, sorry to say this, but you are *such* a spin doctor... DES -- Dag-Erling Smorgrav - des@ofug.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Wed Oct 11 3: 5:59 2000 Delivered-To: freebsd-fs@freebsd.org Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by hub.freebsd.org (Postfix) with ESMTP id 94BDC37B503 for ; Wed, 11 Oct 2000 03:05:57 -0700 (PDT) Received: (from des@localhost) by flood.ping.uio.no (8.9.3/8.9.3) id MAA37730; Wed, 11 Oct 2000 12:05:50 +0200 (CEST) (envelope-from des@ofug.org) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: Marius Bendiksen Cc: Michael Lucas , "Daniel C. Sobral" , freebsd-fs@FreeBSD.ORG, Greg Lehey Subject: Re: IBM Thinkpad suspending to 165 (was Re: Partition (Slice) tables) References: From: Dag-Erling Smorgrav Date: 11 Oct 2000 12:05:49 +0200 In-Reply-To: Marius Bendiksen's message of "Wed, 11 Oct 2000 02:17:08 +0200 (CEST)" Message-ID: Lines: 13 User-Agent: Gnus/5.0802 (Gnus v5.8.2) Emacs/20.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Marius Bendiksen writes: > > I definitely *need* to know the BIOS version or ThinkPad model version > > that exhibits this behavior, confirmed by two different folks, before > > putting out the "IBM hates BSD" article. > I am going to try to get hold of this by friday. "IBM hates BSD" might be > a bit too strong, though. And you'd want to poke IBM first. IBM has already been poked; see my post on -advocacy a couple of weeks ago. DES -- Dag-Erling Smorgrav - des@ofug.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Wed Oct 11 3: 7:32 2000 Delivered-To: freebsd-fs@freebsd.org Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by hub.freebsd.org (Postfix) with ESMTP id 827D537B66C for ; Wed, 11 Oct 2000 03:07:30 -0700 (PDT) Received: (from des@localhost) by flood.ping.uio.no (8.9.3/8.9.3) id MAA37741; Wed, 11 Oct 2000 12:07:26 +0200 (CEST) (envelope-from des@ofug.org) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: "Kherry Zamore" Cc: Subject: Re: Overview of UFS References: <00ad01c03364$6f07c420$0202a8c0@majorzoot> From: Dag-Erling Smorgrav Date: 11 Oct 2000 12:07:26 +0200 In-Reply-To: "Kherry Zamore"'s message of "Wed, 11 Oct 2000 05:19:59 -0400" Message-ID: Lines: 9 User-Agent: Gnus/5.0802 (Gnus v5.8.2) Emacs/20.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org "Kherry Zamore" writes: > Hi, I was just wondering if there are any places I could go to get > an overview of UFS and an understanding how it works "deep down". /usr/src/sys/ufs DES -- Dag-Erling Smorgrav - des@ofug.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Wed Oct 11 5:46:55 2000 Delivered-To: freebsd-fs@freebsd.org Received: from roaming.cacheboy.net (gate.interxion.com [194.153.74.13]) by hub.freebsd.org (Postfix) with ESMTP id 60CF137B503; Wed, 11 Oct 2000 05:46:51 -0700 (PDT) Received: (from adrian@localhost) by roaming.cacheboy.net (8.11.0/8.11.0) id e9BCklC12390; Wed, 11 Oct 2000 14:46:47 +0200 (CEST) (envelope-from adrian) Date: Wed, 11 Oct 2000 14:45:27 +0200 From: Adrian Chadd To: freebsd-fs@freebsd.org Cc: freebsd-current@freebsd.org Subject: IFS commit candidate Message-ID: <20001011144527.A12272@roaming.cacheboy.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.4i Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org I've brought IFS up to the latest -current and it has survived my testing and stressing. I am currently debugging a version of squid which will handle an IFS disk to provide solid performance details. You can find the IFS code plus modified copies of mount and fsck at http://www.freebsd.org/~adrian/ifs/ . Please take a look and comment as I am looking to commit this sometime within the next week or two into -current. Thanks! Adrian -- Adrian Chadd "The main reason Santa is so jolly is because he knows where all the bad girls live." -- Random IRC quote To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Wed Oct 11 7:34:53 2000 Delivered-To: freebsd-fs@freebsd.org Received: from news.fjtc.edu.tw (news.fjtc.edu.tw [163.15.196.2]) by hub.freebsd.org (Postfix) with ESMTP id 345EE37B66C for ; Wed, 11 Oct 2000 07:34:50 -0700 (PDT) Received: (from cpfong@localhost) by news.fjtc.edu.tw (8.9.3/8.9.3) id WAA32355 for freebsd-fs@FreeBSD.ORG; Wed, 11 Oct 2000 22:33:14 +0800 (CST) (envelope-from cpfong) Date: Wed, 11 Oct 2000 22:33:14 +0800 From: CP Fong To: freebsd-fs@FreeBSD.ORG Subject: confirm freebsd.fs Message-ID: <20001011223314.B32305@news.fjtc.edu.tw> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org auth 5770e493 subscribe freebsd-fs \ mailing.freebsd.fs@news.fjtc.edu.tw To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Wed Oct 11 17:42:42 2000 Delivered-To: freebsd-fs@freebsd.org Received: from smtp02.primenet.com (smtp02.primenet.com [206.165.6.132]) by hub.freebsd.org (Postfix) with ESMTP id 6C95137B502 for ; Wed, 11 Oct 2000 17:42:35 -0700 (PDT) Received: (from daemon@localhost) by smtp02.primenet.com (8.9.3/8.9.3) id RAA26559; Wed, 11 Oct 2000 17:39:13 -0700 (MST) Received: from usr09.primenet.com(206.165.6.209) via SMTP by smtp02.primenet.com, id smtpdAAAYha4FZ; Wed Oct 11 17:38:53 2000 Received: (from tlambert@localhost) by usr09.primenet.com (8.8.5/8.8.5) id RAA10774; Wed, 11 Oct 2000 17:41:59 -0700 (MST) From: Terry Lambert Message-Id: <200010120041.RAA10774@usr09.primenet.com> Subject: Re: IBM Thinkpad suspending to 165 (was Re: Partition (Slice) tables) To: des@ofug.org (Dag-Erling Smorgrav) Date: Thu, 12 Oct 2000 00:41:58 +0000 (GMT) Cc: tlambert@primenet.com (Terry Lambert), mwlucas@blackhelicopters.org (Michael Lucas), dcs@newsguy.com (Daniel C. Sobral), mbendiks@eunet.no (Marius Bendiksen), freebsd-fs@FreeBSD.ORG, grog@lemis.com (Greg Lehey) In-Reply-To: from "Dag-Erling Smorgrav" at Oct 11, 2000 12:04:39 PM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > > In general, the "suspend to disk" function apparently looks for > > the first non-DOS, non-Extended, non-Linux partition, and will > > stomp its suspend image there. > > No, it does not. It just freezes during boot. This doesn't jibe with the posts I saw; I don't have an A320, I have a Sony VAIO, so I can't speak authoritatively; do you have an A320? > > Or in simpler terms, "What part of ``_dangerously_ dedicated'' > > did you not understand?". > > Dangerously dedicated has nothing to do with it. The BIOS will freeze > even on machines with a proper partition table and Windows 98 or 2000 > installed alongside FreeBSD. Puckey. I've seen an A320 running dual boot with Windows 2000 and FreeBSD. > Terry, sorry to say this, but you are *such* a spin doctor... I am not being an appologist for IBM. I haven't worked for them for several weeks; I'm currently working on code that I don't think could have been brought successfully to market in the context of a division of IBM (not dissimilar to the code that I've worked on that couldn't be brought to users, even for free, in the context of the FreeBSD project). FWIW, I heard that it stomped the FreeBSD partition, not merely "hung on boot". A net search shows some postings to Linux lists, and a similar feeding frenzy to what is currently occurring on advocacy, for what I assume is a previous BIOS release on IBM ThinkPads in that series, prior to the Linux advocacy stepping up to bat. I also have a problem with the "OS recovery" CDROM that IBM supplies to recover a system from the standards Windows "degrade into unbootability. Personally, I would recommend use of Partition Magic and Boot Magic, since it seems that if you don't screw around with the MBR or totally eliminate the Windows stuff, it works OK on the A320s I've seen. I haven't had opportunity to need to "recover" my Sony with the Sony recovery tools (yet, anyway), so I can't speak for them. FWIW, I expect that the Sony machine, being from Japan, where the FreeBSD advocacy isn't so milktoast, will probably recover my machine without damaging the FreeBSD partition. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Fri Oct 13 8:21:55 2000 Delivered-To: freebsd-fs@freebsd.org Received: from relay2.mail.uk.psi.net (relay2.mail.uk.psi.net [154.32.107.6]) by hub.freebsd.org (Postfix) with ESMTP id AE48037B502; Fri, 13 Oct 2000 08:21:27 -0700 (PDT) Received: from mail.plasmon.co.uk ([193.115.5.217]) by relay2.mail.uk.psi.net with smtp (Exim 2.12 #2) id 13k6e1-0006ho-00; Fri, 13 Oct 2000 16:21:13 +0100 Received: by mail.plasmon.co.uk(Lotus SMTP MTA v4.6.4 (830.2 3-23-1999)) id 80256977.00547C7D ; Fri, 13 Oct 2000 16:22:48 +0100 X-Lotus-FromDomain: PLASNOTES From: dbhague@allstor-sw.co.uk To: freebsd-scsi@FreeBSD.org, freebsd-fs@FreeBSD.org Cc: gibbs@scsiguy.com, mjacob@feral.com, Andre Albsmeier , smcintyre@allstor-sw.co.uk Message-ID: <80256977.00547AA1.00@mail.plasmon.co.uk> Date: Fri, 13 Oct 2000 16:22:43 +0100 Subject: Re: Stressed SCSI subsystem locks up the system Mime-Version: 1.0 Content-type: multipart/mixed; Boundary="0__=mZjquYhAa8G9OyczsaJpisLOuvEaEGyp4GnaiBByZ8HIwBAbgYVvxKvI" Content-Disposition: inline Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org --0__=mZjquYhAa8G9OyczsaJpisLOuvEaEGyp4GnaiBByZ8HIwBAbgYVvxKvI Content-type: text/plain; charset=us-ascii Content-Disposition: inline This is increasingly looking like a filesystem issue. We have done some more testing on the 4.1 build. We believe the issues with 4.1 are different to the ones with 3.0. Due to the age of 3.0 we have decide to forget about it and concentrate on the 4.1 issues. We have two 4.1 test systems; one failed with the following on the console > dev #da/3 block=0 fs=/RAID blocks >panic ffs_blkfree freeing free frags >syncing disk The system was locked in this state and was ping-able but we could not telnet in. The other system is still running after two days. This is the longest a test has run. The only difference we can see between the systems is the way the filesystem was built. This was built by > dd if=/dev/zero of=/dev/rda0 count=2048 > disklabel -Brw da0 auto > disklabel -e da0 > newfs /dev/rda0d normally this is done in a script which effectively does > disklabel -rw da0 auto > dd if=/dev/zero of=/dev/rda0 count=2048 > disklabel -rw da0 auto > "disklabel" | disklabel -rR da0 > newfs /dev/rda0d The only real difference is the -B option in disklabel. We do not attempt to boot from this partition so this should not matter. Let me know what you think ? Regards Dave For the sake of Freebsd-fs subscribers: For your information we are a small software company, just south of Cambridge UK, and have a thin server that is running FreeBSD. We are developing a storage system which controls a RAID system and automatically archives the data to optical jukeboxes or tape libraries. Basically HSM in a box. The system is as follows: Single board computer, AMD K6-II, 128MB RAM, Adaptec AHA 3940AU Intel Ethernet Pro 100 This is attached to a RAID system although we have had the same failure with a single SCSI drive. I enclose the test script and the source for the main test program. tmcp.c. The test is started with "golongmulti 7" If you require any further information please ask, or give me a call +44-1763-264-474. Thanks Dave (See attached file: tmcp.c)(See attached file: golong)(See attached file: golongmulti)(See attached file: go) --0__=mZjquYhAa8G9OyczsaJpisLOuvEaEGyp4GnaiBByZ8HIwBAbgYVvxKvI Content-type: application/octet-stream; name="tmcp.c" Content-Disposition: attachment; filename="tmcp.c" Content-transfer-encoding: base64 LyogJFJldmlzaW9uOiAxLjIxICQgKi8KCgojaW5jbHVkZSA8c3lzL3R5cGVzLmg+CiNpbmNsdWRl IDxmY250bC5oPgojaW5jbHVkZSA8c3lzL3N0YXQuaD4KI2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNs dWRlIDxlcnJuby5oPgojaW5jbHVkZSA8dGltZS5oPgojaW5jbHVkZSA8c3RyaW5nLmg+CiNpbmNs dWRlIDxzdGRsaWIuaD4KCiNpZiBkZWZpbmVkKE9TMikgfHwgZGVmaW5lZChXSU5OVCkKI2luY2x1 ZGUgPGlvLmg+CiNpbmNsdWRlIDx3aW5kb3dzLmg+CiNpbmNsdWRlIDxkaXJlY3QuaD4KI2RlZmlu ZSBzdHJjYXNlY21wIHN0cmljbXAKI2RlZmluZSBzdGF0ICAgICAgIF9zdGF0CiNkZWZpbmUgdW5s aW5rICAgICBfdW5saW5rCiNkZWZpbmUgcmVhZCAgICAgICBfcmVhZAojZGVmaW5lIGxzZWVrICAg ICAgX2xzZWVrCiNkZWZpbmUgVElNRSBfX2ludDY0CgojZWxzZQoKI2RlZmluZSBIQVNfR0VUVElN RU9GREFZIC8qIFNvbWUgc3lzdGVtcyBtYXkgbm90ICovCiNpbmNsdWRlIDxzdHJpbmdzLmg+CiNp bmNsdWRlIDx1bmlzdGQuaD4KI2luY2x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XIgKnAgPSBwYXRoX291dDsKCiAgICAgICAgc3JhbmQoKGxl dmVsKzEpICogaWR4KTsKICAgICAgICBsZW5ndGggPSByYW5kKCkgJSAzMDsKICAgICAgICBmb3Ig KGkgPSAwOyBpIDwgbGVuZ3RoOyBpKyspCgkgICoocCsrKSA9ICIwMTIzNDU2Nzg5MGFiY2RmZWdo aWprbG1ub3BxcnN0dXZ3eHl6Xy4iW3JhbmQoKSAlIDM3XTsKICAgICAgICBwICs9IHNwcmludGYo cCwgIl8lMDhseF8iLCBpZHgpOwogICAgICAgIGxlbmd0aCA9IHJhbmQoKSAlIDQwOwogICAgICAg IGZvciAoaSA9IDA7IGkgPCBsZW5ndGg7IGkrKykKCSAgKihwKyspID0gIjAxMjM0NTY3ODkwYWJj ZGZlZ2hpamtsbW5vcHFyc3R1dnd4eXpfLiJbcmFuZCgpICUgMzddOwogICAgICAgICoocCsrKSA9 IDA7CiAgICB9CiAgICBlbHNlIGlmIChjb21tb25fbmFtZXMpCiAgICB7CiAgICAgICAgc3ByaW50 ZihwYXRoX291dCwgIiUwOGx4LnRzdCIsIGlkeCAlICgxNiBeICgxK2xldmVsKSkpOwogICAgfQog ICAgZWxzZQogICAgICAgIHNwcmludGYocGF0aF9vdXQsICIlMDhseC50c3QiLCBpZHgpOwoKICAg IGlmIChlcnJvcikKICAgICAgICBwcmludGYoIkdlbmVyYXRlUGF0aCglcywgJWxkKSByZXR1cm5z IGVycm9yICVkIiwgcm9vdF9wYXRoX2luLCBpZHgsIGVycm9yKTsKCiAgICByZXR1cm4gZXJyb3I7 Cn0JCgoKaW50IFRtY3BDcmVhdGVGaWxlKGNoYXIgKnBhdGgsIGludCBtb2RlLCBjaGFyICpidWYs IGxvbmcgYmxrbGVuLCBpbnQgbl9ibGtzLCBpbnQgbGVhdmVfb3BlbiwgCgkgICAgICAgICBpbnQg dWx0cmFfdmVyYm9zZSwgaW50IGNsb3NlX2FmdGVyX2VhY2hfd3JpdGUsIGludCBjb21taXRfd3Jp dGVzLCAKCSAgICAgICAgIGludCBkZWxldGVfcGFydGlhbGx5X3dyaXR0ZW4sIGludCBzZXRfZmls ZV9zaXplX2JlZm9yZV93cml0ZSkKewogICAgRl9IQU5ETEUgZm51bTsKICAgIGludAkJZXJyb3Ig PSAwLCBsaW5lcyA9IDA7CiAgICBUSU1FCWJhc2V0aW1lLCBkdD0wLCBkdDIsIGxhc3RiYXNlOwog ICAgbG9uZwl3cml0dGVuID0gMDsKICAgIAogICAgZm51bSA9IEZfQ1JFQVRFKCBwYXRoLCBtb2Rl KTsKICAgIAogICAgZ2V0X3RpbWUoJmJhc2V0aW1lKTsKICAgIGxhc3RiYXNlID0gKFRJTUUpYmFz ZXRpbWU7CiAgICAKICAgIGlmIChGX0NSRUFURV9GQUlMX1ZBTFVFID09IGZudW0pCiAgICB7CQog ICAgICAgIHByaW50ZigiXHJDb3VsZCBub3QgY3JlYXRlICclcycuIEVycm9yKCVkKVxuIiwgcGF0 aCwgRl9FUlJPUigpKTsKICAgICAgICBlcnJvciA9IEZfRVJST1IoKTsKICAgIH0KICAgIGVsc2UK ICAgIHsJCiAgICAgICAgaWYgKHNldF9maWxlX3NpemVfYmVmb3JlX3dyaXRlKQogICAgICAgIHsK I2lmZGVmIFdJTk5UCgkgIGlmIChGX0ZBSUwoIEZfU0VUU0laRSggZm51bSwgbl9ibGtzKmJsa2xl bikpKQoJICB7CgkgICAgICBwcmludGYoIlNldFNpemUoICVkKSBmYWlsZWQgZm9yICVzIChlICVk KVxuIiwgYmxrbGVuKm5fYmxrcywgcGF0aCwgRl9FUlJPUigpKTsKCSAgICAgIGVycm9yID0gRl9F UlJPUigpOwoJICAgICAgaWYgKEZfRkFJTChGX0NMT1NFKGZudW0pKSkKCSAgICAgIHsgICAKCQlw cmludGYoIlxyQ291bGQgbm90IGNsb3NlIGZpbGUgJyVzJy4gRXJyb3IoJWQpXG4iLCBwYXRoLCBG X0VSUk9SKCkpOwoJCWVycm9yID0gRl9FUlJPUigpOwoJICAgICAg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ewoJCSAgICAgICAgaWYgKCFsaW5lcykKCQkJICBwcmludGYoIlxuIik7CgkJCQkJCQkKCQkgICAg ICAgIHByaW50ZigiWyUwNGxsZCBLYi9zXSAgICIsIChyZWFkMSAqIDEwMDAwMDAgLyAxMDI0KSAv IChUSU1FKWR0Mik7CgkJICAgICAgICBnZXRfdGltZSgmbGFzdGJhc2UpOwoJCSAgICAgICAgcmVh ZDEgPSAwOwoJCSAgICAgICAgbGluZXMgPSAobGluZXMrMSkgJTQ7CgkJICAgIH0KCQl9CgkgICAg ICB9CgkgIH0JCQogICAgICAgIH0KICAgIH0KICAgIGlmIChmbnVtICE9IChGX0hBTkRMRSktMSAm JiAgIWxlYXZlX29wZW4pCiAgICB7ICAgCiAgICAgICAgaWYgKEZfQ0xPU0UoZm51bSkpCiAgICAg ICAgeyAgIAoJICBwcmludGYoIlxyQ291bGQgbm90IGNsb3NlICclcycgYWZ0ZXIgcmVhZGluZy4g RXJyb3IoJWQpOiAgJXNcbiIsIHBhdGgsIGVycm5vLCBzdHJlcnJvcihlcnJubykpOwoJICBlcnJv ciA9IGVycm5vOwogICAgICAgIH0KICAgIH0KICAgIGlmICh1bHRyYV92ZXJib3NlICYmIGR0KQog ICAgICAgIHByaW50ZigiXG4iKTsKICAgIHJldHVybiBlcnJvcjsKfQoKaW50IFRtY3BEZWxldGVG aWxlKGNoYXIgKnBhdGgpCnsKICAgIGludCBlcnJvciA9IDA7CgkKICAgIGlmICgtMSA9PSB1bmxp bmsocGF0aCkpCiAgICB7CQogICAgICAgIGVycm9yID0gZXJybm87CiAgICAgICAgcHJpbnRmKCJc ckNvdWxkIG5vdCBkZWxldGUgZmlsZSAnJXMnLiBFcnJvciglZCk6ICAlc1xuIiwgcGF0aCwgZXJy bm8sIHN0cmVycm9yKGVycm5vKSk7CiAgICB9CgkKICAgIHJldHVybiBlcnJvcjsKfQoKaW50IG1h aW4oaW50IGFyZ2MsIGNoYXIgKmFyZ3ZbXSkKewogICAgY2hhcgkqUm9vd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cmd2WzFdKzMpOwoJICBicmVhazsK ICAgICAgICBjYXNlICduJzoKICAgICAgICBjYXNlICdOJzoKCSAgc3RyYW5nZV9uYW1lcysrOwoJ ICBjb21tb25fbmFtZXMgPSAwOwoJICBicmVhazsKICAgICAgICBjYXNlICdvJzoKICAgICAgICBj YXNlICdPJzoKCSAgbGVhdmVfb3BlbisrOwoJICBicmVhazsKICAgICAgICBjYXNlICdQJzoKICAg ICAgICBjYXNlICdwJzoKCSAgZGVsZXRlX3BhcnRpYWxseV93cml0dGVuKys7CgkgIGJyZWFrOwog ICAgICAgIGNhc2UgJ3EnOgogICAgICAgIGNhc2UgJ1EnOgoJICBxdWlldCsrOwoJICBicmVhazsK ICAgICAgICBjYXNlICdyJzoKICAgICAgICBjYXNlICdSJzoKCSAgcmVhZDErKzsJCS8qIDAgPSBu byByZWFkLCAxID0gcmVhZCAmIHdyaXRlLCAyID0gcmVhZCBvbmx5ICovCgkgIGJyZWFrOwogICAg ICAgIGNhc2UgJ3MnOgogICAgICAgIGNhc2UgJ1MnOgoJICBzaWRlcyA9IGF0b2koYXJndlsxXSsz KTsKCSAgYnJlYWs7CiAgICAgICAgY2FzZSAnVCc6CiAgICAgICAgY2FzZSAndCc6CgkgIHNldF9m aWxlX3NpemVfYmVmb3JlX3dyaXRlID0gMTsKCSAgYnJlYWs7CiAgICAgICAgY2FzZSAndSc6CiAg ICAgICAgY2FzZSAnVSc6CgkgIHVsdHJhX3ZlcmJvc2UrKzsKCSAgYnJlYWs7CiAgICAgICAgY2Fz ZSAndic6CiAgICAgICAgY2FzZSAnVic6CgkgIHZlcmJvc2UrKzsKCSAgYnJlYWs7CiAgICAgICAg Y2FzZSAnVyc6CiAgICAgICAgY2FzZSAndyc6CgkgIGNvbW1pdF93cml0ZXMrKzsKCSAgYnJlYWs7 CiAgICAgICAgZGVmYXVsdDoKCSAgdXNhZ2UoInRtY3AiKTsKICAgICAgICB9CiAgICAgICAgYXJn Yy0tOyBhcmd2Kys7CiAgICB9C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7CiAgICAgICAg CiAgICByZXR1cm4gZXJyb3I7Cn0K --0__=mZjquYhAa8G9OyczsaJpisLOuvEaEGyp4GnaiBByZ8HIwBAbgYVvxKvI Content-type: application/octet-stream; name="golong" Content-Disposition: attachment; filename="golong" Content-transfer-encoding: base64 IyEvYmluL3NoCiMKIyBnb2xvbmcgLSBjYWxsIHRoZSBnbyBzY3JpcHQKIwoKTlVNPSQxCkxPRz0v Z28kMS5sb2cKCmRhdGUgPj4gJExPRwplY2hvIEFib3V0IHRvIHN0YXJ0IGdvbG9uZyA+PiAkTE9H Cgp3aGlsZQp0cnVlCmRvCgkvZ28gJE5VTQpkb25lCg== --0__=mZjquYhAa8G9OyczsaJpisLOuvEaEGyp4GnaiBByZ8HIwBAbgYVvxKvI Content-type: application/octet-stream; name="golongmulti" Content-Disposition: attachment; filename="golongmulti" Content-transfer-encoding: base64 IyEvYmluL3NoCiMKIyBnb2xvbmdtdWx0aSAtIGNhbGwgdGhlIGdvbG9uZyBzY3JpcHRzIGluIHBh cmFsbGVsCiMKCk5VTT0kMQpMT0c9L2dvJDEubG9nCgp3aGlsZSBbICROVU0gLWd0IDAgXQpkbwoJ ZWNobyBTdGFydGluZyBnb2xvbmcgJE5VTQoJL2dvbG9uZyAkTlVNICYKCU5VTT0kKCggJE5VTSAt IDEpKQpkb25lCg== --0__=mZjquYhAa8G9OyczsaJpisLOuvEaEGyp4GnaiBByZ8HIwBAbgYVvxKvI Content-type: application/octet-stream; name="go" Content-Disposition: attachment; filename="go" Content-transfer-encoding: base64 IyEvYmluL3NoCiMKIyBnbwojCgpOVU09JDEKTE9HPS9nbyQxLmxvZwoKaWYgWyAhIC1kIC9SQUlE IF0gOyB0aGVuCgllY2hvIE5vIC9SQUlECmZpCgpta2RpciAvUkFJRC8kTlVNCmNkIC9SQUlELyRO VU0KZGF0ZSA+PiAkTE9HCmVjaG8gQWJvdXQgdG8gdG1jcCA+PiAkTE9HCnRtY3AgL2Y6OTAwMDAg L206MSAvYjoxMDI0IC8xID4vZGV2L251bGwKZGF0ZSA+PiAkTE9HCmVjaG8gQWJvdXQgdG8gZGVs ZXRlID4+ICRMT0cKY2QgLwpybSAtcmYgL1JBSUQvJE5VTQo= --0__=mZjquYhAa8G9OyczsaJpisLOuvEaEGyp4GnaiBByZ8HIwBAbgYVvxKvI-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Fri Oct 13 10: 9: 2 2000 Delivered-To: freebsd-fs@freebsd.org Received: from relay3.mail.uk.psi.net (relay3.mail.uk.psi.net [154.32.109.6]) by hub.freebsd.org (Postfix) with ESMTP id C3F3A37B66F; Fri, 13 Oct 2000 10:08:44 -0700 (PDT) Received: from mail.plasmon.co.uk ([193.115.5.217]) by relay3.mail.uk.psi.net with smtp (Exim 2.12 #2) id 13k8K1-0000kO-00; Fri, 13 Oct 2000 18:08:41 +0100 Received: by mail.plasmon.co.uk(Lotus SMTP MTA v4.6.4 (830.2 3-23-1999)) id 80256977.005E5538 ; Fri, 13 Oct 2000 18:10:22 +0100 X-Lotus-FromDomain: PLASNOTES From: dbhague@allstor-sw.co.uk To: freebsd-scsi@FreeBSD.org, freebsd-fs@FreeBSD.org Cc: gibbs@scsiguy.com, mjacob@feral.com, Andre Albsmeier , smcintyre@allstor-sw.co.uk Message-ID: <80256977.005E53A0.00@mail.plasmon.co.uk> Date: Fri, 13 Oct 2000 18:10:16 +0100 Subject: Re: Stressed SCSI subsystem locks up the system Mime-Version: 1.0 Content-type: multipart/mixed; Boundary="0__=T2etIqj8iFCQA8Rywc6WJedRyqfuKXyIjqG4kLozyjcvlcYjVrMWRO80" Content-Disposition: inline Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org --0__=T2etIqj8iFCQA8Rywc6WJedRyqfuKXyIjqG4kLozyjcvlcYjVrMWRO80 Content-type: text/plain; charset=us-ascii Content-Disposition: inline We have rebuilt the SCSI RAID partition with the disklabel -B flag and have just had the following error: dscheck(#da/3): negative b_blkno -132104 dev=#da/3, bno=-66052, bsize=8192 size =8192 fs=/RAID panic: ffs_blkfree: bad size syncing disk This was a new partition generated by the enclosed script, setupraidb, running the test mentioned in my earlier mail. Any ideas ? Regards Dave (See attached file: setupraidb) --0__=T2etIqj8iFCQA8Rywc6WJedRyqfuKXyIjqG4kLozyjcvlcYjVrMWRO80 Content-type: application/octet-stream; name="setupraidb" Content-Disposition: attachment; filename="setupraidb" Content-transfer-encoding: base64 IyEvYmluL3NoCiMKIyAvc2Jpbi9zZXR1cHJhaWQgLSBzaW1wbGUgc2NyaXB0IHRvIGluaXQgdGhl IFJBSUQgb24gYW4gSW50ZWxsaXJhaWQKIyB2ICRJZDogc2V0dXByYWlkLHYgMS4xMSAyMDAwLzEw LzA1IDExOjE2OjQ3IGRzdyBFeHAgJCAKIyAoYykgMjAwMCBBbGxzdG9yIFNvZnR3YXJlCiMKIyBJ ZiB3ZSdyZSBub3QgcGFzc2VkIGEgZGlzayBuYW1lLCB3ZSdsbCBhc3N1bWUgdGhhdCBkYTAgaXMg d2hhdCB3ZQojIHdhbnQuCgojIERlZmF1bHQgaW5pdCB2YWx1ZXMgZm9yIHRoZSB3b3JraW5nIHZh cmlhYmxlcwpESVNLPWRhMApNT1VOVD0vUkFJRApWRVJCT1NFPTAKRk9SQ0U9MAoKIyBJbmNsdWRl IHRoZSBzdGFuZGFyZCBlcnJvciBudW1iZXJzCiMuIC9saWIvZXJybm8uc2gKIyBTdGFuZGFyZCBs aXN0IG9mIGVycm5vIGNvZGVzIHRvIGJlIGluY2x1ZGVkIGluIHNoZWxsIHNjcmlwdHMgdGhhdAoj IG1heSBuZWVkIHRoZW0uCiMKIyBTdGV2ZSBNY0ludHlyZQojCiMgVmFsdWVzIHRha2VuIGZyb20g L3Vzci9pbmNsdWRlL2Vycm5vLmggb24gRnJlZUJTRCAzLjAgdXNpbmcgdGhlCiMgZm9sbG93aW5n IHNjcmlwdDoKIwojIGNhdCAvdXNyL2luY2x1ZGUvZXJybm8uaCB8IGdyZXAgJ14jZGVmaW5lLiov JyB8IGF3ayAnCiMgICAgIHsKIwkgICAgICBnc3ViICgiXFwqLyIsIyAiIikKIyAgICAgICAgIHBy aW50ZigiJXM9JS0xMC4yMHMgXHQjICVzICVzICVzICVzICVzICVzICVzICVzXG4iLCAkMiwgJDMs ICQ1LAojICAgICAgICAgJDYsICQ3LCAkOCwgJDksICQxMCwgJDExLCAkMTIpCiMgICAgIH0nIHwg dHIgLWQgJygpJwojCiMgVGhlc2UgYXJlIG5vdCBhbGwgUE9TSVgsIGJ1dCBzaG91bGQgYmUgYSBz dXBlcnNldCBvZiBpdC4KCkVQRVJNPTEgICAgICAgICAgICAgIyBPcGVyYXRpb24gbm90IHBlcm1p dHRlZCAgICAgCkVOT0VOVD0yICAgICAgICAgICAgIyBObyBzdWNoIGZpbGUgb3IgZGlyZWN0b3J5 ICAgCkVTUkNIPTMgICAgICAgICAgICAgIyBObyBzdWNoIHByb2Nlc3MgICAgIApFSU5UUj00ICAg ICAgICAgICAgICMgSW50ZXJydXB0ZWQgc3lzdGVtIGNhbGwgICAgIApFSU89NSAgICAgICAgICAg ICAgICMgSW5wdXQvb3V0cHV0IGVycm9yICAgICAgCkVOWElPPTYgICAgICAgICAgICAgIyBEZXZp Y2Ugbm90IGNvbmZpZ3VyZWQgICAgIApFMkJJRz03ICAgICAgICAgICAgICMgQXJndW1lbnQgbGlz dCB0b28gbG9uZyAgICAKRU5PRVhFQz04ICAgICAgICAgICAjIEV4ZWMgZm9ybWF0IGVycm9yICAg ICAKRUJBREY9OSAgICAgICAgICAgICAjIEJhZCBmaWxlIGRlc2NyaXB0b3IgICAgIApFQ0hJTEQ9 MTAgICAgICAgICAgICMgTm8gY2hpbGQgcHJvY2Vzc2VzICAgICAKRURFQURMSz0xMSAgICAgICAg ICAjIFJlc291cmNlIGRlYWRsb2NrIGF2b2lkZWQgICAgIApFTk9NRU09MTIgICAgICAgICAgICMg Q2Fubm90IGFsbG9jYXRlIG1lbW9yeSAgICAgCkVBQ0NFUz0xMyAgICAgICAgICAgIyBQZXJtaXNz aW9uIGRlbmllZCAgICAgIApFRkFVTFQ9MTQgICAgICAgICAgICMgQmFkIGFkZHJlc3MgICAgICAK RU5PVEJMSz0xNSAgICAgICAgICAjIEJsb2NrIGRldmljZSByZXF1aXJlZCAgICAgCkVCVVNZPTE2 ICAgICAgICAgICAgIyBEZXZpY2UgYnVzeSAgICAgIApFRVhJU1Q9MTcgICAgICAgICAgICMgRmls ZSBleGlzdHMgICAgICAKRVhERVY9MTggICAgICAgICAgICAjIENyb3NzLWRldmljZSBsaW5rICAg ICAgCkVOT0RFVj0xOSAgICAgICAgICAgIyBPcGVyYXRpb24gbm90IHN1cHBvcnRlZCBieSBkZXZp Y2UgICAKRU5PVERJUj0yMCAgICAgICAgICAjIE5vdCBhIGRpcmVjdG9yeSAgICAgCkVJU0RJUj0y MSAgICAgICAgICAgIyBJcyBhIGRpcmVjdG9yeSAgICAgCkVJTlZBTD0yMiAgICAgICAgICAgIyBJ bnZhbGlkIGFyZ3VtZW50ICAgICAgCkVORklMRT0yMyAgICAgICAgICAgIyBUb28gbWFueSBvcGVu IGZpbGVzIGluIHN5c3RlbSAgCkVNRklMRT0yNCAgICAgICAgICAgIyBUb28gbWFueSBvcGVuIGZp bGVzICAgIApFTk9UVFk9MjUgICAgICAgICAgICMgSW5hcHByb3ByaWF0ZSBpb2N0bCBmb3IgZGV2 aWNlICAgIApFVFhUQlNZPTI2ICAgICAgICAgICMgVGV4dCBmaWxlIGJ1c3kgICAgIApFRkJJRz0y NyAgICAgICAgICAgICMgRmlsZSB0b28gbGFyZ2UgICAgIApFTk9TUEM9MjggICAgICAgICAgICMg Tm8gc3BhY2UgbGVmdCBvbiBkZXZpY2UgICAKRVNQSVBFPTI5ICAgICAgICAgICAjIElsbGVnYWwg c2VlayAgICAgIApFUk9GUz0zMCAgICAgICAgICAgICMgUmVhZC1vbmx5IGZpbGUgc3lzdGVtICAg ICAKRU1MSU5LPTMxICAgICAgICAgICAjIFRvbyBtYW55IGxpbmtzICAgICAKRVBJUEU9MzIgICAg ICAgICAgICAjIEJyb2tlbiBwaXBlICAgICAgCkVET009MzMgICAgICAgICAgICAgIyBOdW1lcmlj YWwgYXJndW1lbnQgb3V0IG9mIGRvbWFpbiAgIApFUkFOR0U9MzQgICAgICAgICAgICMgUmVzdWx0 IHRvbyBsYXJnZSAgICAgCkVBR0FJTj0zNSAgICAgICAgICAgIyBSZXNvdXJjZSB0ZW1wb3Jhcmls eSB1bmF2YWlsYWJsZSAgICAgCkVXT1VMREJMT0NLPSRFQUdBSU4gICAgICAjIE9wZXJhdGlvbiB3 b3VsZCBibG9jayAgICAgCkVJTlBST0dSRVNTPTM2ICAgICAgICAgICMgT3BlcmF0aW9uIG5vdyBp biBwcm9ncmVzcyAgICAKRUFMUkVBRFk9MzcgICAgICAgICAgICAgIyBPcGVyYXRpb24gYWxyZWFk eSBpbiBwcm9ncmVzcyAgICAKRU5PVFNPQ0s9MzggICAgICAgICAgICAgIyBTb2NrZXQgb3BlcmF0 aW9uIG9uIG5vbi1zb2NrZXQgICAgCkVERVNUQUREUlJFUT0zOSAgICAgICAgICAgICAjIERlc3Rp bmF0aW9uIGFkZHJlc3MgcmVxdWlyZWQgICAgIApFTVNHU0laRT00MCAgICAgICAgICAgICAjIE1l c3NhZ2UgdG9vIGxvbmcgICAgIApFUFJPVE9UWVBFPTQxICAgICAgICAgICAjIFByb3RvY29sIHdy b25nIHR5cGUgZm9yIHNvY2tldCAgIApFTk9QUk9UT09QVD00MiAgICAgICAgICAjIFByb3RvY29s IG5vdCBhdmFpbGFibGUgICAgIApFUFJPVE9OT1NVUFBPUlQ9NDMgICAgICAgICAgIyBQcm90b2Nv bCBub3Qgc3VwcG9ydGVkICAgICAKRVNPQ0tUTk9TVVBQT1JUPTQ0ICAgICAgICAgICMgU29ja2V0 IHR5cGUgbm90IHN1cHBvcnRlZCAgICAKRU9QTk9UU1VQUD00NSAgICAgICAgICAgIyBPcGVyYXRp b24gbm90IHN1cHBvcnRlZCAgICAgCkVQRk5PU1VQUE9SVD00NiAgICAgICAgICAgICAjIFByb3Rv Y29sIGZhbWlseSBub3Qgc3VwcG9ydGVkICAgIApFQUZOT1NVUFBPUlQ9NDcgICAgICAgICAgICAg IyBBZGRyZXNzIGZhbWlseSBub3Qgc3VwcG9ydGVkIGJ5IHByb3RvY29sIGZhbWlseSAKRUFERFJJ TlVTRT00OCAgICAgICAgICAgIyBBZGRyZXNzIGFscmVhZHkgaW4gdXNlICAgIApFQUREUk5PVEFW QUlMPTQ5ICAgICAgICAgICAgIyBDYW4ndCBhc3NpZ24gcmVxdWVzdGVkIGFkZHJlc3MgICAgCkVO RVRET1dOPTUwICAgICAgICAgICAgICMgTmV0d29yayBpcyBkb3duICAgICAKRU5FVFVOUkVBQ0g9 NTEgICAgICAgICAgIyBOZXR3b3JrIGlzIHVucmVhY2hhYmxlICAgICAKRU5FVFJFU0VUPTUyICAg ICAgICAgICAgIyBOZXR3b3JrIGRyb3BwZWQgY29ubmVjdGlvbiBvbiByZXNldCAgIApFQ09OTkFC T1JURUQ9NTMgICAgICAgICAgICAgIyBTb2Z0d2FyZSBjYXVzZWQgY29ubmVjdGlvbiBhYm9ydCAg ICAKRUNPTk5SRVNFVD01NCAgICAgICAgICAgIyBDb25uZWN0aW9uIHJlc2V0IGJ5IHBlZXIgICAg CkVOT0JVRlM9NTUgICAgICAgICAgIyBObyBidWZmZXIgc3BhY2UgYXZhaWxhYmxlICAgIApFSVND T05OPTU2ICAgICAgICAgICMgU29ja2V0IGlzIGFscmVhZHkgY29ubmVjdGVkICAgIApFTk9UQ09O Tj01NyAgICAgICAgICAgICAjIFNvY2tldCBpcyBub3QgY29ubmVjdGVkICAgIApFU0hVVERPV049 NTggICAgICAgICAgICAjIENhbid0IHNlbmQgYWZ0ZXIgc29ja2V0IHNodXRkb3duICAgCkVUT09N QU5ZUkVGUz01OSAgICAgICAgICAgICAjIFRvbyBtYW55IHJlZmVyZW5jZXM6IGNhbid0IHNwbGlj ZSAgIApFVElNRURPVVQ9NjAgICAgICAgICAgICAjIE9wZXJhdGlvbiB0aW1lZCBvdXQgICAgIApF Q09OTlJFRlVTRUQ9NjEgICAgICAgICAgICAgIyBDb25uZWN0aW9uIHJlZnVzZWQgICAgICAKRUxP T1A9NjIgICAgICAgICAgICAjIFRvbyBtYW55IGxldmVscyBvZiBzeW1ib2xpYyBsaW5rcyAgCkVO QU1FVE9PTE9ORz02MyAgICAgICAgICAgICAjIEZpbGUgbmFtZSB0b28gbG9uZyAgICAKRUhPU1RE T1dOPTY0ICAgICAgICAgICAgIyBIb3N0IGlzIGRvd24gICAgIApFSE9TVFVOUkVBQ0g9NjUgICAg ICAgICAgICAgIyBObyByb3V0ZSB0byBob3N0ICAgIApFTk9URU1QVFk9NjYgICAgICAgICAgICAj IERpcmVjdG9yeSBub3QgZW1wdHkgICAgIApFUFJPQ0xJTT02NyAgICAgICAgICAgICAjIFRvbyBt YW55IHByb2Nlc3NlcyAgICAgCkVVU0VSUz02OCAgICAgICAgICAgIyBUb28gbWFueSB1c2VycyAg ICAgCkVEUVVPVD02OSAgICAgICAgICAgIyBEaXNjIHF1b3RhIGV4Y2VlZGVkICAgICAKRVNUQUxF PTcwICAgICAgICAgICAjIFN0YWxlIE5GUyBmaWxlIGhhbmRsZSAgICAKRVJFTU9URT03MSAgICAg ICAgICAjIFRvbyBtYW55IGxldmVscyBvZiByZW1vdGUgaW4gcGF0aCAKRUJBRFJQQz03MiAgICAg ICAgICAjIFJQQyBzdHJ1Y3QgaXMgYmFkICAgIApFUlBDTUlTTUFUQ0g9NzMgICAgICAgICAgICAg IyBSUEMgdmVyc2lvbiB3cm9uZyAgICAgCkVQUk9HVU5BVkFJTD03NCAgICAgICAgICAgICAjIFJQ QyBwcm9nLiBub3QgYXZhaWwgICAgCkVQUk9HTUlTTUFUQ0g9NzUgICAgICAgICAgICAjIFByb2dy YW0gdmVyc2lvbiB3cm9uZyAgICA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SyJhIC9zeXN0ZW0KCmlmIFsgISAt ZCAiJE1PVU5UIiBdIDsgdGhlbgoJbWtkaXIgIiRNT1VOVCIKZmkKCnZlY2hvIE1vdW50aW5nICRN T1VOVAptb3VudCAvZGV2LyIkRElTSyJkICIkTU9VTlQiCgojIE1ha2UgdGhlIG1vdW50IHdvcmxk IHIvdydhYmxlCmNobW9kIDc3NyAiJE1PVU5UIgoKZXhpdCAwCg== --0__=T2etIqj8iFCQA8Rywc6WJedRyqfuKXyIjqG4kLozyjcvlcYjVrMWRO80-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message