From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 00:06:56 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB900106564A; Sun, 24 Apr 2011 00:06:56 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B31038FC08; Sun, 24 Apr 2011 00:06:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3O06ugx009041; Sun, 24 Apr 2011 00:06:56 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3O06uBT009037; Sun, 24 Apr 2011 00:06:56 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201104240006.p3O06uBT009037@svn.freebsd.org> From: Rick Macklem Date: Sun, 24 Apr 2011 00:06:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220980 - in head: . usr.sbin/mountd usr.sbin/nfsd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2011 00:06:56 -0000 Author: rmacklem Date: Sun Apr 24 00:06:56 2011 New Revision: 220980 URL: http://svn.freebsd.org/changeset/base/220980 Log: This patch changes the default NFS server to the new one, which was referred to as the experimental server. It also adds a new command line option "-o" to both mountd and nfsd that forces them to use the old/regular NFS server. The "-e" option for these commands is now a no-op, since the new server is the default. I will be committing rc script and man changes soon. Discussed on freebsd-fs@. Modified: head/UPDATING head/usr.sbin/mountd/mountd.c head/usr.sbin/nfsd/nfsd.c Modified: head/UPDATING ============================================================================== --- head/UPDATING Sat Apr 23 23:11:44 2011 (r220979) +++ head/UPDATING Sun Apr 24 00:06:56 2011 (r220980) @@ -22,6 +22,14 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. machines to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20110423: + The default NFS server has been changed to the new server, which + was referred to as the experimental server. If you need to switch + back to the old NFS server, you must now put the "-o" option on + both the mountd and nfsd commands. This can be done using the + mountd_flags and nfs_server_flags rc.conf variables until an + update to the rc scripts is committed, which is coming soon. + 20110418: The GNU Objective-C runtime library (libobjc), and other Objective-C related components have been removed from the base system. If you Modified: head/usr.sbin/mountd/mountd.c ============================================================================== --- head/usr.sbin/mountd/mountd.c Sat Apr 23 23:11:44 2011 (r220979) +++ head/usr.sbin/mountd/mountd.c Sun Apr 24 00:06:56 2011 (r220980) @@ -239,7 +239,7 @@ static int have_v6 = 1; int v4root_phase = 0; char v4root_dirpath[PATH_MAX + 1]; -int run_v4server = 0; +int run_v4server = 1; int has_publicfh = 0; struct pidfh *pfh = NULL; @@ -296,13 +296,13 @@ main(int argc, char **argv) else close(s); - while ((c = getopt(argc, argv, "2deh:lnp:r")) != -1) + while ((c = getopt(argc, argv, "2deh:lnop:r")) != -1) switch (c) { case '2': force_v2 = 1; break; case 'e': - run_v4server = 1; + /* now a no-op, since this is the default */ break; case 'n': resvport_only = 0; @@ -316,6 +316,9 @@ main(int argc, char **argv) case 'l': dolog = 1; break; + case 'o': + run_v4server = 0; + break; case 'p': endptr = NULL; svcport = (in_port_t)strtoul(optarg, &endptr, 10); @@ -350,9 +353,8 @@ main(int argc, char **argv) }; /* - * If the "-e" option was specified OR only the nfsd module is - * found in the server, run "nfsd". - * Otherwise, try and run "nfsserver". + * Unless the "-o" option was specified, try and run "nfsd". + * If "-o" was specified, try and run "nfsserver". */ if (run_v4server > 0) { if (modfind("nfsd") < 0) { @@ -360,8 +362,6 @@ main(int argc, char **argv) if (kldload("nfsd") < 0 || modfind("nfsd") < 0) errx(1, "NFS server is not available"); } - } else if (modfind("nfsserver") < 0 && modfind("nfsd") >= 0) { - run_v4server = 1; } else if (modfind("nfsserver") < 0) { /* Not present in kernel, try loading it */ if (kldload("nfsserver") < 0 || modfind("nfsserver") < 0) Modified: head/usr.sbin/nfsd/nfsd.c ============================================================================== --- head/usr.sbin/nfsd/nfsd.c Sat Apr 23 23:11:44 2011 (r220979) +++ head/usr.sbin/nfsd/nfsd.c Sun Apr 24 00:06:56 2011 (r220980) @@ -88,7 +88,7 @@ int debug = 0; pid_t children[MAXNFSDCNT]; /* PIDs of children */ int nfsdcnt; /* number of children */ int new_syscall; -int run_v4server = 0; /* Force running of nfsv4 server */ +int run_v4server = 1; /* Force running of nfsv4 server */ int nfssvc_nfsd; /* Set to correct NFSSVC_xxx flag */ int stablefd = -1; /* Fd for the stable restart file */ int backupfd; /* Fd for the backup stable restart file */ @@ -152,8 +152,8 @@ main(int argc, char **argv) nfsdcnt = DEFNFSDCNT; unregister = reregister = tcpflag = maxsock = 0; bindanyflag = udpflag = connect_type_cnt = bindhostc = 0; -#define GETOPT "ah:n:rdtue" -#define USAGE "[-ardtue] [-n num_servers] [-h bindip]" +#define GETOPT "ah:n:rdtueo" +#define USAGE "[-ardtueo] [-n num_servers] [-h bindip]" while ((ch = getopt(argc, argv, GETOPT)) != -1) switch (ch) { case 'a': @@ -189,7 +189,10 @@ main(int argc, char **argv) udpflag = 1; break; case 'e': - run_v4server = 1; + /* now a no-op, since this is the default */ + break; + case 'o': + run_v4server = 0; break; default: case '?': @@ -216,9 +219,8 @@ main(int argc, char **argv) } /* - * If the "-e" option was specified OR only the nfsd module is - * found in the server, run "nfsd". - * Otherwise, try and run "nfsserver". + * Unless the "-o" option was specified, try and run "nfsd". + * If "-o" was specified, try and run "nfsserver". */ if (run_v4server > 0) { if (modfind("nfsd") < 0) { @@ -226,8 +228,6 @@ main(int argc, char **argv) if (kldload("nfsd") < 0 || modfind("nfsd") < 0) errx(1, "NFS server is not available"); } - } else if (modfind("nfsserver") < 0 && modfind("nfsd") >= 0) { - run_v4server = 1; } else if (modfind("nfsserver") < 0) { /* Not present in kernel, try loading it */ if (kldload("nfsserver") < 0 || modfind("nfsserver") < 0) From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 01:11:28 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B90D106564A; Sun, 24 Apr 2011 01:11:28 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 791F18FC08; Sun, 24 Apr 2011 01:11:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3O1BSl3010960; Sun, 24 Apr 2011 01:11:28 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3O1BSZv010957; Sun, 24 Apr 2011 01:11:28 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201104240111.p3O1BSZv010957@svn.freebsd.org> From: Rick Macklem Date: Sun, 24 Apr 2011 01:11:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220981 - in head/usr.sbin: mountd nfsd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2011 01:11:28 -0000 Author: rmacklem Date: Sun Apr 24 01:11:28 2011 New Revision: 220981 URL: http://svn.freebsd.org/changeset/base/220981 Log: Patch the mountd and nfsd man pages to reflect the recent changes done by r220980 to deprecate the -e option and add the -o option. This is a content change for both man pages. Modified: head/usr.sbin/mountd/mountd.8 head/usr.sbin/nfsd/nfsd.8 Modified: head/usr.sbin/mountd/mountd.8 ============================================================================== --- head/usr.sbin/mountd/mountd.8 Sun Apr 24 00:06:56 2011 (r220980) +++ head/usr.sbin/mountd/mountd.8 Sun Apr 24 01:11:28 2011 (r220981) @@ -28,7 +28,7 @@ .\" @(#)mountd.8 8.4 (Berkeley) 4/28/95 .\" $FreeBSD$ .\" -.Dd October 20, 2007 +.Dd April 23, 2011 .Dt MOUNTD 8 .Os .Sh NAME @@ -38,7 +38,7 @@ mount requests .Sh SYNOPSIS .Nm -.Op Fl 2delnr +.Op Fl 2delnor .Op Fl h Ar bindip .Op Fl p Ar port .Op Ar exportsfile ... @@ -69,17 +69,8 @@ Output debugging information. will not detach from the controlling terminal and will print debugging messages to stderr. .It Fl e -Forces -.Nm -to try and start the experimental server that includes NFSv4 support in it. -If this flag isn't specified, the experimental server will only be started -if it is linked into the kernel and the regular one isn't. -.br -ie. The kernel is built with the following: -.Bd -literal -offset indent -compact -# options NFSSERVER -options NFSD -.Ed +The new NFS server that includes NFSv4 support is now the default, so this +option is now a no-op and should be considered deprecated. .It Fl h Ar bindip Specify specific IP addresses to bind to for TCP and UDP requests. This option may be specified multiple times. @@ -107,6 +98,9 @@ This should only be specified if there a that require it. It will automatically clear the vfs.nfsrv.nfs_privport sysctl flag, which controls if the kernel will accept NFS requests from reserved ports only. +.It Fl o +This flag forces the system to run the old NFS server, which does not +have NFSv4 support in it. .It Fl p Ar port Force .Nm Modified: head/usr.sbin/nfsd/nfsd.8 ============================================================================== --- head/usr.sbin/nfsd/nfsd.8 Sun Apr 24 00:06:56 2011 (r220980) +++ head/usr.sbin/nfsd/nfsd.8 Sun Apr 24 01:11:28 2011 (r220981) @@ -28,7 +28,7 @@ .\" @(#)nfsd.8 8.4 (Berkeley) 3/29/95 .\" $FreeBSD$ .\" -.Dd April 19, 2011 +.Dd April 23, 2011 .Dt NFSD 8 .Os .Sh NAME @@ -38,7 +38,7 @@ server .Sh SYNOPSIS .Nm -.Op Fl ardute +.Op Fl arduteo .Op Fl n Ar num_servers .Op Fl h Ar bindip .Sh DESCRIPTION @@ -101,17 +101,11 @@ Serve .Tn UDP NFS clients. .It Fl e -Forces -.Nm -to try and start the experimental server that includes NFSv4 support in it. -If this flag isn't specified, the experimental server will only be started -if it is linked into the kernel and the regular one isn't. -.br -ie. The kernel is built with the following: -.Bd -literal -offset indent -compact -# options NFSSERVER -options NFSD -.Ed +The new NFS server that includes NFSv4 support is now the default, so this +option is now a no-op and should be considered deprecated. +.It Fl o +Forces the use of the old NFS server that does not include NFSv4 support +in it. .El .Pp For example, From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 01:44:22 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D5A50106566C; Sun, 24 Apr 2011 01:44:22 +0000 (UTC) (envelope-from andy@fud.org.nz) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 272EE8FC16; Sun, 24 Apr 2011 01:44:21 +0000 (UTC) Received: by wyf23 with SMTP id 23so1366542wyf.13 for ; Sat, 23 Apr 2011 18:44:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.62.74 with SMTP id x52mr1544178wec.45.1303609460458; Sat, 23 Apr 2011 18:44:20 -0700 (PDT) Sender: andy@fud.org.nz Received: by 10.216.181.144 with HTTP; Sat, 23 Apr 2011 18:44:20 -0700 (PDT) In-Reply-To: <201104240006.p3O06uBT009037@svn.freebsd.org> References: <201104240006.p3O06uBT009037@svn.freebsd.org> Date: Sun, 24 Apr 2011 13:44:20 +1200 X-Google-Sender-Auth: p0BE1UJDtEvFoJFYrpEl0T9KhwU Message-ID: From: Andrew Thompson To: Rick Macklem Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r220980 - in head: . usr.sbin/mountd usr.sbin/nfsd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2011 01:44:22 -0000 On 24 April 2011 12:06, Rick Macklem wrote: > Author: rmacklem > Date: Sun Apr 24 00:06:56 2011 > New Revision: 220980 > URL: http://svn.freebsd.org/changeset/base/220980 > > Log: > =A0This patch changes the default NFS server to the new one, which was > =A0referred to as the experimental server. It also adds a new command > =A0line option "-o" to both mountd and nfsd that forces them to use the > =A0old/regular NFS server. The "-e" option for these commands is now > =A0a no-op, since the new server is the default. I will be committing rc > =A0script and man changes soon. Discussed on freebsd-fs@. Congratulations. From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 08:58:58 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D5341106564A; Sun, 24 Apr 2011 08:58:58 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BFF1B8FC08; Sun, 24 Apr 2011 08:58:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3O8wwuG024655; Sun, 24 Apr 2011 08:58:58 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3O8wwqT024628; Sun, 24 Apr 2011 08:58:58 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201104240858.p3O8wwqT024628@svn.freebsd.org> From: Alexander Motin Date: Sun, 24 Apr 2011 08:58:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2011 08:58:58 -0000 Author: mav Date: Sun Apr 24 08:58:58 2011 New Revision: 220982 URL: http://svn.freebsd.org/changeset/base/220982 Log: Switch the GENERIC kernels for all architectures to the new CAM-based ATA stack. It means that all legacy ATA drivers are disabled and replaced by respective CAM drivers. If you are using ATA device names in /etc/fstab or other places, make sure to update them respectively (adX -> adaY, acdX -> cdY, afdX -> daY, astX -> saY, where 'Y's are the sequential numbers for each type in order of detection, unless configured otherwise with tunables, see cam(4)). ataraid(4) functionality is now supported by the RAID GEOM class. To use it you can load geom_raid kernel module and use graid(8) tool for management. Instead of /dev/arX device names, use /dev/raid/rX. Modified: head/UPDATING head/sys/amd64/conf/GENERIC head/sys/arm/conf/AVILA head/sys/arm/conf/CAMBRIA head/sys/arm/conf/CRB head/sys/arm/conf/DB-78XXX head/sys/arm/conf/DB-88F5XXX head/sys/arm/conf/DB-88F6XXX head/sys/arm/conf/EP80219 head/sys/arm/conf/IQ31244 head/sys/arm/conf/TS7800 head/sys/conf/NOTES head/sys/i386/conf/GENERIC head/sys/i386/conf/XBOX head/sys/ia64/conf/GENERIC head/sys/mips/conf/MALTA head/sys/mips/conf/MALTA64 head/sys/mips/conf/OCTEON1 head/sys/mips/conf/std.SWARM head/sys/mips/malta/std.malta head/sys/pc98/conf/GENERIC head/sys/powerpc/conf/GENERIC head/sys/powerpc/conf/GENERIC64 head/sys/powerpc/conf/MPC85XX head/sys/sparc64/conf/GENERIC head/sys/sun4v/conf/GENERIC Modified: head/UPDATING ============================================================================== --- head/UPDATING Sun Apr 24 01:11:28 2011 (r220981) +++ head/UPDATING Sun Apr 24 08:58:58 2011 (r220982) @@ -22,6 +22,34 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. machines to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20110424: + The GENERIC kernels for all architectures now default to the new + CAM-based ATA stack. It means that all legacy ATA drivers were + removed and replaced by respective CAM drivers. If you are using + ATA device names in /etc/fstab or other places, make sure to update + them respectively (adX -> adaY, acdX -> cdY, afdX -> daY, astX -> saY, + where 'Y's are the sequential numbers for each type in order of + detection, unless configured otherwise with tunables, see cam(4)). + + ataraid(4) functionality is now supported by the RAID GEOM class. + To use it you can load geom_raid kernel module and use graid(8) tool + for management. Instead of /dev/arX device names, use /dev/raid/rX. + + No kernel config options or code have been removed, so if a problem + arises, please report it and optionally revert to the old ATA stack. + In order to do it you can remove from the kernel config: + options ATA_CAM + device ahci + device mvs + device siis + , and instead add back: + device atadisk # ATA disk drives + device ataraid # ATA RAID drives + device atapicd # ATAPI CDROM drives + device atapifd # ATAPI floppy drives + device atapist # ATAPI tape drives + options ATA_STATIC_ID # Static device numbering + 20110423: The default NFS server has been changed to the new server, which was referred to as the experimental server. If you need to switch Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Sun Apr 24 01:11:28 2011 (r220981) +++ head/sys/amd64/conf/GENERIC Sun Apr 24 08:58:58 2011 (r220982) @@ -89,14 +89,12 @@ device pci # Floppy drives device fdc -# ATA and ATAPI devices -device ata -device atadisk # ATA disk drives -device ataraid # ATA RAID drives -device atapicd # ATAPI CDROM drives -device atapifd # ATAPI floppy drives -device atapist # ATAPI tape drives -options ATA_STATIC_ID # Static device numbering +# ATA controllers +device ahci # AHCI-compatible SATA controllers +device ata # Legacy ATA/SATA controllers +options ATA_CAM # Handle legacy controllers with CAM +device mvs # Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA +device siis # SiliconImage SiI3124/SiI3132/SiI3531 SATA # SCSI Controllers device ahc # AHA2940 and onboard AIC7xxx devices @@ -120,13 +118,13 @@ device adw # Advansys wide SCSI adapte device aic # Adaptec 15[012]x SCSI adapters, AIC-6[23]60. device bt # Buslogic/Mylex MultiMaster SCSI adapters -# SCSI peripherals -device scbus # SCSI bus (required for SCSI) +# ATA/SCSI peripherals +device scbus # SCSI bus (required for ATA/SCSI) device ch # SCSI media changers device da # Direct Access (disks) device sa # Sequential Access (tape etc) device cd # CD -device pass # Passthrough device (direct SCSI access) +device pass # Passthrough device (direct ATA/SCSI access) device ses # SCSI Environmental Services (and SAF-TE) # RAID controllers interfaced to the SCSI subsystem Modified: head/sys/arm/conf/AVILA ============================================================================== --- head/sys/arm/conf/AVILA Sun Apr 24 01:11:28 2011 (r220981) +++ head/sys/arm/conf/AVILA Sun Apr 24 08:58:58 2011 (r220982) @@ -92,8 +92,8 @@ device gpioled device avila_gpio # GPIO pins on J8 device ata -device atadisk # ATA disk drives device avila_ata # Gateworks CF/IDE support +options ATA_CAM device npe # Network Processing Engine device npe_fw @@ -149,8 +149,9 @@ device usb device ohci device ehci device umass -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) +device pass # Passthrough device (direct ATA/SCSI access) #device ural #device zyd Modified: head/sys/arm/conf/CAMBRIA ============================================================================== --- head/sys/arm/conf/CAMBRIA Sun Apr 24 01:11:28 2011 (r220981) +++ head/sys/arm/conf/CAMBRIA Sun Apr 24 08:58:58 2011 (r220982) @@ -95,8 +95,8 @@ device gpioled device cambria_gpio # GPIO pins on J11 device ata -device atadisk # ATA disk drives device avila_ata # Gateworks CF/IDE support +options ATA_CAM device npe # Network Processing Engine device npe_fw @@ -154,8 +154,9 @@ options USB_EHCI_BIG_ENDIAN_DESC # hand #options USB_DEBUG device ehci device umass -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) +device pass # Passthrough device (direct ATA/SCSI access) #device ural #device zyd Modified: head/sys/arm/conf/CRB ============================================================================== --- head/sys/arm/conf/CRB Sun Apr 24 01:11:28 2011 (r220981) +++ head/sys/arm/conf/CRB Sun Apr 24 08:58:58 2011 (r220982) @@ -73,12 +73,12 @@ device uart device pci device ata -device atadisk # ATA disk drives -device ataraid # ATA RAID drives -device atapicd # ATAPI CDROM drives -device atapifd # ATAPI floppy drives -device atapist # ATAPI tape drives -options ATA_STATIC_ID # Static device numbering +options ATA_CAM + +device scbus # SCSI bus (required for ATA/SCSI) +device cd # CD +device da # Direct Access (disks) +device pass # Passthrough device (direct ATA/SCSI access) device "7seg" Modified: head/sys/arm/conf/DB-78XXX ============================================================================== --- head/sys/arm/conf/DB-78XXX Sun Apr 24 01:11:28 2011 (r220981) +++ head/sys/arm/conf/DB-78XXX Sun Apr 24 08:58:58 2011 (r220982) @@ -81,8 +81,7 @@ device iicbus device ds133x # SATA -device ata -device atadisk +device mvs # Flattened Device Tree options FDT Modified: head/sys/arm/conf/DB-88F5XXX ============================================================================== --- head/sys/arm/conf/DB-88F5XXX Sun Apr 24 01:11:28 2011 (r220981) +++ head/sys/arm/conf/DB-88F5XXX Sun Apr 24 08:58:58 2011 (r220982) @@ -83,8 +83,7 @@ device pass device da # SATA -device ata -device atadisk +device mvs # Flattened Device Tree options FDT Modified: head/sys/arm/conf/DB-88F6XXX ============================================================================== --- head/sys/arm/conf/DB-88F6XXX Sun Apr 24 01:11:28 2011 (r220981) +++ head/sys/arm/conf/DB-88F6XXX Sun Apr 24 08:58:58 2011 (r220982) @@ -80,8 +80,7 @@ device iic device iicbus # SATA -device ata -device atadisk +device mvs # Flattened Device Tree options FDT Modified: head/sys/arm/conf/EP80219 ============================================================================== --- head/sys/arm/conf/EP80219 Sun Apr 24 01:11:28 2011 (r220981) +++ head/sys/arm/conf/EP80219 Sun Apr 24 08:58:58 2011 (r220982) @@ -73,12 +73,12 @@ device uart device pci device ata -device atadisk # ATA disk drives -device ataraid # ATA RAID drives -device atapicd # ATAPI CDROM drives -device atapifd # ATAPI floppy drives -device atapist # ATAPI tape drives -options ATA_STATIC_ID # Static device numbering +options ATA_CAM + +device scbus # SCSI bus (required for ATA/SCSI) +device cd # CD +device da # Direct Access (disks) +device pass # Passthrough device (direct ATA/SCSI access) # SCSI Controllers @@ -111,4 +111,4 @@ options INCLUDE_CONFIG_FILE # Inclu options VERBOSE_INIT_ARM device bpf -#options ROOTDEVNAME=\"ufs:ad4s1a\" +#options ROOTDEVNAME=\"ufs:ada0s1a\" Modified: head/sys/arm/conf/IQ31244 ============================================================================== --- head/sys/arm/conf/IQ31244 Sun Apr 24 01:11:28 2011 (r220981) +++ head/sys/arm/conf/IQ31244 Sun Apr 24 08:58:58 2011 (r220982) @@ -72,12 +72,12 @@ device uart device pci device ata -device atadisk # ATA disk drives -device ataraid # ATA RAID drives -device atapicd # ATAPI CDROM drives -device atapifd # ATAPI floppy drives -device atapist # ATAPI tape drives -options ATA_STATIC_ID # Static device numbering +options ATA_CAM + +device scbus # SCSI bus (required for ATA/SCSI) +device cd # CD +device da # Direct Access (disks) +device pass # Passthrough device (direct ATA/SCSI access) # SCSI Controllers Modified: head/sys/arm/conf/TS7800 ============================================================================== --- head/sys/arm/conf/TS7800 Sun Apr 24 01:11:28 2011 (r220981) +++ head/sys/arm/conf/TS7800 Sun Apr 24 08:58:58 2011 (r220982) @@ -71,7 +71,7 @@ device da # SATA device ata -device atadisk +options ATA_CAM # Flattened Device Tree options FDT Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Sun Apr 24 01:11:28 2011 (r220981) +++ head/sys/conf/NOTES Sun Apr 24 08:58:58 2011 (r220982) @@ -1754,9 +1754,9 @@ hint.ata.1.irq="15" # atapifd, atapist, atapicam) and all user-level APIs. # cam(4) drivers and APIs will be connected instead. -options ATA_STATIC_ID +#options ATA_STATIC_ID #options ATA_REQUEST_TIMEOUT=10 -#options ATA_CAM +options ATA_CAM # # Standard floppy disk controllers and floppy tapes, supports Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Sun Apr 24 01:11:28 2011 (r220981) +++ head/sys/i386/conf/GENERIC Sun Apr 24 08:58:58 2011 (r220982) @@ -91,14 +91,12 @@ device pci # Floppy drives device fdc -# ATA and ATAPI devices -device ata -device atadisk # ATA disk drives -device ataraid # ATA RAID drives -device atapicd # ATAPI CDROM drives -device atapifd # ATAPI floppy drives -device atapist # ATAPI tape drives -options ATA_STATIC_ID # Static device numbering +# ATA controllers +device ahci # AHCI-compatible SATA controllers +device ata # Legacy ATA/SATA controllers +options ATA_CAM # Handle legacy controllers with CAM +device mvs # Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA +device siis # SiliconImage SiI3124/SiI3132/SiI3531 SATA # SCSI Controllers device ahb # EISA AHA1742 family @@ -127,13 +125,13 @@ device ncv # NCR 53C500 device nsp # Workbit Ninja SCSI-3 device stg # TMC 18C30/18C50 -# SCSI peripherals -device scbus # SCSI bus (required for SCSI) +# ATA/SCSI peripherals +device scbus # SCSI bus (required for ATA/SCSI) device ch # SCSI media changers device da # Direct Access (disks) device sa # Sequential Access (tape etc) device cd # CD -device pass # Passthrough device (direct SCSI access) +device pass # Passthrough device (direct ATA/SCSI access) device ses # SCSI Environmental Services (and SAF-TE) # RAID controllers interfaced to the SCSI subsystem Modified: head/sys/i386/conf/XBOX ============================================================================== --- head/sys/i386/conf/XBOX Sun Apr 24 01:11:28 2011 (r220981) +++ head/sys/i386/conf/XBOX Sun Apr 24 08:58:58 2011 (r220982) @@ -16,7 +16,7 @@ device sc # syscons device fb # no support yet for root device name fetching -options ROOTDEVNAME=\"ufs:ad0s1a\" +options ROOTDEVNAME=\"ufs:ada0s1a\" #options ROOTDEVNAME=\"cd9660:acd0\" options SCHED_4BSD # 4BSD scheduler @@ -51,13 +51,13 @@ device pci # ATA and ATAPI devices device ata -device atadisk # ATA disk drives -device atapicd # ATAPI CDROM drives -options ATA_STATIC_ID # Static device numbering +options ATA_CAM -# SCSI peripherals -device scbus # SCSI bus (required for SCSI) +# ATA/SCSI peripherals +device scbus # SCSI bus (required for ATA/SCSI) +device cd # CD device da # Direct Access (disks) +device pass # Passthrough device (direct ATA/SCSI access) # Pseudo devices. device loop # Network loopback Modified: head/sys/ia64/conf/GENERIC ============================================================================== --- head/sys/ia64/conf/GENERIC Sun Apr 24 01:11:28 2011 (r220981) +++ head/sys/ia64/conf/GENERIC Sun Apr 24 08:58:58 2011 (r220982) @@ -73,16 +73,15 @@ options MALLOC_DEBUG_MAXZONES=8 # Separ device firewire # FireWire bus code device miibus # MII bus support (Ethernet) device pci # PCI bus support -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device usb # USB Bus (required for USB) -# ATA and ATAPI devices -device ata # ATA controller -device atadisk # ATA disk drives -device atapicd # ATAPI CDROM drives -device atapifd # ATAPI floppy drives -device atapist # ATAPI tape drives -device ataraid # ATA RAID drives +# ATA controllers +device ahci # AHCI-compatible SATA controllers +device ata # Legacy ATA/SATA controllers +options ATA_CAM # Handle legacy controllers with CAM +device mvs # Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA +device siis # SiliconImage SiI3124/SiI3132/SiI3531 SATA # SCSI Controllers device ahc # AHA2940 and AIC7xxx devices @@ -101,11 +100,11 @@ device ips # IBM (Adaptec) ServeRAID device mly # Mylex AcceleRAID/eXtremeRAID device twa # 3ware 9000 series PATA/SATA RAID -# SCSI peripherals +# ATA/SCSI peripherals device cd # CD-ROM, DVD-ROM etc. device ch # Media changer device da # Direct Access (ie disk) -device pass # Passthrough (direct SCSI access) +device pass # Passthrough (direct ATA/SCSI access) device sa # Sequential Access (ie tape) device ses # Environmental Services (and SAF-TE) Modified: head/sys/mips/conf/MALTA ============================================================================== --- head/sys/mips/conf/MALTA Sun Apr 24 01:11:28 2011 (r220981) +++ head/sys/mips/conf/MALTA Sun Apr 24 08:58:58 2011 (r220982) @@ -53,7 +53,7 @@ options FFS #Berkeley Fast Filesystem options SOFTUPDATES #Enable FFS soft updates support options UFS_ACL #Support for access control lists options UFS_DIRHASH #Improve performance on big directories -options ROOTDEVNAME=\"ufs:ad0s1a\" +options ROOTDEVNAME=\"ufs:ada0s1a\" # Debugging for use in -current Modified: head/sys/mips/conf/MALTA64 ============================================================================== --- head/sys/mips/conf/MALTA64 Sun Apr 24 01:11:28 2011 (r220981) +++ head/sys/mips/conf/MALTA64 Sun Apr 24 08:58:58 2011 (r220982) @@ -53,7 +53,7 @@ options FFS #Berkeley Fast Filesystem options SOFTUPDATES #Enable FFS soft updates support options UFS_ACL #Support for access control lists options UFS_DIRHASH #Improve performance on big directories -options ROOTDEVNAME=\"ufs:ad0s1a\" +options ROOTDEVNAME=\"ufs:ada0s1a\" # Debugging for use in -current Modified: head/sys/mips/conf/OCTEON1 ============================================================================== --- head/sys/mips/conf/OCTEON1 Sun Apr 24 01:11:28 2011 (r220981) +++ head/sys/mips/conf/OCTEON1 Sun Apr 24 08:58:58 2011 (r220982) @@ -95,14 +95,12 @@ options SMP # Symmetric MultiProcesso # Bus support. device pci -# ATA and ATAPI devices -device ata -device atadisk # ATA disk drives -device ataraid # ATA RAID drives -device atapicd # ATAPI CDROM drives -device atapifd # ATAPI floppy drives -device atapist # ATAPI tape drives -options ATA_STATIC_ID # Static device numbering +# ATA controllers +device ahci # AHCI-compatible SATA controllers +device ata # Legacy ATA/SATA controllers +options ATA_CAM # Handle legacy controllers with CAM +device mvs # Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA +device siis # SiliconImage SiI3124/SiI3132/SiI3531 SATA # On-board Compact Flash driver. device cf @@ -129,13 +127,13 @@ device adw # Advansys wide SCSI adapte device aic # Adaptec 15[012]x SCSI adapters, AIC-6[23]60. device bt # Buslogic/Mylex MultiMaster SCSI adapters -# SCSI peripherals -device scbus # SCSI bus (required for SCSI) +# ATA/SCSI peripherals +device scbus # SCSI bus (required for ATA/SCSI) device ch # SCSI media changers device da # Direct Access (disks) device sa # Sequential Access (tape etc) device cd # CD -device pass # Passthrough device (direct SCSI access) +device pass # Passthrough device (direct ATA/SCSI access) device ses # SCSI Environmental Services (and SAF-TE) # RAID controllers interfaced to the SCSI subsystem Modified: head/sys/mips/conf/std.SWARM ============================================================================== --- head/sys/mips/conf/std.SWARM Sun Apr 24 01:11:28 2011 (r220981) +++ head/sys/mips/conf/std.SWARM Sun Apr 24 08:58:58 2011 (r220982) @@ -52,9 +52,9 @@ device ehci device umass device scbus +device cd device da +device pass device ata -device atadisk -device atapicd -options ATA_STATIC_ID +options ATA_CAM Modified: head/sys/mips/malta/std.malta ============================================================================== --- head/sys/mips/malta/std.malta Sun Apr 24 01:11:28 2011 (r220981) +++ head/sys/mips/malta/std.malta Sun Apr 24 08:58:58 2011 (r220982) @@ -5,4 +5,9 @@ cpu CPU_MIPS4KC #options ISA_MIPS32 device pci device ata -device atadisk +options ATA_CAM + +device scbus # SCSI bus (required for ATA/SCSI) +device cd # CD +device da # Direct Access (disks) +device pass # Passthrough device (direct ATA/SCSI access) Modified: head/sys/pc98/conf/GENERIC ============================================================================== --- head/sys/pc98/conf/GENERIC Sun Apr 24 01:11:28 2011 (r220981) +++ head/sys/pc98/conf/GENERIC Sun Apr 24 08:58:58 2011 (r220982) @@ -87,13 +87,12 @@ device pci # Floppy drives device fdc -# ATA and ATAPI devices -device ata -device atadisk # ATA disk drives -device atapicd # ATAPI CDROM drives -device atapifd # ATAPI floppy drives -device atapist # ATAPI tape drives -options ATA_STATIC_ID # Static device numbering +# ATA controllers +device ahci # AHCI-compatible SATA controllers +device ata # Legacy ATA/SATA controllers +options ATA_CAM # Handle legacy controllers with CAM +device mvs # Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA +device siis # SiliconImage SiI3124/SiI3132/SiI3531 SATA # SCSI Controllers device adv # Advansys SCSI adapters @@ -110,13 +109,13 @@ device ncv # NCR 53C500 device nsp # Workbit Ninja SCSI-3 device stg # TMC 18C30/18C50 -# SCSI peripherals -device scbus # SCSI bus (required for SCSI) +# ATA/SCSI peripherals +device scbus # SCSI bus (required for ATA/SCSI) device ch # SCSI media changers device da # Direct Access (disks) device sa # Sequential Access (tape etc) device cd # CD -device pass # Passthrough device (direct SCSI access) +device pass # Passthrough device (direct ATA/SCSI access) device ses # SCSI Environmental Services (and SAF-TE) # keyboard driver Modified: head/sys/powerpc/conf/GENERIC ============================================================================== --- head/sys/powerpc/conf/GENERIC Sun Apr 24 01:11:28 2011 (r220981) +++ head/sys/powerpc/conf/GENERIC Sun Apr 24 08:58:58 2011 (r220982) @@ -86,12 +86,12 @@ device cpufreq device pci device agp -# ATA and ATAPI devices -device ata -device atadisk # ATA disk drives -device atapicd # ATAPI CDROM drives -#device atapifd # ATAPI floppy drives -#device atapist # ATAPI tape drives +# ATA controllers +device ahci # AHCI-compatible SATA controllers +device ata # Legacy ATA/SATA controllers +options ATA_CAM # Handle legacy controllers with CAM +device mvs # Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA +device siis # SiliconImage SiI3124/SiI3132/SiI3531 SATA # SCSI Controllers device ahc # AHA2940 and onboard AIC7xxx devices @@ -103,12 +103,12 @@ device ispfw # Firmware module for Qlo device mpt # LSI-Logic MPT-Fusion device sym # NCR/Symbios/LSI Logic 53C8XX/53C1010/53C1510D -# SCSI peripherals -device scbus # SCSI bus (required for SCSI) +# ATA/SCSI peripherals +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device sa # Sequential Access (tape etc) device cd # CD -device pass # Passthrough device (direct SCSI access) +device pass # Passthrough device (direct ATA/SCSI access) # syscons is the default console driver, resembling an SCO console device sc Modified: head/sys/powerpc/conf/GENERIC64 ============================================================================== --- head/sys/powerpc/conf/GENERIC64 Sun Apr 24 01:11:28 2011 (r220981) +++ head/sys/powerpc/conf/GENERIC64 Sun Apr 24 08:58:58 2011 (r220982) @@ -86,12 +86,12 @@ device cpufreq device pci device agp -# ATA and ATAPI devices -device ata -device atadisk # ATA disk drives -device atapicd # ATAPI CDROM drives -#device atapifd # ATAPI floppy drives -#device atapist # ATAPI tape drives +# ATA controllers +device ahci # AHCI-compatible SATA controllers +device ata # Legacy ATA/SATA controllers +options ATA_CAM # Handle legacy controllers with CAM +device mvs # Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA +device siis # SiliconImage SiI3124/SiI3132/SiI3531 SATA # SCSI Controllers device ahc # AHA2940 and onboard AIC7xxx devices @@ -103,12 +103,12 @@ device ispfw # Firmware module for Qlo device mpt # LSI-Logic MPT-Fusion device sym # NCR/Symbios/LSI Logic 53C8XX/53C1010/53C1510D -# SCSI peripherals -device scbus # SCSI bus (required for SCSI) +# ATA/SCSI peripherals +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device sa # Sequential Access (tape etc) device cd # CD -device pass # Passthrough device (direct SCSI access) +device pass # Passthrough device (direct ATA/SCSI access) # syscons is the default console driver, resembling an SCO console device sc Modified: head/sys/powerpc/conf/MPC85XX ============================================================================== --- head/sys/powerpc/conf/MPC85XX Sun Apr 24 01:11:28 2011 (r220981) +++ head/sys/powerpc/conf/MPC85XX Sun Apr 24 08:58:58 2011 (r220982) @@ -56,7 +56,7 @@ options WITNESS options WITNESS_SKIPSPIN device ata -device atadisk +options ATA_CAM device bpf device cfi device crypto @@ -72,6 +72,7 @@ device iicbus device loop device md device miibus +device pass device pci device pty device quicc Modified: head/sys/sparc64/conf/GENERIC ============================================================================== --- head/sys/sparc64/conf/GENERIC Sun Apr 24 01:11:28 2011 (r220981) +++ head/sys/sparc64/conf/GENERIC Sun Apr 24 08:58:58 2011 (r220982) @@ -88,15 +88,12 @@ device fhc # Floppy drives #device fdc -# ATA and ATAPI devices -device ata -device atadisk # ATA disk drives -device atapicd # ATAPI CDROM drives -#device atapifd # ATAPI floppy drives -#device atapist # ATAPI tape drives -# Do NOT enable ATA_STATIC_ID -- cmd646 controller will be !ata2!, -# and you will not mount an ATA /. -#options ATA_STATIC_ID # Static device numbering +# ATA controllers +device ahci # AHCI-compatible SATA controllers +device ata # Legacy ATA/SATA controllers +options ATA_CAM # Handle legacy controllers with CAM +device mvs # Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA +device siis # SiliconImage SiI3124/SiI3132/SiI3531 SATA # SCSI Controllers device ahc # AHA2940 and onboard AIC7xxx devices @@ -109,13 +106,13 @@ device mpt # LSI-Logic MPT-Fusion device sym # NCR/Symbios/LSI Logic 53C8XX/53C1010/53C1510D device esp # NCR53c9x (FEPS/FAS366) -# SCSI peripherals -device scbus # SCSI bus (required for SCSI) +# ATA/SCSI peripherals +device scbus # SCSI bus (required for ATA/SCSI) device ch # SCSI media changers device da # Direct Access (disks) device sa # Sequential Access (tape etc) device cd # CD -device pass # Passthrough device (direct SCSI access) +device pass # Passthrough device (direct ATA/SCSI access) device ses # SCSI Environmental Services (and SAF-TE) # RAID controllers Modified: head/sys/sun4v/conf/GENERIC ============================================================================== --- head/sys/sun4v/conf/GENERIC Sun Apr 24 01:11:28 2011 (r220981) +++ head/sys/sun4v/conf/GENERIC Sun Apr 24 08:58:58 2011 (r220982) @@ -95,13 +95,7 @@ device pci # ATA and ATAPI devices device ata -#device atadisk # ATA disk drives -device atapicd # ATAPI CDROM drives -#device atapifd # ATAPI floppy drives -#device atapist # ATAPI tape drives -# Do NOT enable ATA_STATIC_ID -- cmd646 controller will be !ata2!, -# and you will not mount an ATA /. -#options ATA_STATIC_ID # Static device numbering +options ATA_CAM # SCSI Controllers #device ahc # AHA2940 and onboard AIC7xxx devices From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 09:06:14 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95A05106567C; Sun, 24 Apr 2011 09:06:14 +0000 (UTC) (envelope-from bruce@cran.org.uk) Received: from muon.cran.org.uk (muon.cran.org.uk [IPv6:2a01:348:0:15:5d59:5c40:0:1]) by mx1.freebsd.org (Postfix) with ESMTP id 22DB68FC1B; Sun, 24 Apr 2011 09:06:14 +0000 (UTC) Received: from muon.cran.org.uk (localhost [127.0.0.1]) by muon.cran.org.uk (Postfix) with ESMTP id E3332E6262; Sun, 24 Apr 2011 10:06:12 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=cran.org.uk; h=date:from :to:cc:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=mail; bh=HEdaPNrKO3JY FIZA5f9azzjzHvU=; b=HxOYkdSRS3jK3LtY/hgH4K8t+ttiMr6y+Ye2fgOl0xcP YK160jRJs2n0DggQcUSNwwiHIpcIzQWTSKRXpJh4D/hn9skgh1+6D3otdDJn7IDm zjUOQrjzeNtQ0G53nOjTgVAdRawNJBG/sI7HOaxO9PJeMvvIsK+VapIq8J0lklE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=cran.org.uk; h=date:from:to :cc:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; q=dns; s=mail; b=n6c9Rz D4GjGpWkFrdfOehv1ZCNR3OxScgGGCr63gDSIbL1U5FLH+58a0mWSDOWHq2zhFLO Hdv8V0r8hYVL+pBIjVLPvhtEJtHnyrMLeMdvM7eExoj5+RUVuT26qZwokwIbwWjM Wy+r7waBufw2R8FovvqSbZWcGMe7XsmeQLiZk= Received: from unknown (188-222-18-231.zone13.bethere.co.uk [188.222.18.231]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by muon.cran.org.uk (Postfix) with ESMTPSA id 947E5E6261; Sun, 24 Apr 2011 10:06:12 +0100 (BST) Date: Sun, 24 Apr 2011 10:06:11 +0100 From: Bruce Cran To: Alexander Motin Message-ID: <20110424100611.000020eb@unknown> In-Reply-To: <201104240858.p3O8wwqT024628@svn.freebsd.org> References: <201104240858.p3O8wwqT024628@svn.freebsd.org> X-Mailer: Claws Mail 3.7.8cvs47 (GTK+ 2.16.6; i586-pc-mingw32msvc) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2011 09:06:14 -0000 On Sun, 24 Apr 2011 08:58:58 +0000 (UTC) Alexander Motin wrote: > If you are using ATA > device names in /etc/fstab or other places, make sure to update them > respectively (adX -> adaY, acdX -> cdY, afdX -> daY, astX -> saY, > where 'Y's are the sequential numbers for each type in order of > detection, unless configured otherwise with tunables, see cam(4)). People might expect that if ata(4) numbering starts with ad4, ada4 would be created. However on my machines I've seen ad4 get mapped to ada0. -- Bruce Cran From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 09:15:56 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 821081065677; Sun, 24 Apr 2011 09:15:56 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id A2F8D8FC13; Sun, 24 Apr 2011 09:15:55 +0000 (UTC) Received: by bwz12 with SMTP id 12so1747149bwz.13 for ; Sun, 24 Apr 2011 02:15:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=XyUvRotJCTOEDIy+Yddq4NIyFiWrwhbjJ/vD4TZ1uB0=; b=MfnNv5perj0IFGsOoCWn3YBLBZjYnl3oKeg/UTKZ9GOhyTrZlR8W6Dd+kSNIUs5IAA CjAzUhwkHw/fNv2ZwBxe5ef5RfIbjGstORmBeBKGSpuZzlhvfUDSK+TTha2+3h5IsFLB Rd+sGb5o+atUScSgNFwC9Qjzs/vHhXHf2Q67s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=TAZb/T905Wo+7zSz9OPvIyp7HxUXbN+TuaTQtQVvz5b745bYKNK5eyg/UgIaDTrgkr MJTxbqhBPy76s2gyNfd04KZvDDUo/Ag/dH30HEcrabl9seKY/5Nvrwwd+Ftd4v5qbPm7 iCo8/bYUKfCUZnobecTeR8YT+o/DNTixrp8sE= Received: by 10.205.33.194 with SMTP id sp2mr2548370bkb.27.1303636554535; Sun, 24 Apr 2011 02:15:54 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id c11sm2646677bkc.2.2011.04.24.02.15.52 (version=SSLv3 cipher=OTHER); Sun, 24 Apr 2011 02:15:53 -0700 (PDT) Sender: Alexander Motin Message-ID: <4DB3EA47.5070304@FreeBSD.org> Date: Sun, 24 Apr 2011 12:15:51 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.15) Gecko/20110310 Thunderbird/3.1.9 MIME-Version: 1.0 To: Bruce Cran References: <201104240858.p3O8wwqT024628@svn.freebsd.org> <20110424100611.000020eb@unknown> In-Reply-To: <20110424100611.000020eb@unknown> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2011 09:15:56 -0000 On 24.04.2011 12:06, Bruce Cran wrote: > On Sun, 24 Apr 2011 08:58:58 +0000 (UTC) > Alexander Motin wrote: > >> If you are using ATA >> device names in /etc/fstab or other places, make sure to update them >> respectively (adX -> adaY, acdX -> cdY, afdX -> daY, astX -> saY, >> where 'Y's are the sequential numbers for each type in order of >> detection, unless configured otherwise with tunables, see cam(4)). > > People might expect that if ata(4) numbering starts with ad4, ada4 > would be created. However on my machines I've seen ad4 get mapped to > ada0. Yes. With sequential I mean from 0 and up. :) What's about 4, I believe not so many people still remember what does it mean, and probably none for whom that reason is important now. :) -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 09:23:08 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1FC8106566B; Sun, 24 Apr 2011 09:23:08 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A0BBA8FC12; Sun, 24 Apr 2011 09:23:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3O9N8RM025388; Sun, 24 Apr 2011 09:23:08 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3O9N8QG025386; Sun, 24 Apr 2011 09:23:08 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201104240923.p3O9N8QG025386@svn.freebsd.org> From: Alexander Motin Date: Sun, 24 Apr 2011 09:23:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220983 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2011 09:23:08 -0000 Author: mav Date: Sun Apr 24 09:23:08 2011 New Revision: 220983 URL: http://svn.freebsd.org/changeset/base/220983 Log: Explicitly note that device numbers are starting from zero. Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Sun Apr 24 08:58:58 2011 (r220982) +++ head/UPDATING Sun Apr 24 09:23:08 2011 (r220983) @@ -28,8 +28,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. removed and replaced by respective CAM drivers. If you are using ATA device names in /etc/fstab or other places, make sure to update them respectively (adX -> adaY, acdX -> cdY, afdX -> daY, astX -> saY, - where 'Y's are the sequential numbers for each type in order of - detection, unless configured otherwise with tunables, see cam(4)). + where 'Y's are the sequential numbers starting from zero for each type + in order of detection, unless configured otherwise with tunables, + see cam(4)). ataraid(4) functionality is now supported by the RAID GEOM class. To use it you can load geom_raid kernel module and use graid(8) tool From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 09:42:41 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76685106566B; Sun, 24 Apr 2011 09:42:41 +0000 (UTC) (envelope-from bruce@cran.org.uk) Received: from muon.cran.org.uk (muon.cran.org.uk [IPv6:2a01:348:0:15:5d59:5c40:0:1]) by mx1.freebsd.org (Postfix) with ESMTP id 2B6C08FC18; Sun, 24 Apr 2011 09:42:41 +0000 (UTC) Received: from muon.cran.org.uk (localhost [127.0.0.1]) by muon.cran.org.uk (Postfix) with ESMTP id 6032BE6262; Sun, 24 Apr 2011 10:42:40 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=cran.org.uk; h=date:from :to:cc:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=mail; bh=+aTU7CuFjooM 07NW0oVMyNWyozs=; b=ajp5s8QmXgAaV6p7EBkJPFYGuEqvudlIZ6yOw5koYEmF ySDW13fgVjf02M/qZ6zYi3Za6RnyCQ+m7PBQLKB95NyW4SdbFE7fZ3/mYlHbH1C5 0/Jo60PxhhyJOQVKu8UScl6dQaTLxScyPuimnHJB9d5e41zcdbO647kMiYOOni0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=cran.org.uk; h=date:from:to :cc:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; q=dns; s=mail; b=QgmudG 2g0rHlZ/aVo9gcIMbsOEpzz1gba4TRCs7JNRv827yAURYYGxHMMGA+E/Z89ytOS+ WX/0h/sJMt1JU1CyatBEZb5pjnC+FeFJ64ljiWuD1zbsZrSkOka76ThNCwHOQWxd N6/Bpey9AOCNue2nszD+UNxrB4H33pESCvfac= Received: from unknown (188-222-18-231.zone13.bethere.co.uk [188.222.18.231]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by muon.cran.org.uk (Postfix) with ESMTPSA id 133C0E61B6; Sun, 24 Apr 2011 10:42:40 +0100 (BST) Date: Sun, 24 Apr 2011 10:42:39 +0100 From: Bruce Cran To: Alexander Motin Message-ID: <20110424104239.000002ad@unknown> In-Reply-To: <4DB3EA47.5070304@FreeBSD.org> References: <201104240858.p3O8wwqT024628@svn.freebsd.org> <20110424100611.000020eb@unknown> <4DB3EA47.5070304@FreeBSD.org> X-Mailer: Claws Mail 3.7.8cvs47 (GTK+ 2.16.6; i586-pc-mingw32msvc) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2011 09:42:41 -0000 On Sun, 24 Apr 2011 12:15:51 +0300 Alexander Motin wrote: > On 24.04.2011 12:06, Bruce Cran wrote: > > People might expect that if ata(4) numbering starts with ad4, ada4 > > would be created. However on my machines I've seen ad4 get mapped to > > ada0. > > Yes. With sequential I mean from 0 and up. :) Sorry I didn't read it properly and sent my reply before I noticed you said adX -> adaY, not adX -> adaX. -- Bruce Cran From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 09:57:36 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 1EA41106568A; Sun, 24 Apr 2011 09:57:36 +0000 (UTC) Date: Sun, 24 Apr 2011 09:57:36 +0000 From: Alexander Best To: Alexander Motin Message-ID: <20110424095736.GA92492@freebsd.org> References: <201104240923.p3O9N8QG025386@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201104240923.p3O9N8QG025386@svn.freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r220983 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2011 09:57:36 -0000 On Sun Apr 24 11, Alexander Motin wrote: > Author: mav > Date: Sun Apr 24 09:23:08 2011 > New Revision: 220983 > URL: http://svn.freebsd.org/changeset/base/220983 > > Log: > Explicitly note that device numbers are starting from zero. > > Modified: > head/UPDATING > > Modified: head/UPDATING > ============================================================================== > --- head/UPDATING Sun Apr 24 08:58:58 2011 (r220982) > +++ head/UPDATING Sun Apr 24 09:23:08 2011 (r220983) > @@ -28,8 +28,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. > removed and replaced by respective CAM drivers. If you are using > ATA device names in /etc/fstab or other places, make sure to update > them respectively (adX -> adaY, acdX -> cdY, afdX -> daY, astX -> saY, > - where 'Y's are the sequential numbers for each type in order of > - detection, unless configured otherwise with tunables, see cam(4)). > + where 'Y's are the sequential numbers starting from zero for each type > + in order of detection, unless configured otherwise with tunables, > + see cam(4)). maybe an extra sentence mentioning the fact that {geom,ufs}-labels and ufsids are preferred over device nodes nowadays would be a good idea? cheers. alex > > ataraid(4) functionality is now supported by the RAID GEOM class. > To use it you can load geom_raid kernel module and use graid(8) tool -- a13x From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 10:08:00 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2749B106566C; Sun, 24 Apr 2011 10:08:00 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 941AA8FC12; Sun, 24 Apr 2011 10:07:58 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p3OA7tLo011164 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 24 Apr 2011 13:07:55 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id p3OA7sY6019098; Sun, 24 Apr 2011 13:07:54 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id p3OA7shq019097; Sun, 24 Apr 2011 13:07:54 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 24 Apr 2011 13:07:54 +0300 From: Kostik Belousov To: Alexander Motin Message-ID: <20110424100754.GD48734@deviant.kiev.zoral.com.ua> References: <201104240858.p3O8wwqT024628@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="L4gFVV/CladpyON8" Content-Disposition: inline In-Reply-To: <201104240858.p3O8wwqT024628@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2011 10:08:00 -0000 --L4gFVV/CladpyON8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Apr 24, 2011 at 08:58:58AM +0000, Alexander Motin wrote: > Author: mav > Date: Sun Apr 24 08:58:58 2011 > New Revision: 220982 > URL: http://svn.freebsd.org/changeset/base/220982 >=20 > Log: > Switch the GENERIC kernels for all architectures to the new CAM-based A= TA > stack. It means that all legacy ATA drivers are disabled and replaced by > respective CAM drivers. If you are using ATA device names in /etc/fstab= or > other places, make sure to update them respectively (adX -> adaY, > acdX -> cdY, afdX -> daY, astX -> saY, where 'Y's are the sequential > numbers for each type in order of detection, unless configured otherwise > with tunables, see cam(4)). > =20 > ataraid(4) functionality is now supported by the RAID GEOM class. > To use it you can load geom_raid kernel module and use graid(8) tool > for management. Instead of /dev/arX device names, use /dev/raid/rX. How many raid implementations, in particular, stripe and mirror ? Is gstripe/gmirror merged, or planned to be merged with geom_raid ? Does it make sense to merge if not yet ? --L4gFVV/CladpyON8 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk2z9noACgkQC3+MBN1Mb4iW0wCg05hzfgYDUKwSOTKy1InovQDS tBAAnjE4y9zUQWM1biDkscDP11BDGiLo =TuWC -----END PGP SIGNATURE----- --L4gFVV/CladpyON8-- From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 10:13:22 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5AB0D106564A; Sun, 24 Apr 2011 10:13:22 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 7C6E38FC08; Sun, 24 Apr 2011 10:13:20 +0000 (UTC) Received: by bwz12 with SMTP id 12so1767171bwz.13 for ; Sun, 24 Apr 2011 03:13:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=TBPXIpY7vRzd+WZqjOiSQwcw9/ORWc3mf3KKOpbAy0c=; b=UkaG15UJLoLYNCFAQ2rwgOOY9fliFOL0qaguFe+Hz3CkIqSVzXo4mRDYbrO5cGrWFo TRBDMtGzrirR8dcqTd/IxR6DWzgsGgyY+eNBZZTqMrBuEoBOlWtM09lRI3lkzfol6/Cw C/nwL9X+8W6jxpXdrKI/v8oR0C9nnuiHWtmZ8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=bNfZUCzL+CGBza1X9j4DJzK3Duo7bqBpT3znSFkbkk/KjazlEYatVL5txaUXWbweIQ 9/oVbCjtxPikkdjhJrt+zIHnSOfDLe3imz8ElrQWK4il30jDXw46sAyuu/XU+cQkpV+D 7RsXaKw+0qT8z2k0evFzSz4OowpW2PR/WA/Ew= Received: by 10.204.19.20 with SMTP id y20mr2396058bka.170.1303639999706; Sun, 24 Apr 2011 03:13:19 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id u15sm64546bkf.4.2011.04.24.03.13.18 (version=SSLv3 cipher=OTHER); Sun, 24 Apr 2011 03:13:18 -0700 (PDT) Sender: Alexander Motin Message-ID: <4DB3F7BC.8090106@FreeBSD.org> Date: Sun, 24 Apr 2011 13:13:16 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.15) Gecko/20110310 Thunderbird/3.1.9 MIME-Version: 1.0 To: Kostik Belousov References: <201104240858.p3O8wwqT024628@svn.freebsd.org> <20110424100754.GD48734@deviant.kiev.zoral.com.ua> In-Reply-To: <20110424100754.GD48734@deviant.kiev.zoral.com.ua> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2011 10:13:22 -0000 On 24.04.2011 13:07, Kostik Belousov wrote: > On Sun, Apr 24, 2011 at 08:58:58AM +0000, Alexander Motin wrote: >> Author: mav >> Date: Sun Apr 24 08:58:58 2011 >> New Revision: 220982 >> URL: http://svn.freebsd.org/changeset/base/220982 >> >> Log: >> Switch the GENERIC kernels for all architectures to the new CAM-based ATA >> stack. It means that all legacy ATA drivers are disabled and replaced by >> respective CAM drivers. If you are using ATA device names in /etc/fstab or >> other places, make sure to update them respectively (adX -> adaY, >> acdX -> cdY, afdX -> daY, astX -> saY, where 'Y's are the sequential >> numbers for each type in order of detection, unless configured otherwise >> with tunables, see cam(4)). >> >> ataraid(4) functionality is now supported by the RAID GEOM class. >> To use it you can load geom_raid kernel module and use graid(8) tool >> for management. Instead of /dev/arX device names, use /dev/raid/rX. > > How many raid implementations, in particular, stripe and mirror ? Same as before: one out, another in. > Is gstripe/gmirror merged, or planned to be merged with geom_raid ? > Does it make sense to merge if not yet ? It is definitely possible, but it is not done yet to not put all eggs in one basket. -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 10:20:40 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B6641065672; Sun, 24 Apr 2011 10:20:40 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id EC16C8FC08; Sun, 24 Apr 2011 10:20:39 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 00B2725D386D; Sun, 24 Apr 2011 10:20:38 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 33F12159D9FE; Sun, 24 Apr 2011 10:20:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id Fo438KGhXj-I; Sun, 24 Apr 2011 10:20:37 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id CB01B159D9F0; Sun, 24 Apr 2011 10:20:36 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <201104240858.p3O8wwqT024628@svn.freebsd.org> Date: Sun, 24 Apr 2011 10:20:35 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <77FE817D-D548-4B79-A64B-C890D94323B9@FreeBSD.org> References: <201104240858.p3O8wwqT024628@svn.freebsd.org> To: Alexander Motin X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2011 10:20:40 -0000 On Apr 24, 2011, at 8:58 AM, Alexander Motin wrote: > Author: mav > Date: Sun Apr 24 08:58:58 2011 > New Revision: 220982 > URL: http://svn.freebsd.org/changeset/base/220982 >=20 > Log: > Switch the GENERIC kernels for all architectures to the new CAM-based = ATA > stack. It means that all legacy ATA drivers are disabled and replaced = by > respective CAM drivers. If you are using ATA device names in = /etc/fstab or > other places, make sure to update them respectively (adX -> adaY, > acdX -> cdY, afdX -> daY, astX -> saY, where 'Y's are the sequential > numbers for each type in order of detection, unless configured = otherwise > with tunables, see cam(4)). Are you going to address that on updating magic will make it work within = the next 2-4 weeks? If you will not then thanks for screwing 50% of our users and please = back this out again. > ataraid(4) functionality is now supported by the RAID GEOM class. > To use it you can load geom_raid kernel module and use graid(8) tool > for management. Instead of /dev/arX device names, use /dev/raid/rX. >=20 > Modified: > head/UPDATING > head/sys/amd64/conf/GENERIC > head/sys/arm/conf/AVILA > head/sys/arm/conf/CAMBRIA > head/sys/arm/conf/CRB > head/sys/arm/conf/DB-78XXX > head/sys/arm/conf/DB-88F5XXX > head/sys/arm/conf/DB-88F6XXX > head/sys/arm/conf/EP80219 > head/sys/arm/conf/IQ31244 > head/sys/arm/conf/TS7800 > head/sys/conf/NOTES > head/sys/i386/conf/GENERIC > head/sys/i386/conf/XBOX > head/sys/ia64/conf/GENERIC > head/sys/mips/conf/MALTA > head/sys/mips/conf/MALTA64 > head/sys/mips/conf/OCTEON1 > head/sys/mips/conf/std.SWARM > head/sys/mips/malta/std.malta > head/sys/pc98/conf/GENERIC > head/sys/powerpc/conf/GENERIC > head/sys/powerpc/conf/GENERIC64 > head/sys/powerpc/conf/MPC85XX > head/sys/sparc64/conf/GENERIC > head/sys/sun4v/conf/GENERIC --=20 Bjoern A. Zeeb You have to have visions! Stop bit received. Insert coin for new address family. From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 10:41:13 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F060106564A; Sun, 24 Apr 2011 10:41:13 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7E66D8FC0C; Sun, 24 Apr 2011 10:41:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3OAfDHM027700; Sun, 24 Apr 2011 10:41:13 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3OAfDsN027698; Sun, 24 Apr 2011 10:41:13 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201104241041.p3OAfDsN027698@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Sun, 24 Apr 2011 10:41:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220984 - head/sys/geom/eli X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2011 10:41:13 -0000 Author: pjd Date: Sun Apr 24 10:41:13 2011 New Revision: 220984 URL: http://svn.freebsd.org/changeset/base/220984 Log: One key is expected from providers smaller than or equal to (2^20)*sectorsize bytes. Remove bogus assertion and while here remove another too obvious assertion. Reported by: Fabian Keil MFC after: 2 weeks Modified: head/sys/geom/eli/g_eli_key_cache.c Modified: head/sys/geom/eli/g_eli_key_cache.c ============================================================================== --- head/sys/geom/eli/g_eli_key_cache.c Sun Apr 24 09:23:08 2011 (r220983) +++ head/sys/geom/eli/g_eli_key_cache.c Sun Apr 24 10:41:13 2011 (r220984) @@ -263,12 +263,6 @@ g_eli_key_hold(struct g_eli_softc *sc, o if ((sc->sc_flags & G_ELI_FLAG_SINGLE_KEY) != 0) return (sc->sc_ekey); - KASSERT(sc->sc_ekeys_total > 1, ("%s: sc_ekeys_total=%ju", __func__, - (uintmax_t)sc->sc_ekeys_total)); - KASSERT((sc->sc_flags & G_ELI_FLAG_SINGLE_KEY) == 0, - ("%s: SINGLE_KEY flag set, but sc_ekeys_total=%ju", __func__, - (uintmax_t)sc->sc_ekeys_total)); - /* We switch key every 2^G_ELI_KEY_SHIFT blocks. */ keyno = (offset >> G_ELI_KEY_SHIFT) / blocksize; From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 10:44:16 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F328E1065674; Sun, 24 Apr 2011 10:44:15 +0000 (UTC) (envelope-from mack@macktronics.com) Received: from coco.macktronics.com (coco.macktronics.com [209.181.253.65]) by mx1.freebsd.org (Postfix) with ESMTP id CC7778FC13; Sun, 24 Apr 2011 10:44:15 +0000 (UTC) Received: from coco.macktronics.com (coco.macktronics.com [209.181.253.65]) by coco.macktronics.com (Postfix) with ESMTP id B536D4AC40; Sun, 24 Apr 2011 05:25:00 -0500 (CDT) Date: Sun, 24 Apr 2011 05:25:00 -0500 (CDT) From: Dan Mack To: Alexander Best In-Reply-To: <20110424095736.GA92492@freebsd.org> Message-ID: <20110424051747.S1757@coco.macktronics.com> References: <201104240923.p3O9N8QG025386@svn.freebsd.org> <20110424095736.GA92492@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, Alexander Motin , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r220983 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2011 10:44:16 -0000 On Sun, 24 Apr 2011, Alexander Best wrote: > On Sun Apr 24 11, Alexander Motin wrote: >> Author: mav >> Date: Sun Apr 24 09:23:08 2011 >> New Revision: 220983 >> URL: http://svn.freebsd.org/changeset/base/220983 >> >> Log: >> Explicitly note that device numbers are starting from zero. >> >> Modified: >> head/UPDATING >> >> Modified: head/UPDATING >> ============================================================================== >> --- head/UPDATING Sun Apr 24 08:58:58 2011 (r220982) >> +++ head/UPDATING Sun Apr 24 09:23:08 2011 (r220983) >> @@ -28,8 +28,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. >> removed and replaced by respective CAM drivers. If you are using >> ATA device names in /etc/fstab or other places, make sure to update >> them respectively (adX -> adaY, acdX -> cdY, afdX -> daY, astX -> saY, >> - where 'Y's are the sequential numbers for each type in order of >> - detection, unless configured otherwise with tunables, see cam(4)). >> + where 'Y's are the sequential numbers starting from zero for each type >> + in order of detection, unless configured otherwise with tunables, >> + see cam(4)). > > maybe an extra sentence mentioning the fact that {geom,ufs}-labels and ufsids > are preferred over device nodes nowadays would be a good idea? > > cheers. > alex For those of us using a ZFS root pool built out of /dev/gpt/ devices, will these automagically pick up the new names? Dan From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 10:47:57 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 381BB106566B; Sun, 24 Apr 2011 10:47:57 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1D2698FC13; Sun, 24 Apr 2011 10:47:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3OAlvVc027928; Sun, 24 Apr 2011 10:47:57 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3OAluuU027924; Sun, 24 Apr 2011 10:47:56 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201104241047.p3OAluuU027924@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 24 Apr 2011 10:47:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220985 - in head/sys/ufs: ffs ufs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2011 10:47:57 -0000 Author: kib Date: Sun Apr 24 10:47:56 2011 New Revision: 220985 URL: http://svn.freebsd.org/changeset/base/220985 Log: VFS sometimes is unable to inactivate a vnode when vnode use count goes to zero. E.g., the vnode might be only shared-locked at the time of vput() call. Such vnodes are kept in the hash, so they can be found later. If ffs_valloc() allocated an inode that has its vnode cached in hash, and still owing the inactivation, then vget() call from ffs_valloc() clears VI_OWEINACT, and then the vnode is reused for the newly allocated inode. The problem is, the vnode is not reclaimed before it is put to the new use. ffs_valloc() recycles vnode vm object, but this is not enough. In particular, at least v_vflag should be cleared, and several bits of UFS state need to be removed. It is very inconvenient to call vgone() at this point. Instead, move some parts of ufs_reclaim() into helper function ufs_prepare_reclaim(), and call the helper from VOP_RECLAIM and ffs_valloc(). Reviewed by: mckusick Tested by: pho MFC after: 3 weeks Modified: head/sys/ufs/ffs/ffs_alloc.c head/sys/ufs/ufs/ufs_extern.h head/sys/ufs/ufs/ufs_inode.c Modified: head/sys/ufs/ffs/ffs_alloc.c ============================================================================== --- head/sys/ufs/ffs/ffs_alloc.c Sun Apr 24 10:41:13 2011 (r220984) +++ head/sys/ufs/ffs/ffs_alloc.c Sun Apr 24 10:47:56 2011 (r220985) @@ -1012,8 +1012,9 @@ dup_alloc: ip->i_din2->di_birthtime = ts.tv_sec; ip->i_din2->di_birthnsec = ts.tv_nsec; } + ufs_prepare_reclaim(*vpp); ip->i_flag = 0; - vnode_destroy_vobject(*vpp); + (*vpp)->v_vflag = 0; (*vpp)->v_type = VNON; if (fs->fs_magic == FS_UFS2_MAGIC) (*vpp)->v_op = &ffs_vnodeops2; Modified: head/sys/ufs/ufs/ufs_extern.h ============================================================================== --- head/sys/ufs/ufs/ufs_extern.h Sun Apr 24 10:41:13 2011 (r220984) +++ head/sys/ufs/ufs/ufs_extern.h Sun Apr 24 10:47:56 2011 (r220985) @@ -76,6 +76,7 @@ int ufs_inactive(struct vop_inactive_ar int ufs_init(struct vfsconf *); void ufs_itimes(struct vnode *vp); int ufs_lookup(struct vop_cachedlookup_args *); +void ufs_prepare_reclaim(struct vnode *vp); int ufs_readdir(struct vop_readdir_args *); int ufs_reclaim(struct vop_reclaim_args *); void ffs_snapgone(struct inode *); Modified: head/sys/ufs/ufs/ufs_inode.c ============================================================================== --- head/sys/ufs/ufs/ufs_inode.c Sun Apr 24 10:41:13 2011 (r220984) +++ head/sys/ufs/ufs/ufs_inode.c Sun Apr 24 10:47:56 2011 (r220985) @@ -172,6 +172,31 @@ out: return (error); } +void +ufs_prepare_reclaim(struct vnode *vp) +{ + struct inode *ip; +#ifdef QUOTA + int i; +#endif + + ip = VTOI(vp); + + vnode_destroy_vobject(vp); +#ifdef QUOTA + for (i = 0; i < MAXQUOTAS; i++) { + if (ip->i_dquot[i] != NODQUOT) { + dqrele(vp, ip->i_dquot[i]); + ip->i_dquot[i] = NODQUOT; + } + } +#endif +#ifdef UFS_DIRHASH + if (ip->i_dirhash != NULL) + ufsdirhash_free(ip); +#endif +} + /* * Reclaim an inode so that it can be used for other purposes. */ @@ -185,14 +210,9 @@ ufs_reclaim(ap) struct vnode *vp = ap->a_vp; struct inode *ip = VTOI(vp); struct ufsmount *ump = ip->i_ump; -#ifdef QUOTA - int i; -#endif - /* - * Destroy the vm object and flush associated pages. - */ - vnode_destroy_vobject(vp); + ufs_prepare_reclaim(vp); + if (ip->i_flag & IN_LAZYMOD) ip->i_flag |= IN_MODIFIED; UFS_UPDATE(vp, 0); @@ -200,21 +220,7 @@ ufs_reclaim(ap) * Remove the inode from its hash chain. */ vfs_hash_remove(vp); - /* - * Purge old data structures associated with the inode. - */ -#ifdef QUOTA - for (i = 0; i < MAXQUOTAS; i++) { - if (ip->i_dquot[i] != NODQUOT) { - dqrele(vp, ip->i_dquot[i]); - ip->i_dquot[i] = NODQUOT; - } - } -#endif -#ifdef UFS_DIRHASH - if (ip->i_dirhash != NULL) - ufsdirhash_free(ip); -#endif + /* * Lock the clearing of v_data so ffs_lock() can inspect it * prior to obtaining the lock. From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 10:48:20 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E340A106564A; Sun, 24 Apr 2011 10:48:20 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id BC2808FC08; Sun, 24 Apr 2011 10:48:20 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 5E02846B49; Sun, 24 Apr 2011 06:48:20 -0400 (EDT) Date: Sun, 24 Apr 2011 11:48:20 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Alexander Motin In-Reply-To: <201104240858.p3O8wwqT024628@svn.freebsd.org> Message-ID: References: <201104240858.p3O8wwqT024628@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2011 10:48:21 -0000 On Sun, 24 Apr 2011, Alexander Motin wrote: > Author: mav > Date: Sun Apr 24 08:58:58 2011 > New Revision: 220982 > URL: http://svn.freebsd.org/changeset/base/220982 > > Log: > Switch the GENERIC kernels for all architectures to the new CAM-based ATA > stack. It means that all legacy ATA drivers are disabled and replaced by > respective CAM drivers. If you are using ATA device names in /etc/fstab or > other places, make sure to update them respectively (adX -> adaY, > acdX -> cdY, afdX -> daY, astX -> saY, where 'Y's are the sequential > numbers for each type in order of detection, unless configured otherwise > with tunables, see cam(4)). > > ataraid(4) functionality is now supported by the RAID GEOM class. > To use it you can load geom_raid kernel module and use graid(8) tool > for management. Instead of /dev/arX device names, use /dev/raid/rX. I'm very pleased to see a continued movement towards the new ATA code; it offers clear benefits to all of our users, and is definitely something we want done for 9.0. Could you say more about the migration strategy for users? I recall that when you proposed throwing this switch, several strategies were discussed (likely in combination to handle both the immediate upgrade stumble issue and a longer-term migration): (1) Teach new ata parts to replicate the old naming convention in 99.9% of cases. Or some suppport module that creates the required symlinks if loaded (and we load it by default in 9.0, phasing it out later with appropriate boot-time warnings for 6-12 months). Obviously, this would be best-effort, but if it takes us from a 40% upgrade failure to a 1% upgrade failure, that's a big deal. (2) Over time, provide a migration to fstab naming storage targets by volume ID / name / serial number, rather than by hardware path. A good long-term strategy but one that requires changes to the installer, upgrade path, etc. (3) Teach freebsd-update/installer/etc to recognise *before* a new kernel is installed whether the current configuration will require hand-holding. (4) Thinking pretty hard about the roll-back path to avoid stumbles when there's a problem following a kernel update. In the past, linking kernel feature updates to /etc or userspace updates has caused significant issues for our users, who reasonably expect to follow our normal "install the kernel, reboot, let it sit for a week" path. What is your plan for implementing some combination of these (or did I miss the commits that brought them in already)? In the past, we've seen upgrade path problems dislodge users, and since then, we've grown an increased assumption of ease-of-upgrade that can be managed automatically by tools like freebsd-update. Breaking the automated upgrade (and roll-back) path would be extremely problematic. Robert From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 10:49:19 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49BBC1065672; Sun, 24 Apr 2011 10:49:19 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 24D158FC18; Sun, 24 Apr 2011 10:49:19 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id D321C46B49; Sun, 24 Apr 2011 06:49:18 -0400 (EDT) Date: Sun, 24 Apr 2011 11:49:18 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Alexander Best In-Reply-To: <20110424095736.GA92492@freebsd.org> Message-ID: References: <201104240923.p3O9N8QG025386@svn.freebsd.org> <20110424095736.GA92492@freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, Alexander Motin , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r220983 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2011 10:49:19 -0000 On Sun, 24 Apr 2011, Alexander Best wrote: >> ============================================================================== >> --- head/UPDATING Sun Apr 24 08:58:58 2011 (r220982) >> +++ head/UPDATING Sun Apr 24 09:23:08 2011 (r220983) >> @@ -28,8 +28,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. >> removed and replaced by respective CAM drivers. If you are using >> ATA device names in /etc/fstab or other places, make sure to update >> them respectively (adX -> adaY, acdX -> cdY, afdX -> daY, astX -> saY, >> - where 'Y's are the sequential numbers for each type in order of >> - detection, unless configured otherwise with tunables, see cam(4)). >> + where 'Y's are the sequential numbers starting from zero for each type >> + in order of detection, unless configured otherwise with tunables, >> + see cam(4)). > > maybe an extra sentence mentioning the fact that {geom,ufs}-labels and > ufsids are preferred over device nodes nowadays would be a good idea? If this is true, that's what our installer needs to do. Does our installer do that? (In general, a reasonable definition of "preferred" is "what the installer does" -- if that's not the case, it's a serious bug.) Robert From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 10:50:04 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 153A4106564A; Sun, 24 Apr 2011 10:50:04 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 36B458FC0A; Sun, 24 Apr 2011 10:50:02 +0000 (UTC) Received: by bwz12 with SMTP id 12so1779174bwz.13 for ; Sun, 24 Apr 2011 03:50:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=kIQl2FQwuKxoG0KIY7KMN6soYOpkBBr5HYPPUHaCZTI=; b=TiJ6K3Y6nElS8aAJRMfKJOr81kQNZuHxJ1pGL+yfe3zgW8Fbq5KeekrVEBtBd139+g rPOH7VYzb02xHUvvDjwZ3CK325iu+OpqfH+J+W92MPFO/c7EkNHC7YXtKKWn6HCffVtJ TFfIr0gbUT7/AQOx7PoupTqDDSrCIddaWFmLU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=YNKaKv4K8DGyOX5dM3nxQZx9Txgqsoj9j/pWRz8Ggns9E95yzidoCUePtoMbvISUc7 Dl03A3QeTOHdKht+R3pwJB8QVBC35VwtBrDBsfIDKIkVJ30sKWSMbSsBEZJDz9g5HZr2 HsfTV2xhw5aEozIEXsuFmkxNSixQSDBHTq+2I= Received: by 10.204.20.79 with SMTP id e15mr2507420bkb.147.1303642153130; Sun, 24 Apr 2011 03:49:13 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id y22sm2676567bku.20.2011.04.24.03.49.11 (version=SSLv3 cipher=OTHER); Sun, 24 Apr 2011 03:49:12 -0700 (PDT) Sender: Alexander Motin Message-ID: <4DB40026.5030405@FreeBSD.org> Date: Sun, 24 Apr 2011 13:49:10 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.15) Gecko/20110310 Thunderbird/3.1.9 MIME-Version: 1.0 To: "Bjoern A. Zeeb" References: <201104240858.p3O8wwqT024628@svn.freebsd.org> <77FE817D-D548-4B79-A64B-C890D94323B9@FreeBSD.org> In-Reply-To: <77FE817D-D548-4B79-A64B-C890D94323B9@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2011 10:50:04 -0000 On 24.04.2011 13:20, Bjoern A. Zeeb wrote: > On Apr 24, 2011, at 8:58 AM, Alexander Motin wrote: >> Author: mav >> Date: Sun Apr 24 08:58:58 2011 >> New Revision: 220982 >> URL: http://svn.freebsd.org/changeset/base/220982 >> >> Log: >> Switch the GENERIC kernels for all architectures to the new CAM-based ATA >> stack. It means that all legacy ATA drivers are disabled and replaced by >> respective CAM drivers. If you are using ATA device names in /etc/fstab or >> other places, make sure to update them respectively (adX -> adaY, >> acdX -> cdY, afdX -> daY, astX -> saY, where 'Y's are the sequential >> numbers for each type in order of detection, unless configured otherwise >> with tunables, see cam(4)). > > > Are you going to address that on updating magic will make it work within the next 2-4 weeks? s/ad[0-9]+/ada0/ should fit 90%. A bit more sophisticated script should fit most. In what place should I put that magic? > If you will not then thanks for screwing 50% of our users and please back this out again. Reverting is not an option. _Constructive_ propositions are welcome. -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 11:00:40 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A596106564A; Sun, 24 Apr 2011 11:00:40 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 501488FC0C; Sun, 24 Apr 2011 11:00:40 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 04BAF46B49; Sun, 24 Apr 2011 07:00:40 -0400 (EDT) Date: Sun, 24 Apr 2011 12:00:39 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Alexander Motin In-Reply-To: <4DB40026.5030405@FreeBSD.org> Message-ID: References: <201104240858.p3O8wwqT024628@svn.freebsd.org> <77FE817D-D548-4B79-A64B-C890D94323B9@FreeBSD.org> <4DB40026.5030405@FreeBSD.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, "Bjoern A. Zeeb" , src-committers@freebsd.org Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2011 11:00:40 -0000 On Sun, 24 Apr 2011, Alexander Motin wrote: >> Are you going to address that on updating magic will make it work within >> the next 2-4 weeks? > > s/ad[0-9]+/ada0/ should fit 90%. A bit more sophisticated script should fit > most. In what place should I put that magic? > >> If you will not then thanks for screwing 50% of our users and please back >> this out again. > > Reverting is not an option. _Constructive_ propositions are welcome. Hi Mav: It is the policy of this project that the release engineering team has final authority over what ships in a release. It is entirely within scope to revert this change for 9.0 if issues with the upgrade path are not addressed. My hope also that this path can be entirely avoided through a rapid addressing of upgrade path issues that have been known (and discussed on the mailing lists extensively) since you posted about the work on the public mailing lists. I agree with Bjoern that it is critical to address these issues in a timely manner -- our users depend on reliable and easy upgrades, and it seems (on face value) that significant work remains to be done to make that possible. Our release is increasingly close, and it's important we keep the tree as stable as possible so that merges of other straggling features can go uneventfully. Robert From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 11:01:42 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B73C106566B; Sun, 24 Apr 2011 11:01:42 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 88DC38FC0C; Sun, 24 Apr 2011 11:01:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3OB1gOx029251; Sun, 24 Apr 2011 11:01:42 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3OB1gbc029246; Sun, 24 Apr 2011 11:01:42 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201104241101.p3OB1gbc029246@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 24 Apr 2011 11:01:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220986 - stable/8/sys/ufs/ufs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2011 11:01:42 -0000 Author: kib Date: Sun Apr 24 11:01:42 2011 New Revision: 220986 URL: http://svn.freebsd.org/changeset/base/220986 Log: Merge the part of r207141 that fixes the locking for ufs_rename() (and r218838 followup). Adopt the SU calls to the stable/8 SU implementation, with the help from Kirk. PR: kern/156545 Reviewed by: mckusick Tested by: pho Modified: stable/8/sys/ufs/ufs/inode.h stable/8/sys/ufs/ufs/ufs_extern.h stable/8/sys/ufs/ufs/ufs_lookup.c stable/8/sys/ufs/ufs/ufs_vnops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/ufs/ufs/inode.h ============================================================================== --- stable/8/sys/ufs/ufs/inode.h Sun Apr 24 10:47:56 2011 (r220985) +++ stable/8/sys/ufs/ufs/inode.h Sun Apr 24 11:01:42 2011 (r220986) @@ -120,7 +120,7 @@ struct inode { #define IN_CHANGE 0x0002 /* Inode change time update request. */ #define IN_UPDATE 0x0004 /* Modification time update request. */ #define IN_MODIFIED 0x0008 /* Inode has been modified. */ -#define IN_RENAME 0x0010 /* Inode is being renamed. */ +#define IN_NEEDSYNC 0x0010 /* Inode requires fsync. */ #define IN_LAZYMOD 0x0040 /* Modified, but don't write yet. */ #define IN_SPACECOUNTED 0x0080 /* Blocks to be freed in free count. */ #define IN_LAZYACCESS 0x0100 /* Process IN_ACCESS after the Modified: stable/8/sys/ufs/ufs/ufs_extern.h ============================================================================== --- stable/8/sys/ufs/ufs/ufs_extern.h Sun Apr 24 10:47:56 2011 (r220985) +++ stable/8/sys/ufs/ufs/ufs_extern.h Sun Apr 24 11:01:42 2011 (r220986) @@ -57,7 +57,7 @@ int ufs_bmap(struct vop_bmap_args *); int ufs_bmaparray(struct vnode *, ufs2_daddr_t, ufs2_daddr_t *, struct buf *, int *, int *); int ufs_fhtovp(struct mount *, struct ufid *, struct vnode **); -int ufs_checkpath(ino_t, struct inode *, struct ucred *); +int ufs_checkpath(ino_t, ino_t, struct inode *, struct ucred *, ino_t *); void ufs_dirbad(struct inode *, doff_t, char *); int ufs_dirbadentry(struct vnode *, struct direct *, int); int ufs_dirempty(struct inode *, ino_t, struct ucred *); @@ -66,9 +66,11 @@ int ufs_extwrite(struct vop_write_args void ufs_makedirentry(struct inode *, struct componentname *, struct direct *); int ufs_direnter(struct vnode *, struct vnode *, struct direct *, - struct componentname *, struct buf *); + struct componentname *, struct buf *, int); int ufs_dirremove(struct vnode *, struct inode *, int, int); int ufs_dirrewrite(struct inode *, struct inode *, ino_t, int, int); +int ufs_lookup_ino(struct vnode *, struct vnode **, struct componentname *, + ino_t *); int ufs_getlbns(struct vnode *, ufs2_daddr_t, struct indir *, int *); int ufs_inactive(struct vop_inactive_args *); int ufs_init(struct vfsconf *); Modified: stable/8/sys/ufs/ufs/ufs_lookup.c ============================================================================== --- stable/8/sys/ufs/ufs/ufs_lookup.c Sun Apr 24 10:47:56 2011 (r220985) +++ stable/8/sys/ufs/ufs/ufs_lookup.c Sun Apr 24 11:01:42 2011 (r220986) @@ -76,9 +76,6 @@ SYSCTL_INT(_debug, OID_AUTO, dircheck, C /* true if old FS format...*/ #define OFSFMT(vp) ((vp)->v_mount->mnt_maxsymlinklen <= 0) -static int ufs_lookup_(struct vnode *, struct vnode **, struct componentname *, - ino_t *); - #ifdef QUOTA static int ufs_lookup_upgrade_lock(struct vnode *vp) @@ -214,11 +211,11 @@ ufs_lookup(ap) } */ *ap; { - return (ufs_lookup_(ap->a_dvp, ap->a_vpp, ap->a_cnp, NULL)); + return (ufs_lookup_ino(ap->a_dvp, ap->a_vpp, ap->a_cnp, NULL)); } -static int -ufs_lookup_(struct vnode *vdp, struct vnode **vpp, struct componentname *cnp, +int +ufs_lookup_ino(struct vnode *vdp, struct vnode **vpp, struct componentname *cnp, ino_t *dd_ino) { struct inode *dp; /* inode for directory being searched */ @@ -556,6 +553,8 @@ notfound: return (ENOENT); found: + if (dd_ino != NULL) + *dd_ino = ino; if (numdirpasses == 2) nchstats.ncs_pass2++; /* @@ -578,11 +577,6 @@ found: if ((flags & ISLASTCN) && nameiop == LOOKUP) dp->i_diroff = i_offset &~ (DIRBLKSIZ - 1); - if (dd_ino != NULL) { - *dd_ino = ino; - return (0); - } - /* * If deleting, and at end of pathname, return * parameters which can be used to remove file. @@ -590,17 +584,6 @@ found: if (nameiop == DELETE && (flags & ISLASTCN)) { if (flags & LOCKPARENT) ASSERT_VOP_ELOCKED(vdp, __FUNCTION__); - if ((error = VFS_VGET(vdp->v_mount, ino, - LK_EXCLUSIVE, &tdp)) != 0) - return (error); - - error = ufs_delete_denied(vdp, tdp, cred, cnp->cn_thread); - if (error) { - vput(tdp); - return (error); - } - - /* * Return pointer to current entry in dp->i_offset, * and distance past previous entry (if there @@ -617,6 +600,16 @@ found: dp->i_count = 0; else dp->i_count = dp->i_offset - prevoff; + if (dd_ino != NULL) + return (0); + if ((error = VFS_VGET(vdp->v_mount, ino, + LK_EXCLUSIVE, &tdp)) != 0) + return (error); + error = ufs_delete_denied(vdp, tdp, cred, cnp->cn_thread); + if (error) { + vput(tdp); + return (error); + } if (dp->i_number == ino) { VREF(vdp); *vpp = vdp; @@ -648,6 +641,8 @@ found: dp->i_offset = i_offset; if (dp->i_number == ino) return (EISDIR); + if (dd_ino != NULL) + return (0); if ((error = VFS_VGET(vdp->v_mount, ino, LK_EXCLUSIVE, &tdp)) != 0) return (error); @@ -682,6 +677,8 @@ found: cnp->cn_flags |= SAVENAME; return (0); } + if (dd_ino != NULL) + return (0); /* * Step through the translation in the name. We do not `vput' the @@ -713,7 +710,7 @@ found: * to the inode we looked up before vdp lock was * dropped. */ - error = ufs_lookup_(pdp, NULL, cnp, &ino1); + error = ufs_lookup_ino(pdp, NULL, cnp, &ino1); if (error) { vput(tdp); return (error); @@ -865,12 +862,13 @@ ufs_makedirentry(ip, cnp, newdirp) * soft dependency code). */ int -ufs_direnter(dvp, tvp, dirp, cnp, newdirbp) +ufs_direnter(dvp, tvp, dirp, cnp, newdirbp, isrename) struct vnode *dvp; struct vnode *tvp; struct direct *dirp; struct componentname *cnp; struct buf *newdirbp; + int isrename; { struct ucred *cr; struct thread *td; @@ -943,22 +941,30 @@ ufs_direnter(dvp, tvp, dirp, cnp, newdir blkoff += DIRBLKSIZ; } if (softdep_setup_directory_add(bp, dp, dp->i_offset, - dirp->d_ino, newdirbp, 1) == 0) { - bdwrite(bp); + dirp->d_ino, newdirbp, 1)) + dp->i_flag |= IN_NEEDSYNC; +#ifdef JOURNALED_SOFTUPDATES + if (newdirbp) + bdwrite(newdirbp); +#endif + bdwrite(bp); + if ((dp->i_flag & IN_NEEDSYNC) == 0) return (UFS_UPDATE(dvp, 0)); - } - /* We have just allocated a directory block in an - * indirect block. Rather than tracking when it gets - * claimed by the inode, we simply do a VOP_FSYNC - * now to ensure that it is there (in case the user - * does a future fsync). Note that we have to unlock - * the inode for the entry that we just entered, as - * the VOP_FSYNC may need to lock other inodes which - * can lead to deadlock if we also hold a lock on - * the newly entered node. + /* + * We have just allocated a directory block in an + * indirect block. We must prevent holes in the + * directory created if directory entries are + * written out of order. To accomplish this we + * fsync when we extend a directory into indirects. + * During rename it's not safe to drop the tvp lock + * so sync must be delayed until it is. + * + * This synchronous step could be removed if fsck and + * the kernel were taught to fill in sparse + * directories rather than panic. */ - if ((error = bwrite(bp))) - return (error); + if (isrename) + return (0); if (tvp != NULL) VOP_UNLOCK(tvp, 0); error = VOP_FSYNC(dvp, MNT_WAIT, td); @@ -1099,6 +1105,10 @@ ufs_direnter(dvp, tvp, dirp, cnp, newdir (void) softdep_setup_directory_add(bp, dp, dp->i_offset + (caddr_t)ep - dirbuf, dirp->d_ino, newdirbp, 0); +#ifdef JOURNALED_SOFTUPDATES + if (newdirbp != NULL) + bdwrite(newdirbp); +#endif bdwrite(bp); } else { if (DOINGASYNC(dvp)) { @@ -1116,7 +1126,8 @@ ufs_direnter(dvp, tvp, dirp, cnp, newdir * lock other inodes which can lead to deadlock if we also hold a * lock on the newly entered node. */ - if (error == 0 && dp->i_endoff && dp->i_endoff < dp->i_size) { + if (isrename == 0 && error == 0 && + dp->i_endoff && dp->i_endoff < dp->i_size) { if (tvp != NULL) VOP_UNLOCK(tvp, 0); #ifdef UFS_DIRHASH @@ -1386,25 +1397,25 @@ ufs_dir_dd_ino(struct vnode *vp, struct /* * Check if source directory is in the path of the target directory. - * Target is supplied locked, source is unlocked. - * The target is always vput before returning. */ int -ufs_checkpath(ino_t source_ino, struct inode *target, struct ucred *cred) +ufs_checkpath(ino_t source_ino, ino_t parent_ino, struct inode *target, struct ucred *cred, ino_t *wait_ino) { - struct vnode *vp, *vp1; + struct mount *mp; + struct vnode *tvp, *vp, *vp1; int error; ino_t dd_ino; - vp = ITOV(target); - if (target->i_number == source_ino) { - error = EEXIST; - goto out; - } - error = 0; + vp = tvp = ITOV(target); + mp = vp->v_mount; + *wait_ino = 0; + if (target->i_number == source_ino) + return (EEXIST); + if (target->i_number == parent_ino) + return (0); if (target->i_number == ROOTINO) - goto out; - + return (0); + error = 0; for (;;) { error = ufs_dir_dd_ino(vp, cred, &dd_ino); if (error != 0) @@ -1415,9 +1426,13 @@ ufs_checkpath(ino_t source_ino, struct i } if (dd_ino == ROOTINO) break; - error = vn_vget_ino(vp, dd_ino, LK_EXCLUSIVE, &vp1); - if (error != 0) + if (dd_ino == parent_ino) + break; + error = VFS_VGET(mp, dd_ino, LK_SHARED | LK_NOWAIT, &vp1); + if (error != 0) { + *wait_ino = dd_ino; break; + } /* Recheck that ".." still points to vp1 after relock of vp */ error = ufs_dir_dd_ino(vp, cred, &dd_ino); if (error != 0) { @@ -1429,14 +1444,14 @@ ufs_checkpath(ino_t source_ino, struct i vput(vp1); continue; } - vput(vp); + if (vp != tvp) + vput(vp); vp = vp1; } -out: if (error == ENOTDIR) - printf("checkpath: .. not a directory\n"); - if (vp != NULL) + panic("checkpath: .. not a directory\n"); + if (vp != tvp) vput(vp); return (error); } Modified: stable/8/sys/ufs/ufs/ufs_vnops.c ============================================================================== --- stable/8/sys/ufs/ufs/ufs_vnops.c Sun Apr 24 10:47:56 2011 (r220985) +++ stable/8/sys/ufs/ufs/ufs_vnops.c Sun Apr 24 11:01:42 2011 (r220986) @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -114,6 +115,8 @@ static vop_close_t ufsfifo_close; static vop_kqfilter_t ufsfifo_kqfilter; static vop_pathconf_t ufsfifo_pathconf; +SYSCTL_NODE(_vfs, OID_AUTO, ufs, CTLFLAG_RD, 0, "UFS filesystem"); + /* * A virgin directory (no blushing please). */ @@ -992,7 +995,7 @@ ufs_link(ap) error = UFS_UPDATE(vp, !(DOINGSOFTDEP(vp) | DOINGASYNC(vp))); if (!error) { ufs_makedirentry(ip, cnp, &newdir); - error = ufs_direnter(tdvp, vp, &newdir, cnp, NULL); + error = ufs_direnter(tdvp, vp, &newdir, cnp, NULL, 0); } if (error) { @@ -1043,7 +1046,7 @@ ufs_whiteout(ap) newdir.d_namlen = cnp->cn_namelen; bcopy(cnp->cn_nameptr, newdir.d_name, (unsigned)cnp->cn_namelen + 1); newdir.d_type = DT_WHT; - error = ufs_direnter(dvp, NULL, &newdir, cnp, NULL); + error = ufs_direnter(dvp, NULL, &newdir, cnp, NULL, 0); break; case DELETE: @@ -1062,6 +1065,11 @@ ufs_whiteout(ap) return (error); } +static volatile int rename_restarts; +SYSCTL_INT(_vfs_ufs, OID_AUTO, rename_restarts, CTLFLAG_RD, + __DEVOLATILE(int *, &rename_restarts), 0, + "Times rename had to restart due to lock contention"); + /* * Rename system call. * rename("foo", "bar"); @@ -1101,111 +1109,185 @@ ufs_rename(ap) struct vnode *tdvp = ap->a_tdvp; struct vnode *fvp = ap->a_fvp; struct vnode *fdvp = ap->a_fdvp; + struct vnode *nvp; struct componentname *tcnp = ap->a_tcnp; struct componentname *fcnp = ap->a_fcnp; struct thread *td = fcnp->cn_thread; - struct inode *ip, *xp, *dp; + struct inode *fip, *tip, *tdp, *fdp; struct direct newdir; - int doingdirectory = 0, oldparent = 0, newparent = 0; + off_t endoff; + int doingdirectory, newparent; int error = 0, ioflag; - ino_t fvp_ino; + struct mount *mp; + ino_t ino; #ifdef INVARIANTS if ((tcnp->cn_flags & HASBUF) == 0 || (fcnp->cn_flags & HASBUF) == 0) panic("ufs_rename: no name"); #endif + endoff = 0; + mp = tdvp->v_mount; + VOP_UNLOCK(tdvp, 0); + if (tvp && tvp != tdvp) + VOP_UNLOCK(tvp, 0); /* * Check for cross-device rename. */ if ((fvp->v_mount != tdvp->v_mount) || (tvp && (fvp->v_mount != tvp->v_mount))) { error = EXDEV; -abortit: - if (tdvp == tvp) - vrele(tdvp); - else - vput(tdvp); - if (tvp) - vput(tvp); - vrele(fdvp); + mp = NULL; + goto releout; + } + error = vfs_busy(mp, 0); + if (error) { + mp = NULL; + goto releout; + } +relock: + /* + * We need to acquire 2 to 4 locks depending on whether tvp is NULL + * and fdvp and tdvp are the same directory. Subsequently we need + * to double-check all paths and in the directory rename case we + * need to verify that we are not creating a directory loop. To + * handle this we acquire all but fdvp using non-blocking + * acquisitions. If we fail to acquire any lock in the path we will + * drop all held locks, acquire the new lock in a blocking fashion, + * and then release it and restart the rename. This acquire/release + * step ensures that we do not spin on a lock waiting for release. + */ + error = vn_lock(fdvp, LK_EXCLUSIVE); + if (error) + goto releout; + if (vn_lock(tdvp, LK_EXCLUSIVE | LK_NOWAIT) != 0) { + VOP_UNLOCK(fdvp, 0); + error = vn_lock(tdvp, LK_EXCLUSIVE); + if (error) + goto releout; + VOP_UNLOCK(tdvp, 0); + atomic_add_int(&rename_restarts, 1); + goto relock; + } + /* + * Re-resolve fvp to be certain it still exists and fetch the + * correct vnode. + */ + error = ufs_lookup_ino(fdvp, NULL, fcnp, &ino); + if (error) { + VOP_UNLOCK(fdvp, 0); + VOP_UNLOCK(tdvp, 0); + goto releout; + } + error = VFS_VGET(mp, ino, LK_EXCLUSIVE | LK_NOWAIT, &nvp); + if (error) { + VOP_UNLOCK(fdvp, 0); + VOP_UNLOCK(tdvp, 0); + if (error != EBUSY) + goto releout; + error = VFS_VGET(mp, ino, LK_EXCLUSIVE, &nvp); + if (error != 0) + goto releout; + VOP_UNLOCK(nvp, 0); vrele(fvp); - return (error); + fvp = nvp; + atomic_add_int(&rename_restarts, 1); + goto relock; + } + vrele(fvp); + fvp = nvp; + /* + * Re-resolve tvp and acquire the vnode lock if present. + */ + error = ufs_lookup_ino(tdvp, NULL, tcnp, &ino); + if (error != 0 && error != EJUSTRETURN) { + VOP_UNLOCK(fdvp, 0); + VOP_UNLOCK(tdvp, 0); + VOP_UNLOCK(fvp, 0); + goto releout; } - + /* + * If tvp disappeared we just carry on. + */ + if (error == EJUSTRETURN && tvp != NULL) { + vrele(tvp); + tvp = NULL; + } + /* + * Get the tvp ino if the lookup succeeded. We may have to restart + * if the non-blocking acquire fails. + */ + if (error == 0) { + nvp = NULL; + error = VFS_VGET(mp, ino, LK_EXCLUSIVE | LK_NOWAIT, &nvp); + if (tvp) + vrele(tvp); + tvp = nvp; + if (error) { + VOP_UNLOCK(fdvp, 0); + VOP_UNLOCK(tdvp, 0); + VOP_UNLOCK(fvp, 0); + if (error != EBUSY) + goto releout; + error = VFS_VGET(mp, ino, LK_EXCLUSIVE, &nvp); + if (error != 0) + goto releout; + VOP_UNLOCK(nvp, 0); + atomic_add_int(&rename_restarts, 1); + goto relock; + } + } + fdp = VTOI(fdvp); + fip = VTOI(fvp); + tdp = VTOI(tdvp); + tip = NULL; + if (tvp) + tip = VTOI(tvp); if (tvp && ((VTOI(tvp)->i_flags & (NOUNLINK | IMMUTABLE | APPEND)) || (VTOI(tdvp)->i_flags & APPEND))) { error = EPERM; - goto abortit; + goto unlockout; } - /* * Renaming a file to itself has no effect. The upper layers should - * not call us in that case. Temporarily just warn if they do. + * not call us in that case. However, things could change after + * we drop the locks above. */ if (fvp == tvp) { - printf("ufs_rename: fvp == tvp (can't happen)\n"); error = 0; - goto abortit; + goto unlockout; } - - if ((error = vn_lock(fvp, LK_EXCLUSIVE)) != 0) - goto abortit; - dp = VTOI(fdvp); - ip = VTOI(fvp); - if (ip->i_nlink >= LINK_MAX) { - VOP_UNLOCK(fvp, 0); + doingdirectory = 0; + newparent = 0; + ino = fip->i_number; + if (fip->i_nlink >= LINK_MAX) { error = EMLINK; - goto abortit; + goto unlockout; } - if ((ip->i_flags & (NOUNLINK | IMMUTABLE | APPEND)) - || (dp->i_flags & APPEND)) { - VOP_UNLOCK(fvp, 0); + if ((fip->i_flags & (NOUNLINK | IMMUTABLE | APPEND)) + || (fdp->i_flags & APPEND)) { error = EPERM; - goto abortit; + goto unlockout; } - if ((ip->i_mode & IFMT) == IFDIR) { + if ((fip->i_mode & IFMT) == IFDIR) { /* * Avoid ".", "..", and aliases of "." for obvious reasons. */ if ((fcnp->cn_namelen == 1 && fcnp->cn_nameptr[0] == '.') || - dp == ip || (fcnp->cn_flags | tcnp->cn_flags) & ISDOTDOT || - (ip->i_flag & IN_RENAME)) { - VOP_UNLOCK(fvp, 0); + fdp == fip || + (fcnp->cn_flags | tcnp->cn_flags) & ISDOTDOT) { error = EINVAL; - goto abortit; + goto unlockout; } - ip->i_flag |= IN_RENAME; - oldparent = dp->i_number; + if (fdp->i_number != tdp->i_number) + newparent = tdp->i_number; doingdirectory = 1; } - vrele(fdvp); - - /* - * When the target exists, both the directory - * and target vnodes are returned locked. - */ - dp = VTOI(tdvp); - xp = NULL; - if (tvp) - xp = VTOI(tvp); - - /* - * 1) Bump link count while we're moving stuff - * around. If we crash somewhere before - * completing our work, the link count - * may be wrong, but correctable. - */ - ip->i_effnlink++; - ip->i_nlink++; - DIP_SET(ip, i_nlink, ip->i_nlink); - ip->i_flag |= IN_CHANGE; - if (DOINGSOFTDEP(fvp)) - softdep_change_linkcnt(ip); - if ((error = UFS_UPDATE(fvp, !(DOINGSOFTDEP(fvp) | - DOINGASYNC(fvp)))) != 0) { - VOP_UNLOCK(fvp, 0); - goto bad; + if ((fvp->v_type == VDIR && fvp->v_mountedhere != NULL) || + (tvp != NULL && tvp->v_type == VDIR && + tvp->v_mountedhere != NULL)) { + error = EXDEV; + goto unlockout; } /* @@ -1214,35 +1296,55 @@ abortit: * directory hierarchy above the target, as this would * orphan everything below the source directory. Also * the user must have write permission in the source so - * as to be able to change "..". We must repeat the call - * to namei, as the parent directory is unlocked by the - * call to checkpath(). - */ - error = VOP_ACCESS(fvp, VWRITE, tcnp->cn_cred, tcnp->cn_thread); - fvp_ino = ip->i_number; - VOP_UNLOCK(fvp, 0); - if (oldparent != dp->i_number) - newparent = dp->i_number; + * as to be able to change "..". + */ if (doingdirectory && newparent) { - if (error) /* write access check above */ - goto bad; - if (xp != NULL) - vput(tvp); - error = ufs_checkpath(fvp_ino, dp, tcnp->cn_cred); + error = VOP_ACCESS(fvp, VWRITE, tcnp->cn_cred, tcnp->cn_thread); if (error) - goto out; + goto unlockout; + error = ufs_checkpath(ino, fdp->i_number, tdp, tcnp->cn_cred, + &ino); + /* + * We encountered a lock that we have to wait for. Unlock + * everything else and VGET before restarting. + */ + if (ino) { + VOP_UNLOCK(fdvp, 0); + VOP_UNLOCK(fvp, 0); + VOP_UNLOCK(tdvp, 0); + if (tvp) + VOP_UNLOCK(tvp, 0); + error = VFS_VGET(mp, ino, LK_SHARED, &nvp); + if (error == 0) + vput(nvp); + atomic_add_int(&rename_restarts, 1); + goto relock; + } + if (error) + goto unlockout; if ((tcnp->cn_flags & SAVESTART) == 0) panic("ufs_rename: lost to startdir"); - VREF(tdvp); - error = relookup(tdvp, &tvp, tcnp); - if (error) - goto out; - vrele(tdvp); - dp = VTOI(tdvp); - xp = NULL; - if (tvp) - xp = VTOI(tvp); } + if (fip->i_effnlink == 0 || fdp->i_effnlink == 0 || + tdp->i_effnlink == 0) + panic("Bad effnlink fip %p, fdp %p, tdp %p", fip, fdp, tdp); + + /* + * 1) Bump link count while we're moving stuff + * around. If we crash somewhere before + * completing our work, the link count + * may be wrong, but correctable. + */ + fip->i_effnlink++; + fip->i_nlink++; + DIP_SET(fip, i_nlink, fip->i_nlink); + fip->i_flag |= IN_CHANGE; + if (DOINGSOFTDEP(fvp)) + softdep_change_linkcnt(fip); + error = UFS_UPDATE(fvp, !(DOINGSOFTDEP(fvp) | DOINGASYNC(fvp))); + if (error) + goto bad; + /* * 2) If target doesn't exist, link the target * to the source and unlink the source. @@ -1250,52 +1352,37 @@ abortit: * entry to reference the source inode and * expunge the original entry's existence. */ - if (xp == NULL) { - if (dp->i_dev != ip->i_dev) + if (tip == NULL) { + if (tdp->i_dev != fip->i_dev) panic("ufs_rename: EXDEV"); - /* - * Account for ".." in new directory. - * When source and destination have the same - * parent we don't fool with the link count. - */ if (doingdirectory && newparent) { - if ((nlink_t)dp->i_nlink >= LINK_MAX) { + /* + * Account for ".." in new directory. + * When source and destination have the same + * parent we don't adjust the link count. The + * actual link modification is completed when + * .. is rewritten below. + */ + if ((nlink_t)tdp->i_nlink >= LINK_MAX) { error = EMLINK; goto bad; } - dp->i_effnlink++; - dp->i_nlink++; - DIP_SET(dp, i_nlink, dp->i_nlink); - dp->i_flag |= IN_CHANGE; - if (DOINGSOFTDEP(tdvp)) - softdep_change_linkcnt(dp); - error = UFS_UPDATE(tdvp, !(DOINGSOFTDEP(tdvp) | - DOINGASYNC(tdvp))); - if (error) - goto bad; } - ufs_makedirentry(ip, tcnp, &newdir); - error = ufs_direnter(tdvp, NULL, &newdir, tcnp, NULL); - if (error) { - if (doingdirectory && newparent) { - dp->i_effnlink--; - dp->i_nlink--; - DIP_SET(dp, i_nlink, dp->i_nlink); - dp->i_flag |= IN_CHANGE; - if (DOINGSOFTDEP(tdvp)) - softdep_change_linkcnt(dp); - (void)UFS_UPDATE(tdvp, 1); - } + ufs_makedirentry(fip, tcnp, &newdir); + error = ufs_direnter(tdvp, NULL, &newdir, tcnp, NULL, 1); + if (error) goto bad; - } - vput(tdvp); + /* Setup tdvp for directory compaction if needed. */ + if (tdp->i_count && tdp->i_endoff && + tdp->i_endoff < tdp->i_size) + endoff = tdp->i_endoff; } else { - if (xp->i_dev != dp->i_dev || xp->i_dev != ip->i_dev) + if (tip->i_dev != tdp->i_dev || tip->i_dev != fip->i_dev) panic("ufs_rename: EXDEV"); /* * Short circuit rename(foo, foo). */ - if (xp->i_number == ip->i_number) + if (tip->i_number == fip->i_number) panic("ufs_rename: same file"); /* * If the parent directory is "sticky", then the caller @@ -1303,7 +1390,7 @@ abortit: * destination of the rename. This implements append-only * directories. */ - if ((dp->i_mode & S_ISTXT) && + if ((tdp->i_mode & S_ISTXT) && VOP_ACCESS(tdvp, VADMIN, tcnp->cn_cred, td) && VOP_ACCESS(tvp, VADMIN, tcnp->cn_cred, td)) { error = EPERM; @@ -1314,9 +1401,9 @@ abortit: * to it. Also, ensure source and target are compatible * (both directories, or both not directories). */ - if ((xp->i_mode&IFMT) == IFDIR) { - if ((xp->i_effnlink > 2) || - !ufs_dirempty(xp, dp->i_number, tcnp->cn_cred)) { + if ((tip->i_mode & IFMT) == IFDIR) { + if ((tip->i_effnlink > 2) || + !ufs_dirempty(tip, tdp->i_number, tcnp->cn_cred)) { error = ENOTEMPTY; goto bad; } @@ -1329,20 +1416,30 @@ abortit: error = EISDIR; goto bad; } - error = ufs_dirrewrite(dp, xp, ip->i_number, - IFTODT(ip->i_mode), - (doingdirectory && newparent) ? newparent : doingdirectory); - if (error) - goto bad; if (doingdirectory) { if (!newparent) { - dp->i_effnlink--; + tdp->i_effnlink--; if (DOINGSOFTDEP(tdvp)) - softdep_change_linkcnt(dp); + softdep_change_linkcnt(tdp); } - xp->i_effnlink--; + tip->i_effnlink--; if (DOINGSOFTDEP(tvp)) - softdep_change_linkcnt(xp); + softdep_change_linkcnt(tip); + } + error = ufs_dirrewrite(tdp, tip, fip->i_number, + IFTODT(fip->i_mode), + (doingdirectory && newparent) ? newparent : doingdirectory); + if (error) { + if (doingdirectory) { + if (!newparent) { + tdp->i_effnlink++; + if (DOINGSOFTDEP(tdvp)) + softdep_change_linkcnt(tdp); + } + tip->i_effnlink++; + if (DOINGSOFTDEP(tvp)) + softdep_change_linkcnt(tip); + } } if (doingdirectory && !DOINGSOFTDEP(tvp)) { /* @@ -1357,115 +1454,107 @@ abortit: * them now. */ if (!newparent) { - dp->i_nlink--; - DIP_SET(dp, i_nlink, dp->i_nlink); - dp->i_flag |= IN_CHANGE; + tdp->i_nlink--; + DIP_SET(tdp, i_nlink, tdp->i_nlink); + tdp->i_flag |= IN_CHANGE; } - xp->i_nlink--; - DIP_SET(xp, i_nlink, xp->i_nlink); - xp->i_flag |= IN_CHANGE; + tip->i_nlink--; + DIP_SET(tip, i_nlink, tip->i_nlink); + tip->i_flag |= IN_CHANGE; ioflag = IO_NORMAL; if (!DOINGASYNC(tvp)) ioflag |= IO_SYNC; + /* Don't go to bad here as the new link exists. */ if ((error = UFS_TRUNCATE(tvp, (off_t)0, ioflag, tcnp->cn_cred, tcnp->cn_thread)) != 0) - goto bad; + goto unlockout; } - vput(tdvp); - vput(tvp); - xp = NULL; } /* - * 3) Unlink the source. + * 3) Unlink the source. We have to resolve the path again to + * fixup the directory offset and count for ufs_dirremove. */ - fcnp->cn_flags &= ~MODMASK; - fcnp->cn_flags |= LOCKPARENT | LOCKLEAF; - if ((fcnp->cn_flags & SAVESTART) == 0) - panic("ufs_rename: lost from startdir"); - VREF(fdvp); - error = relookup(fdvp, &fvp, fcnp); - if (error == 0) - vrele(fdvp); - if (fvp != NULL) { - xp = VTOI(fvp); - dp = VTOI(fdvp); - } else { - /* - * From name has disappeared. IN_RENAME is not sufficient - * to protect against directory races due to timing windows, - * so we have to remove the panic. XXX the only real way - * to solve this issue is at a much higher level. By the - * time we hit ufs_rename() it's too late. - */ -#if 0 - if (doingdirectory) - panic("ufs_rename: lost dir entry"); -#endif - vrele(ap->a_fvp); - return (0); + if (fdvp == tdvp) { + error = ufs_lookup_ino(fdvp, NULL, fcnp, &ino); + if (error) + panic("ufs_rename: from entry went away!"); + if (ino != fip->i_number) + panic("ufs_rename: ino mismatch %d != %d\n", ino, + fip->i_number); } /* - * Ensure that the directory entry still exists and has not - * changed while the new name has been entered. If the source is - * a file then the entry may have been unlinked or renamed. In - * either case there is no further work to be done. If the source - * is a directory then it cannot have been rmdir'ed; the IN_RENAME - * flag ensures that it cannot be moved by another rename or removed - * by a rmdir. - */ - if (xp != ip) { - /* - * From name resolves to a different inode. IN_RENAME is - * not sufficient protection against timing window races - * so we can't panic here. XXX the only real way - * to solve this issue is at a much higher level. By the - * time we hit ufs_rename() it's too late. - */ -#if 0 - if (doingdirectory) - panic("ufs_rename: lost dir entry"); -#endif - } else { + * If the source is a directory with a + * new parent, the link count of the old + * parent directory must be decremented + * and ".." set to point to the new parent. + */ + if (doingdirectory && newparent) { /* - * If the source is a directory with a - * new parent, the link count of the old - * parent directory must be decremented - * and ".." set to point to the new parent. + * If tip exists we simply use its link, otherwise we must + * add a new one. */ - if (doingdirectory && newparent) { - xp->i_offset = mastertemplate.dot_reclen; - ufs_dirrewrite(xp, dp, newparent, DT_DIR, 0); - cache_purge(fdvp); - } - error = ufs_dirremove(fdvp, xp, fcnp->cn_flags, 0); - xp->i_flag &= ~IN_RENAME; - } - if (dp) - vput(fdvp); - if (xp) - vput(fvp); - vrele(ap->a_fvp); + if (tip == NULL) { + tdp->i_effnlink++; + tdp->i_nlink++; + DIP_SET(tdp, i_nlink, tdp->i_nlink); + tdp->i_flag |= IN_CHANGE; + if (DOINGSOFTDEP(tdvp)) + softdep_change_linkcnt(tdp); + error = UFS_UPDATE(tdvp, !(DOINGSOFTDEP(tdvp) | + DOINGASYNC(tdvp))); + /* Don't go to bad here as the new link exists. */ + if (error) + goto unlockout; + } + fip->i_offset = mastertemplate.dot_reclen; + ufs_dirrewrite(fip, fdp, newparent, DT_DIR, 0); + cache_purge(fdvp); + } + error = ufs_dirremove(fdvp, fip, fcnp->cn_flags, 0); + +unlockout: + vput(fdvp); + vput(fvp); + if (tvp) + vput(tvp); + /* + * If compaction or fsync was requested do it now that other locks + * are no longer needed. + */ + if (error == 0 && endoff != 0) { +#ifdef UFS_DIRHASH + if (tdp->i_dirhash != NULL) + ufsdirhash_dirtrunc(tdp, endoff); +#endif + UFS_TRUNCATE(tdvp, endoff, IO_NORMAL | IO_SYNC, tcnp->cn_cred, + td); + } + if (error == 0 && tdp->i_flag & IN_NEEDSYNC) + error = VOP_FSYNC(tdvp, MNT_WAIT, td); + vput(tdvp); + if (mp) + vfs_unbusy(mp); return (error); bad: - if (xp) - vput(ITOV(xp)); - vput(ITOV(dp)); -out: - if (doingdirectory) - ip->i_flag &= ~IN_RENAME; - if (vn_lock(fvp, LK_EXCLUSIVE) == 0) { - ip->i_effnlink--; - ip->i_nlink--; - DIP_SET(ip, i_nlink, ip->i_nlink); - ip->i_flag |= IN_CHANGE; - ip->i_flag &= ~IN_RENAME; - if (DOINGSOFTDEP(fvp)) - softdep_change_linkcnt(ip); - vput(fvp); - } else - vrele(fvp); + fip->i_effnlink--; + fip->i_nlink--; + DIP_SET(fip, i_nlink, fip->i_nlink); + fip->i_flag |= IN_CHANGE; + if (DOINGSOFTDEP(fvp)) + softdep_change_linkcnt(fip); + goto unlockout; + +releout: *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 11:10:54 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09A9F106566C; Sun, 24 Apr 2011 11:10:54 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id D49708FC0C; Sun, 24 Apr 2011 11:10:53 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 8F2D046B58; Sun, 24 Apr 2011 07:10:53 -0400 (EDT) Date: Sun, 24 Apr 2011 12:10:53 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Alexander Motin In-Reply-To: Message-ID: References: <201104240858.p3O8wwqT024628@svn.freebsd.org> <77FE817D-D548-4B79-A64B-C890D94323B9@FreeBSD.org> <4DB40026.5030405@FreeBSD.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, "Bjoern A. Zeeb" , src-committers@freebsd.org Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2011 11:10:54 -0000 On Sun, 24 Apr 2011, Robert Watson wrote: > I agree with Bjoern that it is critical to address these issues in a timely > manner -- our users depend on reliable and easy upgrades, and it seems (on > face value) that significant work remains to be done to make that possible. > Our release is increasingly close, and it's important we keep the tree as > stable as possible so that merges of other straggling features can go > uneventfully. Just to follow up on the point: it's very important that the new ATA driver see as much testing exposure as possible -- that's one reason why paying close attention to the upgrade path. If we knock users off 9-CURRENT due to upgrade problems, then we'll reduce testing for this feature just as much as any others. This is a good reason to resolve the problems as quickly as possible! Robert From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 11:49:19 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 137CD106568D; Sun, 24 Apr 2011 11:49:19 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 084D18FC1B; Sun, 24 Apr 2011 11:49:17 +0000 (UTC) Received: by bwz12 with SMTP id 12so1798187bwz.13 for ; Sun, 24 Apr 2011 04:49:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=CkDt7KHNLROE+C/0J70nL6Xhhn+hh6cYEgCZ+qPnKDk=; b=vJucIhyXn2pK+sHYS78lYLbKFYiC0SZBlOgyagSNJUBi3rIvQtByN4a3GQYxOmi9IS ffAQ/Ie8PDbFIndReq3smg5chrAAKSgOrveEalmbxw9KpdkgKK/Y1hTBE/ttuhJShP8B Vozss2tWm4ns13hnYS31Wy0RDj/3TXr97L834= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=U/Xu68zQNL8McL7AfY/5iL6wukUW+YWhV+YCKFrj5aSw8unM/h/C5hx0HDnnqJiqRO /ULvvO+CfCdhYI3mL+BEcUdMHoZO4WhnuLZpyYQD5V/jA6flFlHF8eascMbhCLgXZ8YK trwxwgsKr6taNgTB8aIhIvYqfoqTvCXTzaxPU= Received: by 10.204.7.156 with SMTP id d28mr2545076bkd.28.1303645756650; Sun, 24 Apr 2011 04:49:16 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id c11sm2705938bkc.2.2011.04.24.04.49.15 (version=SSLv3 cipher=OTHER); Sun, 24 Apr 2011 04:49:16 -0700 (PDT) Sender: Alexander Motin Message-ID: <4DB40E39.5090905@FreeBSD.org> Date: Sun, 24 Apr 2011 14:49:13 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.15) Gecko/20110310 Thunderbird/3.1.9 MIME-Version: 1.0 To: Robert Watson References: <201104240858.p3O8wwqT024628@svn.freebsd.org> <77FE817D-D548-4B79-A64B-C890D94323B9@FreeBSD.org> <4DB40026.5030405@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, "Bjoern A. Zeeb" , src-committers@freebsd.org Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2011 11:49:19 -0000 On 24.04.2011 14:00, Robert Watson wrote: > On Sun, 24 Apr 2011, Alexander Motin wrote: >>> Are you going to address that on updating magic will make it work >>> within the next 2-4 weeks? >> >> s/ad[0-9]+/ada0/ should fit 90%. A bit more sophisticated script >> should fit most. In what place should I put that magic? >> >>> If you will not then thanks for screwing 50% of our users and please >>> back this out again. >> >> Reverting is not an option. _Constructive_ propositions are welcome. > > It is the policy of this project that the release engineering team has > final authority over what ships in a release. It is entirely within > scope to revert this change for 9.0 if issues with the upgrade path are > not addressed. My hope also that this path can be entirely avoided > through a rapid addressing of upgrade path issues that have been known > (and discussed on the mailing lists extensively) since you posted about > the work on the public mailing lists. > > I agree with Bjoern that it is critical to address these issues in a > timely manner -- our users depend on reliable and easy upgrades, and it > seems (on face value) that significant work remains to be done to make > that possible. Our release is increasingly close, and it's important we > keep the tree as stable as possible so that merges of other straggling > features can go uneventfully. I am asking for excuse if my tone was overly strict. It was not my real intention to offend anybody. May be inside I am indeed overreacting a bit on proposition to revert with no alternative things that I have put my heart into, which are broadly accepted by users, which I announced on the list few days ago and got no objections. I am sorry for that. I do worry about possible complications during migration process. And obviously this is not an easy question, as soon as it wasn't solved during so much time. I will gladly accept any help or real ideas people can provide. I just don't like to feel it my own problem. I am not doing it for myself. It would be nice to see some friendly support instead. Thank you. -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 12:24:38 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A2EE106564A; Sun, 24 Apr 2011 12:24:38 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 83A398FC17; Sun, 24 Apr 2011 12:24:37 +0000 (UTC) Received: by bwz12 with SMTP id 12so1810146bwz.13 for ; Sun, 24 Apr 2011 05:24:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=4OH98pWCol5il34UKbSZGSIo6RdFNM1M2w0B410ljKQ=; b=W1nXl4i5F/MOqIZOs+qYSuNp4+EZgmunU9ZG7NX/wpLe7avsg05UcLioaevaBAAe43 FuXeCSz7ZapjYD03lnNjaL8YoQ/TEizE35nTtQxMlVe9Fn/pQLAUwJKLsJpZI34H257T YhDh+NWUuncxHwUwTJUzzwvuUjSi2bg2mqlss= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=iK9ZO6ZPFbApnY3Tk3g17I2EGgupKde6FhAMoL4z26GHhO8LegABC4jSE1SwHqS+OR aWdlcYLVDY9s/gQH5NDMPAo6qqXHk066/xqKtByEuMxjzEboOj4sE58T3yc0L+HmHLev 94NMRNrzdgyzJzKZu7I0C38PC8Q+eNt+0P24U= Received: by 10.204.3.146 with SMTP id 18mr2569856bkn.1.1303647875737; Sun, 24 Apr 2011 05:24:35 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id q24sm2713164bks.21.2011.04.24.05.24.34 (version=SSLv3 cipher=OTHER); Sun, 24 Apr 2011 05:24:35 -0700 (PDT) Sender: Alexander Motin Message-ID: <4DB41681.9020600@FreeBSD.org> Date: Sun, 24 Apr 2011 15:24:33 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.15) Gecko/20110310 Thunderbird/3.1.9 MIME-Version: 1.0 To: Dan Mack References: <201104240923.p3O9N8QG025386@svn.freebsd.org> <20110424095736.GA92492@freebsd.org> <20110424051747.S1757@coco.macktronics.com> In-Reply-To: <20110424051747.S1757@coco.macktronics.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Alexander Best , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r220983 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2011 12:24:38 -0000 On 24.04.2011 13:25, Dan Mack wrote: > On Sun, 24 Apr 2011, Alexander Best wrote: >> On Sun Apr 24 11, Alexander Motin wrote: >>> Author: mav >>> Date: Sun Apr 24 09:23:08 2011 >>> New Revision: 220983 >>> URL: http://svn.freebsd.org/changeset/base/220983 >>> >>> Log: >>> Explicitly note that device numbers are starting from zero. >>> >>> Modified: >>> head/UPDATING >>> >>> Modified: head/UPDATING >>> ============================================================================== >>> >>> --- head/UPDATING Sun Apr 24 08:58:58 2011 (r220982) >>> +++ head/UPDATING Sun Apr 24 09:23:08 2011 (r220983) >>> @@ -28,8 +28,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. >>> removed and replaced by respective CAM drivers. If you are using >>> ATA device names in /etc/fstab or other places, make sure to update >>> them respectively (adX -> adaY, acdX -> cdY, afdX -> daY, astX -> saY, >>> - where 'Y's are the sequential numbers for each type in order of >>> - detection, unless configured otherwise with tunables, see cam(4)). >>> + where 'Y's are the sequential numbers starting from zero for each type >>> + in order of detection, unless configured otherwise with tunables, >>> + see cam(4)). >> >> maybe an extra sentence mentioning the fact that {geom,ufs}-labels and >> ufsids >> are preferred over device nodes nowadays would be a good idea? > > For those of us using a ZFS root pool built out of /dev/gpt/ devices, > will these automagically pick up the new names? You should not notice transition. GPT labels should stay as they were. -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 13:18:24 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 66590106566B; Sun, 24 Apr 2011 13:18:24 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.garage.freebsd.pl (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id 0F4EB8FC14; Sun, 24 Apr 2011 13:18:23 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 76C2C45EA4; Sun, 24 Apr 2011 15:18:22 +0200 (CEST) Received: from localhost (mail.garage.freebsd.pl [10.0.4.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id AA70B45684; Sun, 24 Apr 2011 15:18:16 +0200 (CEST) Date: Sun, 24 Apr 2011 15:18:04 +0200 From: Pawel Jakub Dawidek To: Dan Mack Message-ID: <20110424131804.GB1872@garage.freebsd.pl> References: <201104240923.p3O9N8QG025386@svn.freebsd.org> <20110424095736.GA92492@freebsd.org> <20110424051747.S1757@coco.macktronics.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="m51xatjYGsM+13rf" Content-Disposition: inline In-Reply-To: <20110424051747.S1757@coco.macktronics.com> X-OS: FreeBSD 9.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-5.9 required=4.5 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 Cc: svn-src-head@freebsd.org, Alexander Best , Alexander Motin , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r220983 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2011 13:18:24 -0000 --m51xatjYGsM+13rf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Apr 24, 2011 at 05:25:00AM -0500, Dan Mack wrote: > For those of us using a ZFS root pool built out of /dev/gpt/ > devices, will these automagically pick up the new names? Even if you use adX devices in your ZFS pool and they will suddenly change to adaY, ZFS should detect this properly and no manual intervention should be needed. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com --m51xatjYGsM+13rf Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk20IwsACgkQForvXbEpPzQIdACfVFAswjkt/b2G3VVWiWO4n0+1 zR4AmQGp8ZFAu+3hU/SGLjUMJ5KVWZdM =6Fcd -----END PGP SIGNATURE----- --m51xatjYGsM+13rf-- From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 13:22:15 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D4CA106564A; Sun, 24 Apr 2011 13:22:15 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3DB038FC0C; Sun, 24 Apr 2011 13:22:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3ODMFbN033360; Sun, 24 Apr 2011 13:22:15 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3ODMFMa033358; Sun, 24 Apr 2011 13:22:15 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201104241322.p3ODMFMa033358@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 24 Apr 2011 13:22:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220987 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2011 13:22:15 -0000 Author: kib Date: Sun Apr 24 13:22:14 2011 New Revision: 220987 URL: http://svn.freebsd.org/changeset/base/220987 Log: Fix typo. MFC after: 3 days Modified: head/sys/sys/systm.h Modified: head/sys/sys/systm.h ============================================================================== --- head/sys/sys/systm.h Sun Apr 24 11:01:42 2011 (r220986) +++ head/sys/sys/systm.h Sun Apr 24 13:22:14 2011 (r220987) @@ -149,7 +149,7 @@ int nullop(void); int eopnotsupp(void); int ureadc(int, struct uio *); void hashdestroy(void *, struct malloc_type *, u_long); -void *hashinit(int count, struct malloc_type *type, u_long *hashmark); +void *hashinit(int count, struct malloc_type *type, u_long *hashmask); void *hashinit_flags(int count, struct malloc_type *type, u_long *hashmask, int flags); #define HASH_NOWAIT 0x00000001 From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 14:14:07 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 72F21106566C; Sun, 24 Apr 2011 14:14:07 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from mail.icecube.wisc.edu (trout.icecube.wisc.edu [128.104.255.119]) by mx1.freebsd.org (Postfix) with ESMTP id 172A58FC08; Sun, 24 Apr 2011 14:14:06 +0000 (UTC) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.icecube.wisc.edu (Postfix) with ESMTP id 329B75811B; Sun, 24 Apr 2011 09:14:06 -0500 (CDT) X-Virus-Scanned: amavisd-new at icecube.wisc.edu Received: from mail.icecube.wisc.edu ([127.0.0.1]) by localhost (trout.icecube.wisc.edu [127.0.0.1]) (amavisd-new, port 10030) with ESMTP id kReVdMAqmRLn; Sun, 24 Apr 2011 09:14:06 -0500 (CDT) Received: from wanderer.tachypleus.net (unknown [76.210.65.155]) by mail.icecube.wisc.edu (Postfix) with ESMTP id 4C21D5811A; Sun, 24 Apr 2011 09:14:05 -0500 (CDT) Message-ID: <4DB4302B.5050501@freebsd.org> Date: Sun, 24 Apr 2011 09:14:03 -0500 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.15) Gecko/20110317 Thunderbird/3.1.9 MIME-Version: 1.0 To: Robert Watson References: <201104240923.p3O9N8QG025386@svn.freebsd.org> <20110424095736.GA92492@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Alexander Best , Alexander Motin , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r220983 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2011 14:14:07 -0000 On 04/24/11 05:49, Robert Watson wrote: > > On Sun, 24 Apr 2011, Alexander Best wrote: > >>> ============================================================================== >>> >>> --- head/UPDATING Sun Apr 24 08:58:58 2011 (r220982) >>> +++ head/UPDATING Sun Apr 24 09:23:08 2011 (r220983) >>> @@ -28,8 +28,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. >>> removed and replaced by respective CAM drivers. If you are using >>> ATA device names in /etc/fstab or other places, make sure to update >>> them respectively (adX -> adaY, acdX -> cdY, afdX -> daY, astX -> saY, >>> - where 'Y's are the sequential numbers for each type in order of >>> - detection, unless configured otherwise with tunables, see cam(4)). >>> + where 'Y's are the sequential numbers starting from zero for each type >>> + in order of detection, unless configured otherwise with tunables, >>> + see cam(4)). >> >> maybe an extra sentence mentioning the fact that {geom,ufs}-labels and >> ufsids are preferred over device nodes nowadays would be a good idea? > > If this is true, that's what our installer needs to do. Does our > installer do that? > > (In general, a reasonable definition of "preferred" is "what the > installer does" -- if that's not the case, it's a serious bug.) Our installer does not do that. I outlined the reasons in another earlier email, but the summary is that labels seem to be somewhat fragile. Gpart supports a partition-generic labeling interface for three schemes: PC98, GPT, and APM. The installer now supports setting labels on all of these. The appearance of labeled geom providers happens in a different module, glabel, which relies on a totally parallel parse of the partition map. As a result, labeled partitions appearing in /dev works only on GPT volumes, and even then, due to endianness bugs, only on little-endian platforms. Glabel is also not guaranteed available by gpart, and I'm a little dubious that reparses happen at the correct time with 100% reliability. The other, more minor, difficulty, is that it is somewhat difficult to get the labeled provider name from the gpart provider (you have to try to cross-correlate names, and there may be many label providers to choose from for the same partition). If gpart were modified to provide label providers itself based on its generic labeling mechanism, and to provide the name of those providers in its config XML, using labels by default in the installer would be trivial and I would have it in the tree within 5 minutes of getting that commit mail. Unfortunately, I don't have time to do the requisite gpart modifications (which probably aren't that hard) at this time. -Nathan From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 14:50:29 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9AE1106566B; Sun, 24 Apr 2011 14:50:29 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7F47D8FC14; Sun, 24 Apr 2011 14:50:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3OEoTYa035855; Sun, 24 Apr 2011 14:50:29 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3OEoT7W035852; Sun, 24 Apr 2011 14:50:29 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201104241450.p3OEoT7W035852@svn.freebsd.org> From: Adrian Chadd Date: Sun, 24 Apr 2011 14:50:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220988 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2011 14:50:29 -0000 Author: adrian Date: Sun Apr 24 14:50:29 2011 New Revision: 220988 URL: http://svn.freebsd.org/changeset/base/220988 Log: Eliminate code duplication between AR5416/AR9160/AR9280 and AR9285. Writing the TX power registers is the same between all of these chips and later NICs (AR9287, AR9271 USB, etc.) so this will reduce code duplication when those NICs are added to the HAL. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416.h head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416.h Sun Apr 24 13:22:14 2011 (r220987) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416.h Sun Apr 24 14:50:29 2011 (r220988) @@ -268,6 +268,8 @@ extern void ar5416WritePdadcValues(struc extern HAL_BOOL ar5416SetPowerCalTable(struct ath_hal *ah, struct ar5416eeprom *pEepData, const struct ieee80211_channel *chan, int16_t *pTxPowerIndexOffset); +extern void ar5416WriteTxPowerRateRegisters(struct ath_hal *ah, + const struct ieee80211_channel *chan, const int16_t ratesArray[]); extern HAL_BOOL ar5416StopTxDma(struct ath_hal *ah, u_int q); extern HAL_BOOL ar5416SetupTxDesc(struct ath_hal *ah, struct ath_desc *ds, Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Sun Apr 24 13:22:14 2011 (r220987) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Sun Apr 24 14:50:29 2011 (r220988) @@ -795,6 +795,99 @@ ar5416GetChipPowerLimits(struct ath_hal } /************************************************************** + * ar5416WriteTxPowerRateRegisters + * + * Write the TX power rate registers from the raw values given + * in ratesArray[]. + * + * The CCK and HT40 rate registers are only written if needed. + * HT20 and 11g/11a OFDM rate registers are always written. + * + * The values written are raw values which should be written + * to the registers - so it's up to the caller to pre-adjust + * them (eg CCK power offset value, or Merlin TX power offset, + * etc.) + */ +void +ar5416WriteTxPowerRateRegisters(struct ath_hal *ah, + const struct ieee80211_channel *chan, const int16_t ratesArray[]) +{ +#define POW_SM(_r, _s) (((_r) & 0x3f) << (_s)) + + /* Write the OFDM power per rate set */ + OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE1, + POW_SM(ratesArray[rate18mb], 24) + | POW_SM(ratesArray[rate12mb], 16) + | POW_SM(ratesArray[rate9mb], 8) + | POW_SM(ratesArray[rate6mb], 0) + ); + OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE2, + POW_SM(ratesArray[rate54mb], 24) + | POW_SM(ratesArray[rate48mb], 16) + | POW_SM(ratesArray[rate36mb], 8) + | POW_SM(ratesArray[rate24mb], 0) + ); + + if (IEEE80211_IS_CHAN_2GHZ(chan)) { + /* Write the CCK power per rate set */ + OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE3, + POW_SM(ratesArray[rate2s], 24) + | POW_SM(ratesArray[rate2l], 16) + | POW_SM(ratesArray[rateXr], 8) /* XR target power */ + | POW_SM(ratesArray[rate1l], 0) + ); + OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE4, + POW_SM(ratesArray[rate11s], 24) + | POW_SM(ratesArray[rate11l], 16) + | POW_SM(ratesArray[rate5_5s], 8) + | POW_SM(ratesArray[rate5_5l], 0) + ); + HALDEBUG(ah, HAL_DEBUG_RESET, + "%s AR_PHY_POWER_TX_RATE3=0x%x AR_PHY_POWER_TX_RATE4=0x%x\n", + __func__, OS_REG_READ(ah,AR_PHY_POWER_TX_RATE3), + OS_REG_READ(ah,AR_PHY_POWER_TX_RATE4)); + } + + /* Write the HT20 power per rate set */ + OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE5, + POW_SM(ratesArray[rateHt20_3], 24) + | POW_SM(ratesArray[rateHt20_2], 16) + | POW_SM(ratesArray[rateHt20_1], 8) + | POW_SM(ratesArray[rateHt20_0], 0) + ); + OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE6, + POW_SM(ratesArray[rateHt20_7], 24) + | POW_SM(ratesArray[rateHt20_6], 16) + | POW_SM(ratesArray[rateHt20_5], 8) + | POW_SM(ratesArray[rateHt20_4], 0) + ); + + if (IEEE80211_IS_CHAN_HT40(chan)) { + /* Write the HT40 power per rate set */ + OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE7, + POW_SM(ratesArray[rateHt40_3], 24) + | POW_SM(ratesArray[rateHt40_2], 16) + | POW_SM(ratesArray[rateHt40_1], 8) + | POW_SM(ratesArray[rateHt40_0], 0) + ); + OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE8, + POW_SM(ratesArray[rateHt40_7], 24) + | POW_SM(ratesArray[rateHt40_6], 16) + | POW_SM(ratesArray[rateHt40_5], 8) + | POW_SM(ratesArray[rateHt40_4], 0) + ); + /* Write the Dup/Ext 40 power per rate set */ + OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE9, + POW_SM(ratesArray[rateExtOfdm], 24) + | POW_SM(ratesArray[rateExtCck], 16) + | POW_SM(ratesArray[rateDupOfdm], 8) + | POW_SM(ratesArray[rateDupCck], 0) + ); + } +} + + +/************************************************************** * ar5416SetTransmitPower * * Set the transmit power in the baseband for the given @@ -804,7 +897,6 @@ HAL_BOOL ar5416SetTransmitPower(struct ath_hal *ah, const struct ieee80211_channel *chan, uint16_t *rfXpdGain) { -#define POW_SM(_r, _s) (((_r) & 0x3f) << (_s)) #define N(a) (sizeof (a) / sizeof (a[0])) MODAL_EEP_HEADER *pModal; @@ -943,78 +1035,27 @@ ar5416SetTransmitPower(struct ath_hal *a } } - /* Write the OFDM power per rate set */ - OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE1, - POW_SM(ratesArray[rate18mb], 24) - | POW_SM(ratesArray[rate12mb], 16) - | POW_SM(ratesArray[rate9mb], 8) - | POW_SM(ratesArray[rate6mb], 0) - ); - OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE2, - POW_SM(ratesArray[rate54mb], 24) - | POW_SM(ratesArray[rate48mb], 16) - | POW_SM(ratesArray[rate36mb], 8) - | POW_SM(ratesArray[rate24mb], 0) - ); - - if (IEEE80211_IS_CHAN_2GHZ(chan)) { - /* Write the CCK power per rate set */ - OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE3, - POW_SM(ratesArray[rate2s], 24) - | POW_SM(ratesArray[rate2l], 16) - | POW_SM(ratesArray[rateXr], 8) /* XR target power */ - | POW_SM(ratesArray[rate1l], 0) - ); - OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE4, - POW_SM(ratesArray[rate11s], 24) - | POW_SM(ratesArray[rate11l], 16) - | POW_SM(ratesArray[rate5_5s], 8) - | POW_SM(ratesArray[rate5_5l], 0) - ); - HALDEBUG(ah, HAL_DEBUG_RESET, - "%s AR_PHY_POWER_TX_RATE3=0x%x AR_PHY_POWER_TX_RATE4=0x%x\n", - __func__, OS_REG_READ(ah,AR_PHY_POWER_TX_RATE3), - OS_REG_READ(ah,AR_PHY_POWER_TX_RATE4)); - } - - /* Write the HT20 power per rate set */ - OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE5, - POW_SM(ratesArray[rateHt20_3], 24) - | POW_SM(ratesArray[rateHt20_2], 16) - | POW_SM(ratesArray[rateHt20_1], 8) - | POW_SM(ratesArray[rateHt20_0], 0) - ); - OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE6, - POW_SM(ratesArray[rateHt20_7], 24) - | POW_SM(ratesArray[rateHt20_6], 16) - | POW_SM(ratesArray[rateHt20_5], 8) - | POW_SM(ratesArray[rateHt20_4], 0) - ); - + /* + * Adjust the HT40 power to meet the correct target TX power + * for 40MHz mode, based on TX power curves that are established + * for 20MHz mode. + * + * XXX handle overflow/too high power level? + */ if (IEEE80211_IS_CHAN_HT40(chan)) { - /* Write the HT40 power per rate set */ - /* Correct PAR difference between HT40 and HT20/LEGACY */ - OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE7, - POW_SM(ratesArray[rateHt40_3] + ht40PowerIncForPdadc, 24) - | POW_SM(ratesArray[rateHt40_2] + ht40PowerIncForPdadc, 16) - | POW_SM(ratesArray[rateHt40_1] + ht40PowerIncForPdadc, 8) - | POW_SM(ratesArray[rateHt40_0] + ht40PowerIncForPdadc, 0) - ); - OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE8, - POW_SM(ratesArray[rateHt40_7] + ht40PowerIncForPdadc, 24) - | POW_SM(ratesArray[rateHt40_6] + ht40PowerIncForPdadc, 16) - | POW_SM(ratesArray[rateHt40_5] + ht40PowerIncForPdadc, 8) - | POW_SM(ratesArray[rateHt40_4] + ht40PowerIncForPdadc, 0) - ); - /* Write the Dup/Ext 40 power per rate set */ - OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE9, - POW_SM(ratesArray[rateExtOfdm], 24) - | POW_SM(ratesArray[rateExtCck], 16) - | POW_SM(ratesArray[rateDupOfdm], 8) - | POW_SM(ratesArray[rateDupCck], 0) - ); + ratesArray[rateHt40_0] += ht40PowerIncForPdadc; + ratesArray[rateHt40_1] += ht40PowerIncForPdadc; + ratesArray[rateHt40_2] += ht40PowerIncForPdadc; + ratesArray[rateHt40_3] += ht40PowerIncForPdadc; + ratesArray[rateHt40_4] += ht40PowerIncForPdadc; + ratesArray[rateHt40_5] += ht40PowerIncForPdadc; + ratesArray[rateHt40_6] += ht40PowerIncForPdadc; + ratesArray[rateHt40_7] += ht40PowerIncForPdadc; } + /* Write the TX power rate registers */ + ar5416WriteTxPowerRateRegisters(ah, chan, ratesArray); + /* Write the Power subtraction for dynamic chain changing, for per-packet powertx */ OS_REG_WRITE(ah, AR_PHY_POWER_TX_SUB, POW_SM(pModal->pwrDecreaseFor3Chain, 6) From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 15:28:53 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C5360106566C; Sun, 24 Apr 2011 15:28:53 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 8EC4C8FC15; Sun, 24 Apr 2011 15:28:52 +0000 (UTC) Received: by bwz12 with SMTP id 12so1883540bwz.13 for ; Sun, 24 Apr 2011 08:28:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=3tfzIgQrd2esgkvDlGjboHE+sLMyHNXa+nYSEYccUhM=; b=aLGHIoBSpqes+fY71x31ruqw3QRMJ4/4fA2C+jKceoWw+OxgMvm3Dr6zVxvBbPCsJN LE7OkntXHVW6/LmiBD7pbejasZT79sHUKtQfIdNdBZx6E04Zhi+Fuc+YdxMbmYghc7o7 IbsFURF38iRVe6CqyWY42G7QXV3oWUE8MoSIE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=EUz1tyoyBPylsA+9z2xy3JCyLz5PmLikbdM1n8r2CR5GDSosU4OTUv+D6+iK0BgIAF Jtbg/k5H9VrOCpKIcx4MDvR9RKAraQIIuDBTA0TPqExI38GJti8fxaES4uTNrgn3iqYx X85OBx0soEaQU1nERiqUb39aIqEuT1zG3CFV4= Received: by 10.204.154.219 with SMTP id p27mr2639631bkw.110.1303658931183; Sun, 24 Apr 2011 08:28:51 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id w3sm2792693bkt.5.2011.04.24.08.28.49 (version=SSLv3 cipher=OTHER); Sun, 24 Apr 2011 08:28:50 -0700 (PDT) Sender: Alexander Motin Message-ID: <4DB441B0.8020906@FreeBSD.org> Date: Sun, 24 Apr 2011 18:28:48 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: Robert Watson References: <201104240858.p3O8wwqT024628@svn.freebsd.org> In-Reply-To: X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, "Bjoern A. Zeeb" Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2011 15:28:53 -0000 Robert Watson wrote: > I'm very pleased to see a continued movement towards the new ATA code; > it offers clear benefits to all of our users, and is definitely > something we want done for 9.0. > > Could you say more about the migration strategy for users? I recall > that when you proposed throwing this switch, several strategies were > discussed (likely in combination to handle both the immediate upgrade > stumble issue and a longer-term migration): > > (1) Teach new ata parts to replicate the old naming convention in 99.9% of > cases. Or some suppport module that creates the required symlinks if > loaded (and we load it by default in 9.0, phasing it out later with > appropriate boot-time warnings for 6-12 months). Obviously, this > would be > best-effort, but if it takes us from a 40% upgrade failure to a 1% > upgrade > failure, that's a big deal. > > (2) Over time, provide a migration to fstab naming storage targets by > volume > ID / name / serial number, rather than by hardware path. A good > long-term > strategy but one that requires changes to the installer, upgrade path, > etc. > > (3) Teach freebsd-update/installer/etc to recognise *before* a new > kernel is > installed whether the current configuration will require hand-holding. > > (4) Thinking pretty hard about the roll-back path to avoid stumbles when > there's a problem following a kernel update. In the past, linking > kernel > feature updates to /etc or userspace updates has caused significant > issues > for our users, who reasonably expect to follow our normal "install the > kernel, reboot, let it sit for a week" path. > > What is your plan for implementing some combination of these (or did I > miss the commits that brought them in already)? In the past, we've seen > upgrade path problems dislodge users, and since then, we've grown an > increased assumption of ease-of-upgrade that can be managed > automatically by tools like freebsd-update. Breaking the automated > upgrade (and roll-back) path would be extremely problematic. I was hoping to not expand migration process onto another decade. Many users already migrated to the new infrastructure on both STABLE and CURRENT and AFAIK editing fstab was not a major problem for them. Since the last big discussion of this question about year ago we got graid implemented and some other things required to keep previous functionality, that could hold users from migration. Making this commit now I was prepared to spend few weeks on active bug fixing to minimize number of further rollback cases. So at this moment device names change is the last major problem I know. Yes, it was the same year ago, but there was same discussion as the last week about using labels in fstab, that equally ended with nothing. :( What's about creating some kind of symlinks, it could be nice if it worked, but I don't see the way to do it on disk(9) or GEOM layers without breaking device's access counters and as result further random problems. Looking now on these "do or revert" demands to keep old device naming, I'll try to make some hacks to CAM and ada(4) driver to mimic old "adX" names. I see it in form of some loader tunable, disabled by default (as it should be on newly installed systems), but that could be set prior to upgrade if user doesn't want to bother with device names at that moment. It should partially hide problem for some time. Will such solution be acceptable? -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 15:48:08 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B2BAB106566C; Sun, 24 Apr 2011 15:48:07 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A17CA8FC08; Sun, 24 Apr 2011 15:48:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3OFm7cw037599; Sun, 24 Apr 2011 15:48:07 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3OFm7kr037597; Sun, 24 Apr 2011 15:48:07 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201104241548.p3OFm7kr037597@svn.freebsd.org> From: Adrian Chadd Date: Sun, 24 Apr 2011 15:48:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220989 - head/sys/dev/ath/ath_hal/ar9002 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2011 15:48:08 -0000 Author: adrian Date: Sun Apr 24 15:48:07 2011 New Revision: 220989 URL: http://svn.freebsd.org/changeset/base/220989 Log: Use the refactored ar5416WriteTxPowerRateRegisters() call in the ar9285 code. Modified: head/sys/dev/ath/ath_hal/ar9002/ar9285_reset.c Modified: head/sys/dev/ath/ath_hal/ar9002/ar9285_reset.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9002/ar9285_reset.c Sun Apr 24 14:50:29 2011 (r220988) +++ head/sys/dev/ath/ath_hal/ar9002/ar9285_reset.c Sun Apr 24 15:48:07 2011 (r220989) @@ -148,76 +148,27 @@ ar9285SetTransmitPower(struct ath_hal *a ar5416PrintPowerPerRate(ah, ratesArray); #endif - /* Write the OFDM power per rate set */ - OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE1, - POW_SM(ratesArray[rate18mb], 24) - | POW_SM(ratesArray[rate12mb], 16) - | POW_SM(ratesArray[rate9mb], 8) - | POW_SM(ratesArray[rate6mb], 0) - ); - OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE2, - POW_SM(ratesArray[rate54mb], 24) - | POW_SM(ratesArray[rate48mb], 16) - | POW_SM(ratesArray[rate36mb], 8) - | POW_SM(ratesArray[rate24mb], 0) - ); - - /* Write the CCK power per rate set */ - OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE3, - POW_SM(ratesArray[rate2s], 24) - | POW_SM(ratesArray[rate2l], 16) - | POW_SM(ratesArray[rateXr], 8) /* XR target power */ - | POW_SM(ratesArray[rate1l], 0) - ); - OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE4, - POW_SM(ratesArray[rate11s], 24) - | POW_SM(ratesArray[rate11l], 16) - | POW_SM(ratesArray[rate5_5s], 8) - | POW_SM(ratesArray[rate5_5l], 0) - ); - HALDEBUG(ah, HAL_DEBUG_RESET, - "%s AR_PHY_POWER_TX_RATE3=0x%x AR_PHY_POWER_TX_RATE4=0x%x\n", - __func__, OS_REG_READ(ah,AR_PHY_POWER_TX_RATE3), - OS_REG_READ(ah,AR_PHY_POWER_TX_RATE4)); - - /* Write the HT20 power per rate set */ - OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE5, - POW_SM(ratesArray[rateHt20_3], 24) - | POW_SM(ratesArray[rateHt20_2], 16) - | POW_SM(ratesArray[rateHt20_1], 8) - | POW_SM(ratesArray[rateHt20_0], 0) - ); - OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE6, - POW_SM(ratesArray[rateHt20_7], 24) - | POW_SM(ratesArray[rateHt20_6], 16) - | POW_SM(ratesArray[rateHt20_5], 8) - | POW_SM(ratesArray[rateHt20_4], 0) - ); - + /* + * Adjust the HT40 power to meet the correct target TX power + * for 40MHz mode, based on TX power curves that are established + * for 20MHz mode. + * + * XXX handle overflow/too high power level? + */ if (IEEE80211_IS_CHAN_HT40(chan)) { - /* Write the HT40 power per rate set */ - /* Correct PAR difference between HT40 and HT20/LEGACY */ - OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE7, - POW_SM(ratesArray[rateHt40_3] + ht40PowerIncForPdadc, 24) - | POW_SM(ratesArray[rateHt40_2] + ht40PowerIncForPdadc, 16) - | POW_SM(ratesArray[rateHt40_1] + ht40PowerIncForPdadc, 8) - | POW_SM(ratesArray[rateHt40_0] + ht40PowerIncForPdadc, 0) - ); - OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE8, - POW_SM(ratesArray[rateHt40_7] + ht40PowerIncForPdadc, 24) - | POW_SM(ratesArray[rateHt40_6] + ht40PowerIncForPdadc, 16) - | POW_SM(ratesArray[rateHt40_5] + ht40PowerIncForPdadc, 8) - | POW_SM(ratesArray[rateHt40_4] + ht40PowerIncForPdadc, 0) - ); - /* Write the Dup/Ext 40 power per rate set */ - OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE9, - POW_SM(ratesArray[rateExtOfdm], 24) - | POW_SM(ratesArray[rateExtCck], 16) - | POW_SM(ratesArray[rateDupOfdm], 8) - | POW_SM(ratesArray[rateDupCck], 0) - ); + ratesArray[rateHt40_0] += ht40PowerIncForPdadc; + ratesArray[rateHt40_1] += ht40PowerIncForPdadc; + ratesArray[rateHt40_2] += ht40PowerIncForPdadc; + ratesArray[rateHt40_3] += ht40PowerIncForPdadc; + ratesArray[rateHt40_4] += ht40PowerIncForPdadc; + ratesArray[rateHt40_5] += ht40PowerIncForPdadc; + ratesArray[rateHt40_6] += ht40PowerIncForPdadc; + ratesArray[rateHt40_7] += ht40PowerIncForPdadc; } + /* Write the TX power rate registers */ + ar5416WriteTxPowerRateRegisters(ah, chan, ratesArray); + return AH_TRUE; #undef POW_SM #undef N From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 15:53:57 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3AAF106564A; Sun, 24 Apr 2011 15:53:57 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A7B148FC19; Sun, 24 Apr 2011 15:53:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3OFrv4t037801; Sun, 24 Apr 2011 15:53:57 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3OFrvIi037797; Sun, 24 Apr 2011 15:53:57 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201104241553.p3OFrvIi037797@svn.freebsd.org> From: Adrian Chadd Date: Sun, 24 Apr 2011 15:53:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220990 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2011 15:53:58 -0000 Author: adrian Date: Sun Apr 24 15:53:57 2011 New Revision: 220990 URL: http://svn.freebsd.org/changeset/base/220990 Log: Break out the PLL setup into an overridable method. The only method right now is ar5416InitPLL() which handles multiple chipsets; this can now be overridden by newer chipset HAL code. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416.h head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416.h Sun Apr 24 15:48:07 2011 (r220989) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416.h Sun Apr 24 15:53:57 2011 (r220990) @@ -103,6 +103,10 @@ struct ath_hal_5416 { const struct ieee80211_channel *chan, int16_t *pTxPowerIndexOffset); + /* baseband operations */ + void (*ah_initPLL) (struct ath_hal *ah, + const struct ieee80211_channel *chan); + u_int ah_globaltxtimeout; /* global tx timeout */ u_int ah_gpioMask; int ah_hangs; /* h/w hangs state */ @@ -248,6 +252,8 @@ extern void ar5416EepromSetAddac(struct const struct ieee80211_channel *chan); extern uint16_t ar5416GetMaxEdgePower(uint16_t freq, CAL_CTL_EDGES *pRdEdgesPower, HAL_BOOL is2GHz); +extern void ar5416InitPLL(struct ath_hal *ah, + const struct ieee80211_channel *chan); /* TX power setup related routines in ar5416_reset.c */ extern void ar5416GetGainBoundariesAndPdadcs(struct ath_hal *ah, Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Sun Apr 24 15:48:07 2011 (r220989) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Sun Apr 24 15:53:57 2011 (r220990) @@ -181,6 +181,9 @@ ar5416InitState(struct ath_hal_5416 *ahp AH5416(ah)->ah_writeIni = ar5416WriteIni; AH5416(ah)->ah_spurMitigate = ar5416SpurMitigate; + /* Internal baseband ops */ + AH5416(ah)->ah_initPLL = ar5416InitPLL; + /* Internal calibration ops */ AH5416(ah)->ah_cal_initcal = ar5416InitCalHardware; Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Sun Apr 24 15:48:07 2011 (r220989) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Sun Apr 24 15:53:57 2011 (r220990) @@ -54,7 +54,6 @@ static void ar5416SetDeltaSlope(struct a static HAL_BOOL ar5416SetResetPowerOn(struct ath_hal *ah); static HAL_BOOL ar5416SetReset(struct ath_hal *ah, int type); -static void ar5416InitPLL(struct ath_hal *ah, const struct ieee80211_channel *chan); static HAL_BOOL ar5416SetPowerPerRateTable(struct ath_hal *ah, struct ar5416eeprom *pEepData, const struct ieee80211_channel *chan, int16_t *ratesArray, @@ -513,7 +512,7 @@ ar5416InitBB(struct ath_hal *ah, const s /* Turn on PLL on 5416 */ HALDEBUG(ah, HAL_DEBUG_RESET, "%s %s channel\n", __func__, IEEE80211_IS_CHAN_5GHZ(chan) ? "5GHz" : "2GHz"); - ar5416InitPLL(ah, chan); + AH5416(ah)->ah_initPLL(ah, chan); /* Activate the PHY (includes baseband activate and synthesizer on) */ OS_REG_WRITE(ah, AR_PHY_ACTIVE, AR_PHY_ACTIVE_EN); @@ -655,7 +654,7 @@ ar5416ChipReset(struct ath_hal *ah, cons if (!ar5416SetPowerMode(ah, HAL_PM_AWAKE, AH_TRUE)) return AH_FALSE; - ar5416InitPLL(ah, chan); + AH5416(ah)->ah_initPLL(ah, chan); /* * Perform warm reset before the mode/PLL/turbo registers @@ -1221,7 +1220,7 @@ ar5416SetReset(struct ath_hal *ah, int t OS_REG_WRITE(ah, AR_CFG, INIT_CONFIG_STATUS); } - ar5416InitPLL(ah, AH_NULL); + AH5416(ah)->ah_initPLL(ah, AH_NULL); return AH_TRUE; } @@ -1278,7 +1277,7 @@ ar5416UpdateChainMasks(struct ath_hal *a #define IS_5GHZ_FAST_CLOCK_EN(ah, chan) AH_FALSE #endif -static void +void ar5416InitPLL(struct ath_hal *ah, const struct ieee80211_channel *chan) { uint32_t pll; From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 16:32:58 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id D46CA1065675; Sun, 24 Apr 2011 16:32:58 +0000 (UTC) Date: Sun, 24 Apr 2011 16:32:58 +0000 From: Alexey Dokuchaev To: Alexander Motin Message-ID: <20110424163258.GA32595@FreeBSD.org> References: <201104240858.p3O8wwqT024628@svn.freebsd.org> <4DB441B0.8020906@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <4DB441B0.8020906@FreeBSD.org> User-Agent: Mutt/1.4.2.1i Cc: svn-src-head@freebsd.org, "Bjoern A. Zeeb" , svn-src-all@freebsd.org, src-committers@freebsd.org, Robert Watson Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2011 16:32:58 -0000 On Sun, Apr 24, 2011 at 06:28:48PM +0300, Alexander Motin wrote: > What's about creating some kind of symlinks, it could be nice if it > worked, but I don't see the way to do it on disk(9) or GEOM layers > without breaking device's access counters and as result further random > problems. Speaking on Alexander's side, I'd want to mention that many of our users had been bitten by obscure adX naming during past years (largely due to ATA_STATIC_ID option which was probably useful back in times when there typically was only one IDE controller present in system, but leads to all sorts of weird ad4-6-8's in recent years) had already migrated to glabel or GPT labels, to avoid precisely the issues we're talking about here. ./danfe From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 16:34:48 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 058EC106566B; Sun, 24 Apr 2011 16:34:48 +0000 (UTC) (envelope-from ache@vniz.net) Received: from vniz.net (vniz.net [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id 7753F8FC15; Sun, 24 Apr 2011 16:34:46 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by vniz.net (8.14.4/8.14.4) with ESMTP id p3OGJZ1a018933; Sun, 24 Apr 2011 20:19:35 +0400 (MSD) (envelope-from ache@vniz.net) Received: (from ache@localhost) by localhost (8.14.4/8.14.4/Submit) id p3OGJYxp018932; Sun, 24 Apr 2011 20:19:34 +0400 (MSD) (envelope-from ache) Date: Sun, 24 Apr 2011 20:19:33 +0400 From: Andrey Chernov To: Alexander Motin Message-ID: <20110424161933.GA18775@vniz.net> Mail-Followup-To: Andrey Chernov , Alexander Motin , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG References: <201104240923.p3O9N8QG025386@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201104240923.p3O9N8QG025386@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG Subject: Re: svn commit: r220983 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2011 16:34:48 -0000 On Sun, Apr 24, 2011 at 09:23:08AM +0000, Alexander Motin wrote: > ATA device names in /etc/fstab or other places, make sure to update > them respectively (adX -> adaY, acdX -> cdY, afdX -> daY, astX -> saY, > - where 'Y's are the sequential numbers for each type in order of > - detection, unless configured otherwise with tunables, see cam(4)). > + where 'Y's are the sequential numbers starting from zero for each type > + in order of detection, unless configured otherwise with tunables, > + see cam(4)). Is there any way to guess resulting 'Y' numbers _before_ booting new kernel? I have remote machine with console access almost impossible (very hard for me). It seems something like vfs.root.mountfrom="ufs:/dev/ada0s1a ufs:/dev/ada1s1a ..." (up to max channels) helps to find root, but what about other mounted disks? -- http://ache.vniz.net/ From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 16:38:12 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D120106570E; Sun, 24 Apr 2011 16:38:12 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 5244D8FC14; Sun, 24 Apr 2011 16:38:10 +0000 (UTC) Received: by bwz12 with SMTP id 12so1912701bwz.13 for ; Sun, 24 Apr 2011 09:38:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:user-agent :mime-version:to:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=mQ9jtXZaWNdfFS3GnvVUOqcrM8JMxsoRNWgLSuNNJQ4=; b=EtxMusBv3DdupbHcT3lpAbBMmhSDv/1tyDyUA5tlPhpPF2opNd0ZCc73ANb2vVVpy1 9RFRcX3HMYwF5qN8hguzq9rTM9u/mcSgddiZ3FyKgcXAJ6AXEClTevbXETyMPgQyRnpa sg6nU19du34bEv0wFulTBRvFC9ens1qSACl2I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; b=eXIrC/clZRq7XZvhmyXFdbCfX8T/wekHduHrD+Rge54F/y7EEqQOmmscsiyr4bbh4F wt+CUqI76emE1Q3bTwrQ6LRuvHY/vVtKfQyqRN7uM4jP5U6pOaWqQZBSymr/qB2/sdRT eO1R5QUTU933q/8Fc3oIZYKdONXi8izAZPqHs= Received: by 10.204.74.218 with SMTP id v26mr665216bkj.76.1303663089903; Sun, 24 Apr 2011 09:38:09 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id u15sm215732bkf.4.2011.04.24.09.38.08 (version=SSLv3 cipher=OTHER); Sun, 24 Apr 2011 09:38:09 -0700 (PDT) Sender: Alexander Motin Message-ID: <4DB451EF.8090301@FreeBSD.org> Date: Sun, 24 Apr 2011 19:38:07 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.15) Gecko/20110310 Thunderbird/3.1.9 MIME-Version: 1.0 To: Andrey Chernov , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG References: <201104240923.p3O9N8QG025386@svn.freebsd.org> <20110424161933.GA18775@vniz.net> In-Reply-To: <20110424161933.GA18775@vniz.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: svn commit: r220983 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2011 16:38:12 -0000 On 24.04.2011 19:19, Andrey Chernov wrote: > On Sun, Apr 24, 2011 at 09:23:08AM +0000, Alexander Motin wrote: >> ATA device names in /etc/fstab or other places, make sure to update >> them respectively (adX -> adaY, acdX -> cdY, afdX -> daY, astX -> saY, >> - where 'Y's are the sequential numbers for each type in order of >> - detection, unless configured otherwise with tunables, see cam(4)). >> + where 'Y's are the sequential numbers starting from zero for each type >> + in order of detection, unless configured otherwise with tunables, >> + see cam(4)). > > Is there any way to guess resulting 'Y' numbers _before_ booting new > kernel? I have remote machine with console access almost impossible (very > hard for me). In most cases order of adaX devices should match order of ad devices, so first adX will become ada0, second - ada1, etc. The only exception there should be devices on ATA channels in legacy/ISA emulation mode: ata0 (ad0/ad1) and ata1 (ad2/ad3). Old ATA always allocated these devices first, but new ATA will allocate them as any other in order of their channels registration. That order you can see in dmesg. -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 16:54:49 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F41E106566C; Sun, 24 Apr 2011 16:54:49 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 441DB8FC08; Sun, 24 Apr 2011 16:54:49 +0000 (UTC) Received: from [192.168.2.112] (host86-147-11-178.range86-147.btcentralplus.com [86.147.11.178]) by cyrus.watson.org (Postfix) with ESMTPSA id E975046B49; Sun, 24 Apr 2011 12:54:47 -0400 (EDT) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Robert N. M. Watson" In-Reply-To: <20110424163258.GA32595@FreeBSD.org> Date: Sun, 24 Apr 2011 17:54:46 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <69D8AAE8-253B-4BD1-83E3-F300FCF3316C@FreeBSD.org> References: <201104240858.p3O8wwqT024628@svn.freebsd.org> <4DB441B0.8020906@FreeBSD.org> <20110424163258.GA32595@FreeBSD.org> To: Alexey Dokuchaev X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, Alexander Motin , src-committers@freebsd.org, "Bjoern A. Zeeb" , svn-src-all@freebsd.org Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2011 16:54:49 -0000 On 24 Apr 2011, at 17:32, Alexey Dokuchaev wrote: > On Sun, Apr 24, 2011 at 06:28:48PM +0300, Alexander Motin wrote: >> What's about creating some kind of symlinks, it could be nice if it >> worked, but I don't see the way to do it on disk(9) or GEOM layers >> without breaking device's access counters and as result further = random >> problems. >=20 > Speaking on Alexander's side, I'd want to mention that many of our = users > had been bitten by obscure adX naming during past years (largely due = to > ATA_STATIC_ID option which was probably useful back in times when = there > typically was only one IDE controller present in system, but leads to = all > sorts of weird ad4-6-8's in recent years) had already migrated to = glabel > or GPT labels, to avoid precisely the issues we're talking about here. Yes, the argument is not over whether the change should be made, but how = we can get it done in time for 9.0-RELEASE in such a way that it = minimises disruption for our users. Clearly, we need the new AHCI driver = as the default in the release. But if we make upgrading (and rolling = back) significantly harder, that hurts us a lot. Ideally, we would have = shipped the migration parts in 8.2 so that 9.0 was a driver change = event, not a device naming model change event (easing in the = administrative hurdle). Robert= From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 16:57:06 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 071A6106564A; Sun, 24 Apr 2011 16:57:06 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id CFE8B8FC0C; Sun, 24 Apr 2011 16:57:05 +0000 (UTC) Received: from [192.168.2.112] (host86-147-11-178.range86-147.btcentralplus.com [86.147.11.178]) by cyrus.watson.org (Postfix) with ESMTPSA id 805DD46B38; Sun, 24 Apr 2011 12:57:04 -0400 (EDT) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Robert N. M. Watson" In-Reply-To: <4DB40E39.5090905@FreeBSD.org> Date: Sun, 24 Apr 2011 17:57:03 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201104240858.p3O8wwqT024628@svn.freebsd.org> <77FE817D-D548-4B79-A64B-C890D94323B9@FreeBSD.org> <4DB40026.5030405@FreeBSD.org> <4DB40E39.5090905@FreeBSD.org> To: Alexander Motin X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, "Bjoern A. Zeeb" , src-committers@freebsd.org Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2011 16:57:06 -0000 On 24 Apr 2011, at 12:49, Alexander Motin wrote: >>> Reverting is not an option. _Constructive_ propositions are welcome. >>=20 >> It is the policy of this project that the release engineering team = has >> final authority over what ships in a release. It is entirely within >> scope to revert this change for 9.0 if issues with the upgrade path = are >> not addressed. My hope also that this path can be entirely avoided >> through a rapid addressing of upgrade path issues that have been = known >> (and discussed on the mailing lists extensively) since you posted = about >> the work on the public mailing lists. >>=20 >> I agree with Bjoern that it is critical to address these issues in a >> timely manner -- our users depend on reliable and easy upgrades, and = it >> seems (on face value) that significant work remains to be done to = make >> that possible. Our release is increasingly close, and it's important = we >> keep the tree as stable as possible so that merges of other = straggling >> features can go uneventfully. >=20 > I am asking for excuse if my tone was overly strict. It was not my = real intention to offend anybody. May be inside I am indeed overreacting = a bit on proposition to revert with no alternative things that I have = put my heart into, which are broadly accepted by users, which I = announced on the list few days ago and got no objections. I am sorry for = that. >=20 > I do worry about possible complications during migration process. And = obviously this is not an easy question, as soon as it wasn't solved = during so much time. I will gladly accept any help or real ideas people = can provide. I just don't like to feel it my own problem. I am not doing = it for myself. It would be nice to see some friendly support instead. Let's be clear: Bjoern didn't say you should revert it immediately. He = said that the migration path needs to be fixed in the next month (2-4 = weeks). That leaves plenty of time to resolve these issues, which I = think the consensus is should have been resolved before committing the = switch, not after. But given that it's in the tree, let's leave it there = for now to continue to improve our testing exposure, and try to get it = fixed as quickly as possible. Robert= From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 17:34:22 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96B67106566B; Sun, 24 Apr 2011 17:34:22 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (unknown [IPv6:2001:44b8:7c07:5581:266:e1ff:fe0c:8f16]) by mx1.freebsd.org (Postfix) with ESMTP id 4627D8FC0A; Sun, 24 Apr 2011 17:34:20 +0000 (UTC) Received: from [192.168.1.9] (cm-84.215.40.84.getinternet.no [84.215.40.84]) (authenticated bits=0) by cain.gsoft.com.au (8.14.4/8.14.3) with ESMTP id p3OHY6eN019475 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Mon, 25 Apr 2011 03:04:09 +0930 (CST) (envelope-from doconnor@gsoft.com.au) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Daniel O'Connor" In-Reply-To: <20110424161933.GA18775@vniz.net> Date: Sun, 24 Apr 2011 19:34:05 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <18B3AE1E-467E-4B23-81B9-AB1EDEFE1F7A@gsoft.com.au> References: <201104240923.p3O9N8QG025386@svn.freebsd.org> <20110424161933.GA18775@vniz.net> To: Andrey Chernov X-Mailer: Apple Mail (2.1084) X-Spam-Score: 0.163 () BAYES_00,RDNS_DYNAMIC X-Scanned-By: MIMEDefang 2.67 on 203.31.81.10 Cc: svn-src-head@freebsd.org, Alexander Motin , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r220983 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2011 17:34:22 -0000 On 24/04/2011, at 18:19, Andrey Chernov wrote: > On Sun, Apr 24, 2011 at 09:23:08AM +0000, Alexander Motin wrote: >> ATA device names in /etc/fstab or other places, make sure to = update >> them respectively (adX -> adaY, acdX -> cdY, afdX -> daY, astX = -> saY, >> - where 'Y's are the sequential numbers for each type in order of >> - detection, unless configured otherwise with tunables, see = cam(4)). >> + where 'Y's are the sequential numbers starting from zero for = each type >> + in order of detection, unless configured otherwise with = tunables, >> + see cam(4)). >=20 > Is there any way to guess resulting 'Y' numbers _before_ booting new=20= > kernel? I have remote machine with console access almost impossible = (very=20 > hard for me). >=20 > It seems something like > vfs.root.mountfrom=3D"ufs:/dev/ada0s1a ufs:/dev/ada1s1a ..." > (up to max channels) helps to find root, but what about other mounted=20= > disks? The best way is to change to use GPT IDs (/dev/gptid/xxx) if you are on = a GPT system) or UFS IDs (/dev/ufsid/xxx) if you can't. gpart list will show the GPTID (rawuuid) and dumpfs will show the UFS = ID. The following shell snippet will generate the UFS ID for a given FS. getfsid() { line=3D`dumpfs 2> /dev/null $1 | head | grep superblock\ location` if [ $? -ne 0 ]; then return 1 fi # dumpfs doesn't print leading 0s eval `echo $line | sed -nEe 's/superblock location.*id.*\[ (.*) (.*)\ = ]/printf %0x $((0x\1 << 32 | 0x\2))/p'` } -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 18:59:45 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6956E106564A; Sun, 24 Apr 2011 18:59:45 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id E1F638FC14; Sun, 24 Apr 2011 18:59:44 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id A1B4825D3857; Sun, 24 Apr 2011 18:59:43 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 04772159DB43; Sun, 24 Apr 2011 18:59:43 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id joRQkvUrB5sn; Sun, 24 Apr 2011 18:59:41 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 4ACA0159DB42; Sun, 24 Apr 2011 18:59:41 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <4DB441B0.8020906@FreeBSD.org> Date: Sun, 24 Apr 2011 18:59:40 +0000 Content-Transfer-Encoding: 7bit Message-Id: References: <201104240858.p3O8wwqT024628@svn.freebsd.org> <4DB441B0.8020906@FreeBSD.org> To: Alexander Motin X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Robert Watson Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2011 18:59:45 -0000 On Apr 24, 2011, at 3:28 PM, Alexander Motin wrote: > I was hoping to not expand migration process onto another decade. Many > users already migrated to the new infrastructure on both STABLE and > CURRENT and AFAIK editing fstab was not a major problem for them. Do not think that based on the hundred replies on the lists in two years, that any of the hundreds of thousands of machines you haven't heard of were migrated. A LOT of people simply run on defaults we provide. > ... So at this moment device names change > is the last major problem I know. Yes, it was the same year ago, but > there was same discussion as the last week about using labels in fstab, > that equally ended with nothing. :( I am sorry if I was too direct with the "fix it the next weeks or backout" earlier today. As I had said on current@ I have migrated machines myself and am testing things where possible and it's a good thing to move to. As I had also said on current@ "we must not screw our users and need transition magic". I think a couple of others just didn't repeat what was said months ago. > What's about creating some kind of symlinks, it could be nice if it > worked, but I don't see the way to do it on disk(9) or GEOM layers > without breaking device's access counters and as result further random > problems. I had been pondering devfs "link"s myself, the problem is that from the rc framework they come too late. If you can add a simple .ko that does it programmatically on 9 that would be great. The problem is that after booting the new kernel you don't know whether people had ATA_STATIC on or not, so we'd have to go with the defaults, that were in 8.x (and an extra tunable to flip the logic maybe)? > Looking now on these "do or revert" demands to keep old device naming, > I'll try to make some hacks to CAM and ada(4) driver to mimic old "adX" > names. I see it in form of some loader tunable, disabled by default (as > it should be on newly installed systems), but that could be set prior to > upgrade if user doesn't want to bother with device names at that moment. > It should partially hide problem for some time. It would need to be in and on by default for the lifetime of 9 as it's not in the last 8.x release (which would need it the other way round anyway. MIght it be a good idea to do that as well afterwards providing ada links on the next 8.x release?). The user could disable it after the conversion happened though with a tunable to get rid of the extra /dev/* noise. We could even check for it being on and check fstab and warn/pester the user then that he'll need to migrate (on boot from rc.d, in weekly mails, ...). If we have both information available (old from the kernel transition code) and new we could even provide a script to do it. The reason we might not want to do it automatically is that if the user will decide to boot kernel.old because the new kernel panics after 2 days, she'll be facing the new ada entries in fstab with an 8.x kernel and that would not work either. So it's a decision users need to make eventually themselves during the lifetime of 9.x when upgrading from an older release. > Will such solution be acceptable? I think any solution will be acceptable if it (mostly) works and gets the possible fallout rate (significantly) down and thanks a lot for picking it up now! Bjoern PS: And I think you'll find a lot of testers the next days/weeks on current@ when people update their kernels and forgot to read UPDATING or fail to do the conversion properly.;) -- Bjoern A. Zeeb You have to have visions! Stop bit received. Insert coin for new address family. From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 19:35:54 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8AD2C106564A; Sun, 24 Apr 2011 19:35:54 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 78D5C8FC0A; Sun, 24 Apr 2011 19:35:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3OJZsnB044477; Sun, 24 Apr 2011 19:35:54 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3OJZs8N044475; Sun, 24 Apr 2011 19:35:54 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201104241935.p3OJZs8N044475@svn.freebsd.org> From: Rick Macklem Date: Sun, 24 Apr 2011 19:35:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220997 - stable/8/sys/fs/nfsserver X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2011 19:35:54 -0000 Author: rmacklem Date: Sun Apr 24 19:35:54 2011 New Revision: 220997 URL: http://svn.freebsd.org/changeset/base/220997 Log: MFC: r220507 Add a VOP_UNLOCK() for the directory, when that is not what VOP_LOOKUP() returned. This fixes a bug in the experimental NFS server for the case where VFS_VGET() fails returning EOPNOTSUPP in the ReaddirPlus RPC, forcing the use of VOP_LOOKUP() instead. Modified: stable/8/sys/fs/nfsserver/nfs_nfsdport.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- stable/8/sys/fs/nfsserver/nfs_nfsdport.c Sun Apr 24 17:28:27 2011 (r220996) +++ stable/8/sys/fs/nfsserver/nfs_nfsdport.c Sun Apr 24 19:35:54 2011 (r220997) @@ -1972,9 +1972,13 @@ again: vref(vp); nvp = vp; r = 0; - } else + } else { r = VOP_LOOKUP(vp, &nvp, &cn); + if (vp != nvp) + VOP_UNLOCK(vp, + 0); + } } } if (!r) { From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 19:41:13 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D3C651065672; Sun, 24 Apr 2011 19:41:13 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 582BC8FC16; Sun, 24 Apr 2011 19:41:11 +0000 (UTC) Received: by bwz12 with SMTP id 12so1982518bwz.13 for ; Sun, 24 Apr 2011 12:41:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=yNSOmaQ55AGmGK/96cULsZRPgQJvgfptmP/pBV7oJx0=; b=Ak7GrmSYVfhHYMnT4l0V0j7llD3MWZBTQ0pHntK7Er66RlWUGcs3YdSt3KQzZzGTHy tZ6N1j8ew0/74/mlAW0b2S6q7ubXB7p59CVbdIb/nIUvjQ79Ymw8T+HqAv8oXUoovO16 rwbFoX0Xz5+rYT7axmjiSl+VY2QNm5YopKfy0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=XhU8bqLSXhJ97lCRTx74eEwlhZDv/3Cbh2mZ0S+BlQeZzACqBcPzytegQSrxBs2s0n ewiclW7V4K2Kpt4/Donrx9snzrO1B1KavIrzvTvCDupEsxxB/4rpIZwT8khqUfFzKU9B I/51Gt9E/kMUID837OsTInlEwmOTbpf74LYkU= Received: by 10.204.19.5 with SMTP id y5mr2839200bka.194.1303674070981; Sun, 24 Apr 2011 12:41:10 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id l1sm2893508bkl.1.2011.04.24.12.41.09 (version=SSLv3 cipher=OTHER); Sun, 24 Apr 2011 12:41:10 -0700 (PDT) Sender: Alexander Motin Message-ID: <4DB47CD4.9060300@FreeBSD.org> Date: Sun, 24 Apr 2011 22:41:08 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.15) Gecko/20110310 Thunderbird/3.1.9 MIME-Version: 1.0 To: "Bjoern A. Zeeb" References: <201104240858.p3O8wwqT024628@svn.freebsd.org> <4DB441B0.8020906@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Robert Watson Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2011 19:41:13 -0000 On 24.04.2011 21:59, Bjoern A. Zeeb wrote: >> What's about creating some kind of symlinks, it could be nice if it >> worked, but I don't see the way to do it on disk(9) or GEOM layers >> without breaking device's access counters and as result further random >> problems. > > I had been pondering devfs "link"s myself, the problem is that from the rc > framework they come too late. If you can add a simple .ko that does it > programmatically on 9 that would be great. The problem is that after booting > the new kernel you don't know whether people had ATA_STATIC on or not, so > we'd have to go with the defaults, that were in 8.x (and an extra tunable to > flip the logic maybe)? Devfs links won't help users with hardcoded provider names in gmirror, etc -- from GEOM PoV there will be no such providers. Also to create proper mapping that module should have real-time information from CAM about ATA controller details. And looking that it will have to link in real time any derivative providers also (ad4s1a -> ada0s1a) I worry if it is possible at all. Some devfs expert needed here. >> Looking now on these "do or revert" demands to keep old device naming, >> I'll try to make some hacks to CAM and ada(4) driver to mimic old "adX" >> names. I see it in form of some loader tunable, disabled by default (as >> it should be on newly installed systems), but that could be set prior to >> upgrade if user doesn't want to bother with device names at that moment. >> It should partially hide problem for some time. > > It would need to be in and on by default for the lifetime of 9 as it's not > in the last 8.x release (which would need it the other way round anyway. > MIght it be a good idea to do that as well afterwards providing ada links > on the next 8.x release?). I wouldn't like to keep that ugly numbering on by default till the 9.x EoL even for new installations. Also remember about number of people already using new ATA, for whom requirement to disable that tunable may also be uncomfortable. > The user could disable it after the conversion happened though with a tunable > to get rid of the extra /dev/* noise. We could even check for it being on > and check fstab and warn/pester the user then that he'll need to migrate > (on boot from rc.d, in weekly mails, ...). It would be fine if it was just devfs noise, but I have some doubts about it (above). > If we have both information available (old from the kernel transition code) > and new we could even provide a script to do it. > > The reason we might not want to do it automatically is that if the user will > decide to boot kernel.old because the new kernel panics after 2 days, she'll > be facing the new ada entries in fstab with an 8.x kernel and that would not > work either. So it's a decision users need to make eventually themselves > during the lifetime of 9.x when upgrading from an older release. Reasonable. >> Will such solution be acceptable? > > I think any solution will be acceptable if it (mostly) works and gets the > possible fallout rate (significantly) down and thanks a lot for picking it > up now! But that solution should not include setting tunables before upgrading? Can't we teach mergemaster or whatever else to set it depending on whet disks are now present in system? > PS: And I think you'll find a lot of testers the next days/weeks on current@ > when people update their kernels and forgot to read UPDATING or fail to > do the conversion properly.;) I can always say: "read UPDATING" (for log: I am not completely serious here. :)). -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 19:50:13 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 97869106564A; Sun, 24 Apr 2011 19:50:13 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 854408FC0C; Sun, 24 Apr 2011 19:50:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3OJoD7s044930; Sun, 24 Apr 2011 19:50:13 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3OJoDl9044928; Sun, 24 Apr 2011 19:50:13 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201104241950.p3OJoDl9044928@svn.freebsd.org> From: Rick Macklem Date: Sun, 24 Apr 2011 19:50:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220998 - stable/8/usr.sbin/nfsd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2011 19:50:13 -0000 Author: rmacklem Date: Sun Apr 24 19:50:13 2011 New Revision: 220998 URL: http://svn.freebsd.org/changeset/base/220998 Log: MFC: r220510 Add support for a backup stable restart file to the nfsd, used for NFSv4 restart. This permits the nfsd to create the stable restart file as required and minimizes the risk of trouble if the file is lost. Modified: stable/8/usr.sbin/nfsd/nfsd.c Directory Properties: stable/8/usr.sbin/nfsd/ (props changed) Modified: stable/8/usr.sbin/nfsd/nfsd.c ============================================================================== --- stable/8/usr.sbin/nfsd/nfsd.c Sun Apr 24 19:35:54 2011 (r220997) +++ stable/8/usr.sbin/nfsd/nfsd.c Sun Apr 24 19:50:13 2011 (r220998) @@ -51,6 +51,9 @@ static const char rcsid[] = #include #include #include +#include +#include +#include #include #include @@ -79,6 +82,7 @@ int debug = 0; #endif #define NFSD_STABLERESTART "/var/db/nfs-stablerestart" +#define NFSD_STABLEBACKUP "/var/db/nfs-stablerestart.bak" #define MAXNFSDCNT 256 #define DEFNFSDCNT 4 pid_t children[MAXNFSDCNT]; /* PIDs of children */ @@ -86,6 +90,8 @@ int nfsdcnt; /* number of children */ int new_syscall; int run_v4server = 0; /* Force running of nfsv4 server */ int nfssvc_nfsd; /* Set to correct NFSSVC_xxx flag */ +int stablefd = -1; /* Fd for the stable restart file */ +int backupfd; /* Fd for the backup stable restart file */ void cleanup(int); void child_cleanup(int); @@ -98,6 +104,9 @@ int setbindhost(struct addrinfo **ia, co void start_server(int); void unregistration(void); void usage(void); +void open_stable(int *, int *); +void copy_stable(int, int); +void backup_stable(int); /* * Nfs server daemon mostly just a user context for nfssvc() @@ -136,7 +145,7 @@ main(int argc, char **argv) int tcp6sock, ip6flag, tcpflag, tcpsock; int udpflag, ecode, error, s, srvcnt; int bindhostc, bindanyflag, rpcbreg, rpcbregcnt; - int stablefd, nfssvc_addsock; + int nfssvc_addsock; char **bindhost = NULL; pid_t pid; @@ -346,6 +355,7 @@ main(int argc, char **argv) } (void)signal(SIGSYS, nonfs); (void)signal(SIGCHLD, reapchild); + (void)signal(SIGUSR2, backup_stable); openlog("nfsd", LOG_PID, LOG_DAEMON); @@ -355,22 +365,21 @@ main(int argc, char **argv) * regular nfssvc() call to service NFS requests. * (This way the file remains open until the last nfsd is killed * off.) - * Note that this file is not created by this daemon and can - * only be relocated by recompiling the daemon, in order to - * minimize accidentally starting up with the wrong file. - * If should be created as an empty file Read and Write for - * root before the first time you run NFS v4 and should never - * be re-initialized if at all possible. It should live on a + * It and the backup copy will be created as empty files + * the first time this nfsd is started and should never be + * deleted/replaced if at all possible. It should live on a * local, non-volatile storage device that does not do hardware * level write-back caching. (See SCSI doc for more information * on how to prevent write-back caching on SCSI disks.) */ if (run_v4server > 0) { - stablefd = open(NFSD_STABLERESTART, O_RDWR, 0); + open_stable(&stablefd, &backupfd); if (stablefd < 0) { syslog(LOG_ERR, "Can't open %s\n", NFSD_STABLERESTART); exit(1); } + /* This system call will fail for old kernels, but that's ok. */ + nfssvc(NFSSVC_BACKUPSTABLE, NULL); if (nfssvc(NFSSVC_STABLERESTART, (caddr_t)&stablefd) < 0) { syslog(LOG_ERR, "Can't read stable storage file\n"); exit(1); @@ -739,9 +748,9 @@ main(int argc, char **argv) if (select(maxsock + 1, &ready, NULL, NULL, NULL) < 1) { error = errno; - syslog(LOG_ERR, "select failed: %m"); if (error == EINTR) continue; + syslog(LOG_ERR, "select failed: %m"); nfsd_exit(1); } } @@ -973,3 +982,95 @@ start_server(int master) else exit(status); } + +/* + * Open the stable restart file and return the file descriptor for it. + */ +void +open_stable(int *stable_fdp, int *backup_fdp) +{ + int stable_fd, backup_fd = -1, ret; + struct stat st, backup_st; + + /* Open and stat the stable restart file. */ + stable_fd = open(NFSD_STABLERESTART, O_RDWR, 0); + if (stable_fd < 0) + stable_fd = open(NFSD_STABLERESTART, O_RDWR | O_CREAT, 0600); + if (stable_fd >= 0) { + ret = fstat(stable_fd, &st); + if (ret < 0) { + close(stable_fd); + stable_fd = -1; + } + } + + /* Open and stat the backup stable restart file. */ + if (stable_fd >= 0) { + backup_fd = open(NFSD_STABLEBACKUP, O_RDWR, 0); + if (backup_fd < 0) + backup_fd = open(NFSD_STABLEBACKUP, O_RDWR | O_CREAT, + 0600); + if (backup_fd >= 0) { + ret = fstat(backup_fd, &backup_st); + if (ret < 0) { + close(backup_fd); + backup_fd = -1; + } + } + if (backup_fd < 0) { + close(stable_fd); + stable_fd = -1; + } + } + + *stable_fdp = stable_fd; + *backup_fdp = backup_fd; + if (stable_fd < 0) + return; + + /* Sync up the 2 files, as required. */ + if (st.st_size > 0) + copy_stable(stable_fd, backup_fd); + else if (backup_st.st_size > 0) + copy_stable(backup_fd, stable_fd); +} + +/* + * Copy the stable restart file to the backup or vice versa. + */ +void +copy_stable(int from_fd, int to_fd) +{ + int cnt, ret; + static char buf[1024]; + + ret = lseek(from_fd, (off_t)0, SEEK_SET); + if (ret >= 0) + ret = lseek(to_fd, (off_t)0, SEEK_SET); + if (ret >= 0) + ret = ftruncate(to_fd, (off_t)0); + if (ret >= 0) + do { + cnt = read(from_fd, buf, 1024); + if (cnt > 0) + ret = write(to_fd, buf, cnt); + else if (cnt < 0) + ret = cnt; + } while (cnt > 0 && ret >= 0); + if (ret >= 0) + ret = fsync(to_fd); + if (ret < 0) + syslog(LOG_ERR, "stable restart copy failure: %m"); +} + +/* + * Back up the stable restart file when indicated by the kernel. + */ +void +backup_stable(__unused int signo) +{ + + if (stablefd >= 0) + copy_stable(stablefd, backupfd); +} + From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 21:27:29 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3E891065672; Sun, 24 Apr 2011 21:27:29 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 93B6D8FC15; Sun, 24 Apr 2011 21:27:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3OLRTDc047812; Sun, 24 Apr 2011 21:27:29 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3OLRTTL047810; Sun, 24 Apr 2011 21:27:29 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201104242127.p3OLRTTL047810@svn.freebsd.org> From: Rick Macklem Date: Sun, 24 Apr 2011 21:27:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220999 - stable/8/lib/libc/rpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2011 21:27:29 -0000 Author: rmacklem Date: Sun Apr 24 21:27:29 2011 New Revision: 220999 URL: http://svn.freebsd.org/changeset/base/220999 Log: MFC: r220519 Fix a bug in the userland rpc library, where it would use a negative return value from write to update its position in a buffer. The patch, courtesy of Andrey Simonenko, also simplifies a conditional by removing the "i != cnt" clause, since it is always true at this point in the code. The bug caused problems for mountd, when it generated a large reply to an exports RPC request. Modified: stable/8/lib/libc/rpc/svc_vc.c Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/rpc/svc_vc.c ============================================================================== --- stable/8/lib/libc/rpc/svc_vc.c Sun Apr 24 19:50:13 2011 (r220998) +++ stable/8/lib/libc/rpc/svc_vc.c Sun Apr 24 21:27:29 2011 (r220999) @@ -546,7 +546,7 @@ write_vc(xprtp, buf, len) cd->strm_stat = XPRT_DIED; return (-1); } - if (cd->nonblock && i != cnt) { + if (cd->nonblock) { /* * For non-blocking connections, do not * take more than 2 seconds writing the @@ -560,6 +560,7 @@ write_vc(xprtp, buf, len) return (-1); } } + i = 0; } } From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 22:12:01 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2DA9E106564A; Sun, 24 Apr 2011 22:12:01 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1E14E8FC12; Sun, 24 Apr 2011 22:12:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3OMC1IK049167; Sun, 24 Apr 2011 22:12:01 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3OMC0AK049165; Sun, 24 Apr 2011 22:12:00 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201104242212.p3OMC0AK049165@svn.freebsd.org> From: Rick Macklem Date: Sun, 24 Apr 2011 22:12:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221000 - stable/7/lib/libc/rpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2011 22:12:01 -0000 Author: rmacklem Date: Sun Apr 24 22:12:00 2011 New Revision: 221000 URL: http://svn.freebsd.org/changeset/base/221000 Log: MFC: r220519 Fix a bug in the userland rpc library, where it would use a negative return value from write to update its position in a buffer. The patch, courtesy of Andrey Simonenko, also simplifies a conditional by removing the "i != cnt" clause, since it is always true at this point in the code. The bug caused problems for mountd, when it generated a large reply to an exports RPC request. Modified: stable/7/lib/libc/rpc/svc_vc.c Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) Modified: stable/7/lib/libc/rpc/svc_vc.c ============================================================================== --- stable/7/lib/libc/rpc/svc_vc.c Sun Apr 24 21:27:29 2011 (r220999) +++ stable/7/lib/libc/rpc/svc_vc.c Sun Apr 24 22:12:00 2011 (r221000) @@ -550,7 +550,7 @@ write_vc(xprtp, buf, len) cd->strm_stat = XPRT_DIED; return (-1); } - if (cd->nonblock && i != cnt) { + if (cd->nonblock) { /* * For non-blocking connections, do not * take more than 2 seconds writing the @@ -564,6 +564,7 @@ write_vc(xprtp, buf, len) return (-1); } } + i = 0; } } From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 22:18:41 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8BCEC1065672; Sun, 24 Apr 2011 22:18:41 +0000 (UTC) (envelope-from mack@macktronics.com) Received: from coco.macktronics.com (coco.macktronics.com [209.181.253.65]) by mx1.freebsd.org (Postfix) with ESMTP id 64E278FC14; Sun, 24 Apr 2011 22:18:41 +0000 (UTC) Received: from coco.macktronics.com (coco.macktronics.com [209.181.253.65]) by coco.macktronics.com (Postfix) with ESMTP id 964164AC40; Sun, 24 Apr 2011 17:18:40 -0500 (CDT) Date: Sun, 24 Apr 2011 17:18:40 -0500 (CDT) From: Dan Mack To: Pawel Jakub Dawidek In-Reply-To: <20110424131804.GB1872@garage.freebsd.pl> Message-ID: <20110424171704.L2449@coco.macktronics.com> References: <201104240923.p3O9N8QG025386@svn.freebsd.org> <20110424095736.GA92492@freebsd.org> <20110424051747.S1757@coco.macktronics.com> <20110424131804.GB1872@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, Alexander Best , Alexander Motin , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r220983 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2011 22:18:41 -0000 On Sun, 24 Apr 2011, Pawel Jakub Dawidek wrote: > On Sun, Apr 24, 2011 at 05:25:00AM -0500, Dan Mack wrote: >> For those of us using a ZFS root pool built out of /dev/gpt/ >> devices, will these automagically pick up the new names? > > Even if you use adX devices in your ZFS pool and they will suddenly > change to adaY, ZFS should detect this properly and no manual > intervention should be needed. Yep, confirmed. My boot zroot RAID10 pool previously built from ad4, ad6, ad8, ad10 worked without a hitch with the new enumeration scheme: borg# gpart status Name Status Components ada0p1 OK ada0 ada0p2 OK ada0 ada0p3 OK ada0 ada1p1 OK ada1 ada1p2 OK ada1 ada1p3 OK ada1 ada2p1 OK ada2 ada2p2 OK ada2 ada2p3 OK ada2 ada3p1 OK ada3 ada3p2 OK ada3 ada3p3 OK ada3 borg# zpool status pool: zroot state: ONLINE scan: none requested config: NAME STATE READ WRITE CKSUM zroot ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 gpt/disk0 ONLINE 0 0 0 gpt/disk1 ONLINE 0 0 0 mirror-1 ONLINE 0 0 0 gpt/disk2 ONLINE 0 0 0 gpt/disk3 ONLINE 0 0 0 From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 23:04:10 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B88E106564A; Sun, 24 Apr 2011 23:04:09 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 507908FC0A; Sun, 24 Apr 2011 23:04:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3ON49J7050833; Sun, 24 Apr 2011 23:04:09 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3ON49Xf050829; Sun, 24 Apr 2011 23:04:09 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201104242304.p3ON49Xf050829@svn.freebsd.org> From: Rick Macklem Date: Sun, 24 Apr 2011 23:04:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221002 - in stable/8/sys/fs: nfs nfsserver X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2011 23:04:10 -0000 Author: rmacklem Date: Sun Apr 24 23:04:08 2011 New Revision: 221002 URL: http://svn.freebsd.org/changeset/base/221002 Log: MFC: r220530 Add some cleanup code to the module unload operation for the experimental NFS server, so that it doesn't leak memory when unloaded. However, unloading the NFSv4 server is not recommended, since all NFSv4 state will be lost by the unload and clients will have to recover the state after a server reload/restart as if the server crashed/rebooted. Modified: stable/8/sys/fs/nfs/nfs_var.h stable/8/sys/fs/nfsserver/nfs_nfsdport.c stable/8/sys/fs/nfsserver/nfs_nfsdstate.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/fs/nfs/nfs_var.h ============================================================================== --- stable/8/sys/fs/nfs/nfs_var.h Sun Apr 24 22:28:26 2011 (r221001) +++ stable/8/sys/fs/nfs/nfs_var.h Sun Apr 24 23:04:08 2011 (r221002) @@ -124,6 +124,7 @@ int nfsrv_checkgetattr(struct nfsrv_desc struct nfsvattr *, nfsattrbit_t *, struct ucred *, NFSPROC_T *); int nfsrv_nfsuserdport(u_short, NFSPROC_T *); void nfsrv_nfsuserddelport(void); +void nfsrv_throwawayallstate(NFSPROC_T *); /* nfs_nfsdserv.c */ int nfsrvd_access(struct nfsrv_descript *, int, Modified: stable/8/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- stable/8/sys/fs/nfsserver/nfs_nfsdport.c Sun Apr 24 22:28:26 2011 (r221001) +++ stable/8/sys/fs/nfsserver/nfs_nfsdport.c Sun Apr 24 23:04:08 2011 (r221002) @@ -52,6 +52,7 @@ extern int newnfs_numnfsd; extern struct mount nfsv4root_mnt; extern struct nfsrv_stablefirst nfsrv_stablefirst; extern void (*nfsd_call_servertimer)(void); +extern SVCPOOL *nfsrvd_pool; struct vfsoptlist nfsv4root_opt, nfsv4root_newopt; NFSDLOCKMUTEX; struct mtx nfs_cache_mutex; @@ -3122,9 +3123,16 @@ nfsd_modevent(module_t mod, int type, vo nfsd_call_servertimer = NULL; nfsd_call_nfsd = NULL; + /* Clean out all NFSv4 state. */ + nfsrv_throwawayallstate(curthread); + /* Clean the NFS server reply cache */ nfsrvd_cleancache(); + /* Free up the krpc server pool. */ + if (nfsrvd_pool != NULL) + svcpool_destroy(nfsrvd_pool); + /* and get rid of the locks */ mtx_destroy(&nfs_cache_mutex); mtx_destroy(&nfs_v4root_mutex); Modified: stable/8/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- stable/8/sys/fs/nfsserver/nfs_nfsdstate.c Sun Apr 24 22:28:26 2011 (r221001) +++ stable/8/sys/fs/nfsserver/nfs_nfsdstate.c Sun Apr 24 23:04:08 2011 (r221002) @@ -5194,3 +5194,37 @@ nfsrv_unlocklf(struct nfslockfile *lfp) nfsv4_unlock(&lfp->lf_locallock_lck, 0); } +/* + * Clear out all state for the NFSv4 server. + * Must be called by a thread that can sleep when no nfsds are running. + */ +void +nfsrv_throwawayallstate(NFSPROC_T *p) +{ + struct nfsclient *clp, *nclp; + struct nfslockfile *lfp, *nlfp; + int i; + + /* + * For each client, clean out the state and then free the structure. + */ + for (i = 0; i < NFSCLIENTHASHSIZE; i++) { + LIST_FOREACH_SAFE(clp, &nfsclienthash[i], lc_hash, nclp) { + nfsrv_cleanclient(clp, p); + nfsrv_freedeleglist(&clp->lc_deleg); + nfsrv_freedeleglist(&clp->lc_olddeleg); + free(clp, M_NFSDCLIENT); + } + } + + /* + * Also, free up any remaining lock file structures. + */ + for (i = 0; i < NFSLOCKHASHSIZE; i++) { + LIST_FOREACH_SAFE(lfp, &nfslockhash[i], lf_hash, nlfp) { + printf("nfsd unload: fnd a lock file struct\n"); + nfsrv_freenfslockfile(lfp); + } + } +} + From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 04:33:14 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05B2F106566B; Mon, 25 Apr 2011 04:33:14 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CB6D48FC0C; Mon, 25 Apr 2011 04:33:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3P4XDjN060582; Mon, 25 Apr 2011 04:33:13 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3P4XDnG060580; Mon, 25 Apr 2011 04:33:13 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201104250433.p3P4XDnG060580@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Mon, 25 Apr 2011 04:33:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221003 - stable/8/sys/netgraph X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2011 04:33:14 -0000 Author: ae Date: Mon Apr 25 04:33:13 2011 New Revision: 221003 URL: http://svn.freebsd.org/changeset/base/221003 Log: MFC r220767: Use M_WAITOK flag instead M_WAIT for malloc. Suggested by: glebius Modified: stable/8/sys/netgraph/ng_patch.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/netgraph/ng_patch.c ============================================================================== --- stable/8/sys/netgraph/ng_patch.c Sun Apr 24 23:04:08 2011 (r221002) +++ stable/8/sys/netgraph/ng_patch.c Mon Apr 25 04:33:13 2011 (r221003) @@ -165,7 +165,7 @@ ng_patch_constructor(node_p node) { priv_p privdata; - privdata = malloc(sizeof(*privdata), M_NETGRAPH, M_WAIT | M_ZERO); + privdata = malloc(sizeof(*privdata), M_NETGRAPH, M_WAITOK | M_ZERO); NG_NODE_SET_PRIVATE(node, privdata); privdata->in = NULL; privdata->out = NULL; @@ -208,7 +208,8 @@ ng_patch_rcvmsg(node_p node, item_p item if (privp->config == NULL) break; NG_MKRESPONSE(resp, msg, - NG_PATCH_CONF_SIZE(privp->config->count), M_WAIT); + NG_PATCH_CONF_SIZE(privp->config->count), + M_WAITOK); bcopy(privp->config, resp->data, NG_PATCH_CONF_SIZE(privp->config->count)); break; @@ -248,10 +249,10 @@ ng_patch_rcvmsg(node_p node, item_p item if (error == 0) { newconf = malloc( NG_PATCH_CONF_SIZE(conf->count), - M_NETGRAPH, M_WAIT); + M_NETGRAPH, M_WAITOK); newval = malloc(conf->count * sizeof(union patch_val), M_NETGRAPH, - M_WAIT); + M_WAITOK); for(i = 0; i < conf->count; i++) { switch (conf->ops[i].length) { case 1: @@ -288,7 +289,7 @@ ng_patch_rcvmsg(node_p node, item_p item /* FALLTHROUGH */ case NGM_PATCH_GET_STATS: NG_MKRESPONSE(resp, msg, sizeof(struct ng_patch_stats), - M_WAIT); + M_WAITOK); bcopy(&(privp->stats), resp->data, sizeof(struct ng_patch_stats)); if (clear == 0) From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 04:33:43 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E105106566B; Mon, 25 Apr 2011 04:33:43 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D5DF48FC15; Mon, 25 Apr 2011 04:33:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3P4Xg3T060630; Mon, 25 Apr 2011 04:33:42 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3P4XgwU060628; Mon, 25 Apr 2011 04:33:42 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201104250433.p3P4XgwU060628@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Mon, 25 Apr 2011 04:33:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221004 - stable/7/sys/netgraph X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2011 04:33:43 -0000 Author: ae Date: Mon Apr 25 04:33:42 2011 New Revision: 221004 URL: http://svn.freebsd.org/changeset/base/221004 Log: MFC r220767: Use M_WAITOK flag instead M_WAIT for malloc. Suggested by: glebius Modified: stable/7/sys/netgraph/ng_patch.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/netgraph/ng_patch.c ============================================================================== --- stable/7/sys/netgraph/ng_patch.c Mon Apr 25 04:33:13 2011 (r221003) +++ stable/7/sys/netgraph/ng_patch.c Mon Apr 25 04:33:42 2011 (r221004) @@ -165,7 +165,7 @@ ng_patch_constructor(node_p node) { priv_p privdata; - privdata = malloc(sizeof(*privdata), M_NETGRAPH, M_WAIT | M_ZERO); + privdata = malloc(sizeof(*privdata), M_NETGRAPH, M_WAITOK | M_ZERO); NG_NODE_SET_PRIVATE(node, privdata); privdata->in = NULL; privdata->out = NULL; @@ -208,7 +208,8 @@ ng_patch_rcvmsg(node_p node, item_p item if (privp->config == NULL) break; NG_MKRESPONSE(resp, msg, - NG_PATCH_CONF_SIZE(privp->config->count), M_WAIT); + NG_PATCH_CONF_SIZE(privp->config->count), + M_WAITOK); bcopy(privp->config, resp->data, NG_PATCH_CONF_SIZE(privp->config->count)); break; @@ -248,10 +249,10 @@ ng_patch_rcvmsg(node_p node, item_p item if (error == 0) { newconf = malloc( NG_PATCH_CONF_SIZE(conf->count), - M_NETGRAPH, M_WAIT); + M_NETGRAPH, M_WAITOK); newval = malloc(conf->count * sizeof(union patch_val), M_NETGRAPH, - M_WAIT); + M_WAITOK); for(i = 0; i < conf->count; i++) { switch (conf->ops[i].length) { case 1: @@ -288,7 +289,7 @@ ng_patch_rcvmsg(node_p node, item_p item /* FALLTHROUGH */ case NGM_PATCH_GET_STATS: NG_MKRESPONSE(resp, msg, sizeof(struct ng_patch_stats), - M_WAIT); + M_WAITOK); bcopy(&(privp->stats), resp->data, sizeof(struct ng_patch_stats)); if (clear == 0) From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 04:55:51 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B875106564A; Mon, 25 Apr 2011 04:55:51 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 38BA38FC12; Mon, 25 Apr 2011 04:55:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3P4tp8J061350; Mon, 25 Apr 2011 04:55:51 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3P4tp4f061348; Mon, 25 Apr 2011 04:55:51 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201104250455.p3P4tp4f061348@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 25 Apr 2011 04:55:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221005 - head/sys/dev/msk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2011 04:55:51 -0000 Author: glebius Date: Mon Apr 25 04:55:50 2011 New Revision: 221005 URL: http://svn.freebsd.org/changeset/base/221005 Log: When msk_detach() is called from msk_attach(), ifp may be yet not initialized. Modified: head/sys/dev/msk/if_msk.c Modified: head/sys/dev/msk/if_msk.c ============================================================================== --- head/sys/dev/msk/if_msk.c Mon Apr 25 04:33:42 2011 (r221004) +++ head/sys/dev/msk/if_msk.c Mon Apr 25 04:55:50 2011 (r221005) @@ -1964,7 +1964,8 @@ msk_detach(device_t dev) /* Can't hold locks while calling detach. */ MSK_IF_UNLOCK(sc_if); callout_drain(&sc_if->msk_tick_ch); - ether_ifdetach(ifp); + if (ifp) + ether_ifdetach(ifp); MSK_IF_LOCK(sc_if); } From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 05:00:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 65BBD1065670; Mon, 25 Apr 2011 05:00:55 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 0191A8FC0C; Mon, 25 Apr 2011 05:00:54 +0000 (UTC) Received: from 63.imp.bsdimp.com (63.imp.bsdimp.com [10.0.0.63]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p3P4tfRe015983 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Sun, 24 Apr 2011 22:55:45 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <18B3AE1E-467E-4B23-81B9-AB1EDEFE1F7A@gsoft.com.au> Date: Sun, 24 Apr 2011 22:55:41 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201104240923.p3O9N8QG025386@svn.freebsd.org> <20110424161933.GA18775@vniz.net> <18B3AE1E-467E-4B23-81B9-AB1EDEFE1F7A@gsoft.com.au> To: "Daniel O'Connor" X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Sun, 24 Apr 2011 22:55:45 -0600 (MDT) Cc: svn-src-head@freebsd.org, Alexander Motin , src-committers@freebsd.org, Andrey Chernov , svn-src-all@freebsd.org Subject: Re: svn commit: r220983 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2011 05:00:55 -0000 On Apr 24, 2011, at 11:34 AM, Daniel O'Connor wrote: >=20 > On 24/04/2011, at 18:19, Andrey Chernov wrote: >> On Sun, Apr 24, 2011 at 09:23:08AM +0000, Alexander Motin wrote: >>> ATA device names in /etc/fstab or other places, make sure to = update >>> them respectively (adX -> adaY, acdX -> cdY, afdX -> daY, astX = -> saY, >>> - where 'Y's are the sequential numbers for each type in order of >>> - detection, unless configured otherwise with tunables, see = cam(4)). >>> + where 'Y's are the sequential numbers starting from zero for = each type >>> + in order of detection, unless configured otherwise with = tunables, >>> + see cam(4)). >>=20 >> Is there any way to guess resulting 'Y' numbers _before_ booting new=20= >> kernel? I have remote machine with console access almost impossible = (very=20 >> hard for me). >>=20 >> It seems something like >> vfs.root.mountfrom=3D"ufs:/dev/ada0s1a ufs:/dev/ada1s1a ..." >> (up to max channels) helps to find root, but what about other mounted=20= >> disks? >=20 > The best way is to change to use GPT IDs (/dev/gptid/xxx) if you are = on a GPT system) or UFS IDs (/dev/ufsid/xxx) if you can't. I've been running with ufs labels for a couple of years now, since the = first rumblings of this hit the streets. They work great no matter what = the underlying partitioning scheme. The one drawback is that if you = have multiple disks with the same labels, then the first one wins. = Normally not a problem, but when you have it, you need to ensure the = right one is selected. I avoid this problem by prefixing a hostname to = the label... > gpart list will show the GPTID (rawuuid) and dumpfs will show the UFS = ID. >=20 > The following shell snippet will generate the UFS ID for a given FS. >=20 > getfsid() { > line=3D`dumpfs 2> /dev/null $1 | head | grep superblock\ location` > if [ $? -ne 0 ]; then > return 1 > fi > # dumpfs doesn't print leading 0s > eval `echo $line | sed -nEe 's/superblock location.*id.*\[ (.*) (.*)\ = ]/printf %0x $((0x\1 << 32 | 0x\2))/p'` > } This is also good. Warner= From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 05:01:12 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A536A1065783; Mon, 25 Apr 2011 05:01:12 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 3286E8FC08; Mon, 25 Apr 2011 05:01:06 +0000 (UTC) Received: from 63.imp.bsdimp.com (63.imp.bsdimp.com [10.0.0.63]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p3P4xEGC015990 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Sun, 24 Apr 2011 22:59:15 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <4DB47CD4.9060300@FreeBSD.org> Date: Sun, 24 Apr 2011 22:59:14 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <54259D19-F41D-460A-9016-5189947A6887@bsdimp.com> References: <201104240858.p3O8wwqT024628@svn.freebsd.org> <4DB441B0.8020906@FreeBSD.org> <4DB47CD4.9060300@FreeBSD.org> To: Alexander Motin X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Sun, 24 Apr 2011 22:59:15 -0600 (MDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, "Bjoern A. Zeeb" , Robert Watson , src-committers@freebsd.org Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2011 05:01:12 -0000 Now that the horse is out of the barn, the following might be a little = late (unless we unpull the trigger for a month). But what if we warned that / was on a device name, and not on a 'named' = device. Complain if it was on /dev/da0, but not if it was on = /dev/ufs/fred-root. Users would see this warning and react. Next best thing: make installkernel check for devices on /dev/adX and = refuse to install the kernel if they are (unless REALLY_THIS_IS_RIGHT is = defined :). This won't help the binary upgrader, but will prevent massive = footshooting in the mean time. Warner On Apr 24, 2011, at 1:41 PM, Alexander Motin wrote: > On 24.04.2011 21:59, Bjoern A. Zeeb wrote: >>> What's about creating some kind of symlinks, it could be nice if it >>> worked, but I don't see the way to do it on disk(9) or GEOM layers >>> without breaking device's access counters and as result further = random >>> problems. >>=20 >> I had been pondering devfs "link"s myself, the problem is that from = the rc >> framework they come too late. If you can add a simple .ko that does = it >> programmatically on 9 that would be great. The problem is that after = booting >> the new kernel you don't know whether people had ATA_STATIC on or = not, so >> we'd have to go with the defaults, that were in 8.x (and an extra = tunable to >> flip the logic maybe)? >=20 > Devfs links won't help users with hardcoded provider names in gmirror, = etc -- from GEOM PoV there will be no such providers. Also to create = proper mapping that module should have real-time information from CAM = about ATA controller details. And looking that it will have to link in = real time any derivative providers also (ad4s1a -> ada0s1a) I worry if = it is possible at all. Some devfs expert needed here. >=20 >>> Looking now on these "do or revert" demands to keep old device = naming, >>> I'll try to make some hacks to CAM and ada(4) driver to mimic old = "adX" >>> names. I see it in form of some loader tunable, disabled by default = (as >>> it should be on newly installed systems), but that could be set = prior to >>> upgrade if user doesn't want to bother with device names at that = moment. >>> It should partially hide problem for some time. >>=20 >> It would need to be in and on by default for the lifetime of 9 as = it's not >> in the last 8.x release (which would need it the other way round = anyway. >> MIght it be a good idea to do that as well afterwards providing ada = links >> on the next 8.x release?). >=20 > I wouldn't like to keep that ugly numbering on by default till the 9.x = EoL even for new installations. Also remember about number of people = already using new ATA, for whom requirement to disable that tunable may = also be uncomfortable. >=20 >> The user could disable it after the conversion happened though with a = tunable >> to get rid of the extra /dev/* noise. We could even check for it = being on >> and check fstab and warn/pester the user then that he'll need to = migrate >> (on boot from rc.d, in weekly mails, ...). >=20 > It would be fine if it was just devfs noise, but I have some doubts = about it (above). >=20 >> If we have both information available (old from the kernel transition = code) >> and new we could even provide a script to do it. >>=20 >> The reason we might not want to do it automatically is that if the = user will >> decide to boot kernel.old because the new kernel panics after 2 days, = she'll >> be facing the new ada entries in fstab with an 8.x kernel and that = would not >> work either. So it's a decision users need to make eventually = themselves >> during the lifetime of 9.x when upgrading from an older release. >=20 > Reasonable. >=20 >>> Will such solution be acceptable? >>=20 >> I think any solution will be acceptable if it (mostly) works and gets = the >> possible fallout rate (significantly) down and thanks a lot for = picking it >> up now! >=20 > But that solution should not include setting tunables before = upgrading? Can't we teach mergemaster or whatever else to set it = depending on whet disks are now present in system? >=20 >> PS: And I think you'll find a lot of testers the next days/weeks on = current@ >> when people update their kernels and forgot to read UPDATING or fail = to >> do the conversion properly.;) >=20 > I can always say: "read UPDATING" (for log: I am not completely = serious here. :)). >=20 > --=20 > Alexander Motin >=20 >=20 From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 05:57:02 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 142E71065675; Mon, 25 Apr 2011 05:57:02 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DCB058FC14; Mon, 25 Apr 2011 05:57:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3P5v1SN063137; Mon, 25 Apr 2011 05:57:01 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3P5v1xP063136; Mon, 25 Apr 2011 05:57:01 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201104250557.p3P5v1xP063136@svn.freebsd.org> From: Doug Barton Date: Mon, 25 Apr 2011 05:57:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221006 - head/etc/rc.d X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2011 05:57:02 -0000 Author: dougb Date: Mon Apr 25 05:57:01 2011 New Revision: 221006 URL: http://svn.freebsd.org/changeset/base/221006 Log: Add svn:executable property Modified: Directory Properties: head/etc/rc.d/opensm (props changed) From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 06:03:22 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7FEFD106566B; Mon, 25 Apr 2011 06:03:22 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6E4D68FC15; Mon, 25 Apr 2011 06:03:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3P63MoW063370; Mon, 25 Apr 2011 06:03:22 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3P63MUe063368; Mon, 25 Apr 2011 06:03:22 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201104250603.p3P63MUe063368@svn.freebsd.org> From: Doug Barton Date: Mon, 25 Apr 2011 06:03:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221007 - head/etc/rc.d X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2011 06:03:22 -0000 Author: dougb Date: Mon Apr 25 06:03:22 2011 New Revision: 221007 URL: http://svn.freebsd.org/changeset/base/221007 Log: Create a function for the code from r192246 so that it can be used both times mount is called. Limit the automatic behavior to when AUTO is specified (as it is in etc/defaults/rc.conf) and for everything else take advantage of all of the goodness in checkyesno. Modified: head/etc/rc.d/tmp Modified: head/etc/rc.d/tmp ============================================================================== --- head/etc/rc.d/tmp Mon Apr 25 05:57:01 2011 (r221006) +++ head/etc/rc.d/tmp Mon Apr 25 06:03:22 2011 (r221007) @@ -37,20 +37,20 @@ stop_cmd=':' load_rc_config $name +mount_tmpmfs () +{ + if ! /bin/df /tmp | grep -q "^/dev/md[0-9]"; then + mount_md ${tmpsize} /tmp "${tmpmfs_flags}" + chmod 01777 /tmp + fi +} + # If we do not have a writable /tmp, create a memory # filesystem for /tmp. If /tmp is a symlink (e.g. to /var/tmp, # then it should already be writable). # case "${tmpmfs}" in -[Yy][Ee][Ss]) - if ! /bin/df /tmp | grep -q "^/dev/md[0-9]"; then - mount_md ${tmpsize} /tmp "${tmpmfs_flags}" - chmod 01777 /tmp - fi - ;; -[Nn][Oo]) - ;; -*) +[Aa][Uu][Tt][Oo]) if _tmpdir=$(mktemp -d -q /tmp/.diskless.XXXXXX); then rmdir ${_tmpdir} else @@ -59,9 +59,13 @@ case "${tmpmfs}" in echo "dropping into shell, ^D to continue anyway." /bin/sh else - mount_md ${tmpsize} /tmp "${tmpmfs_flags}" - chmod 01777 /tmp + mount_tmpmfs fi fi ;; +*) + if checkyesno tmpmfs; then + mount_tmpmfs + fi + ;; esac From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 06:36:27 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 426EE1065670; Mon, 25 Apr 2011 06:36:27 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 24A738FC16; Mon, 25 Apr 2011 06:36:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3P6aRql064400; Mon, 25 Apr 2011 06:36:27 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3P6aRuU064397; Mon, 25 Apr 2011 06:36:27 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201104250636.p3P6aRuU064397@svn.freebsd.org> From: Sergey Kandaurov Date: Mon, 25 Apr 2011 06:36:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221008 - in stable/8: lib/libc/sys sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2011 06:36:27 -0000 Author: pluknet Date: Mon Apr 25 06:36:26 2011 New Revision: 221008 URL: http://svn.freebsd.org/changeset/base/221008 Log: MFC r218989: Remove no more useful sysctl vm.max_proc_mmap, which also fixes mmap(2) overflow seen with over 256GB of physical memory installed. Modified: stable/8/lib/libc/sys/mmap.2 stable/8/sys/vm/vm_mmap.c Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/lib/libc/sys/mmap.2 ============================================================================== --- stable/8/lib/libc/sys/mmap.2 Mon Apr 25 06:03:22 2011 (r221007) +++ stable/8/lib/libc/sys/mmap.2 Mon Apr 25 06:36:26 2011 (r221008) @@ -329,9 +329,6 @@ was specified and the argument was not available. .Dv MAP_ANON was specified and insufficient memory was available. -The system has reached the per-process mmap limit specified in the -.Va vm.max_proc_mmap -sysctl. .El .Sh SEE ALSO .Xr madvise 2 , Modified: stable/8/sys/vm/vm_mmap.c ============================================================================== --- stable/8/sys/vm/vm_mmap.c Mon Apr 25 06:03:22 2011 (r221007) +++ stable/8/sys/vm/vm_mmap.c Mon Apr 25 06:36:26 2011 (r221008) @@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include @@ -66,7 +65,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include @@ -80,7 +78,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #ifdef HWPMC_HOOKS #include @@ -92,30 +89,6 @@ struct sbrk_args { }; #endif -static int max_proc_mmap; -SYSCTL_INT(_vm, OID_AUTO, max_proc_mmap, CTLFLAG_RW, &max_proc_mmap, 0, - "Maximum number of memory-mapped files per process"); - -/* - * Set the maximum number of vm_map_entry structures per process. Roughly - * speaking vm_map_entry structures are tiny, so allowing them to eat 1/100 - * of our KVM malloc space still results in generous limits. We want a - * default that is good enough to prevent the kernel running out of resources - * if attacked from compromised user account but generous enough such that - * multi-threaded processes are not unduly inconvenienced. - */ -static void vmmapentry_rsrc_init(void *); -SYSINIT(vmmersrc, SI_SUB_KVM_RSRC, SI_ORDER_FIRST, vmmapentry_rsrc_init, - NULL); - -static void -vmmapentry_rsrc_init(dummy) - void *dummy; -{ - max_proc_mmap = vm_kmem_size / sizeof(struct vm_map_entry); - max_proc_mmap /= 100; -} - static int vm_mmap_vnode(struct thread *, vm_size_t, vm_prot_t, vm_prot_t *, int *, struct vnode *, vm_ooffset_t *, vm_object_t *); static int vm_mmap_cdev(struct thread *, vm_size_t, vm_prot_t, vm_prot_t *, @@ -375,18 +348,6 @@ mmap(td, uap) handle_type = OBJT_VNODE; } map: - - /* - * Do not allow more then a certain number of vm_map_entry structures - * per process. Scale with the number of rforks sharing the map - * to make the limit reasonable for threads. - */ - if (max_proc_mmap && - vms->vm_map.nentries >= max_proc_mmap * vms->vm_refcnt) { - error = ENOMEM; - goto done; - } - td->td_fpop = fp; error = vm_mmap(&vms->vm_map, &addr, size, prot, maxprot, flags, handle_type, handle, pos); From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 06:53:16 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F630106564A; Mon, 25 Apr 2011 06:53:16 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (unknown [IPv6:2001:44b8:7c07:5581:266:e1ff:fe0c:8f16]) by mx1.freebsd.org (Postfix) with ESMTP id 764998FC16; Mon, 25 Apr 2011 06:53:15 +0000 (UTC) Received: from [192.168.1.9] (cm-84.215.40.84.getinternet.no [84.215.40.84]) (authenticated bits=0) by cain.gsoft.com.au (8.14.4/8.14.3) with ESMTP id p3P6qrpw092254 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Mon, 25 Apr 2011 16:22:55 +0930 (CST) (envelope-from doconnor@gsoft.com.au) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Daniel O'Connor" In-Reply-To: Date: Mon, 25 Apr 2011 08:52:51 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <34A34338-79E0-435E-9BF1-614D10FC9FC7@gsoft.com.au> References: <201104240923.p3O9N8QG025386@svn.freebsd.org> <20110424161933.GA18775@vniz.net> <18B3AE1E-467E-4B23-81B9-AB1EDEFE1F7A@gsoft.com.au> To: Warner Losh X-Mailer: Apple Mail (2.1084) X-Spam-Score: 0.163 () BAYES_00,RDNS_DYNAMIC X-Scanned-By: MIMEDefang 2.67 on 203.31.81.10 Cc: svn-src-head@freebsd.org, Alexander Motin , src-committers@freebsd.org, Andrey Chernov , svn-src-all@freebsd.org Subject: Re: svn commit: r220983 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2011 06:53:16 -0000 On 25/04/2011, at 6:55, Warner Losh wrote: >> The best way is to change to use GPT IDs (/dev/gptid/xxx) if you are = on a GPT system) or UFS IDs (/dev/ufsid/xxx) if you can't. >=20 > I've been running with ufs labels for a couple of years now, since the = first rumblings of this hit the streets. They work great no matter what = the underlying partitioning scheme. The one drawback is that if you = have multiple disks with the same labels, then the first one wins. = Normally not a problem, but when you have it, you need to ensure the = right one is selected. I avoid this problem by prefixing a hostname to = the label... This is why I prefer IDs since they are nominally unique (UFS ones, GPTs = damn well better be :) Although I concede it is rather annoying to work out which is which, or = type them out manually.. -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 09:00:52 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC05F106566B; Mon, 25 Apr 2011 09:00:52 +0000 (UTC) (envelope-from ticso@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BA6BF8FC0A; Mon, 25 Apr 2011 09:00:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3P90qeH068664; Mon, 25 Apr 2011 09:00:52 GMT (envelope-from ticso@svn.freebsd.org) Received: (from ticso@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3P90qXr068662; Mon, 25 Apr 2011 09:00:52 GMT (envelope-from ticso@svn.freebsd.org) Message-Id: <201104250900.p3P90qXr068662@svn.freebsd.org> From: Bernd Walter Date: Mon, 25 Apr 2011 09:00:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221009 - head/sys/netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2011 09:00:52 -0000 Author: ticso Date: Mon Apr 25 09:00:52 2011 New Revision: 221009 URL: http://svn.freebsd.org/changeset/base/221009 Log: correct variable type name in comment Modified: head/sys/netinet6/in6.h Modified: head/sys/netinet6/in6.h ============================================================================== --- head/sys/netinet6/in6.h Mon Apr 25 06:36:26 2011 (r221008) +++ head/sys/netinet6/in6.h Mon Apr 25 09:00:52 2011 (r221009) @@ -397,8 +397,8 @@ struct route_in6 { #define IPV6_MULTICAST_IF 9 /* u_int; set/get IP6 multicast i/f */ #define IPV6_MULTICAST_HOPS 10 /* int; set/get IP6 multicast hops */ #define IPV6_MULTICAST_LOOP 11 /* u_int; set/get IP6 multicast loopback */ -#define IPV6_JOIN_GROUP 12 /* ip6_mreq; join a group membership */ -#define IPV6_LEAVE_GROUP 13 /* ip6_mreq; leave a group membership */ +#define IPV6_JOIN_GROUP 12 /* ipv6_mreq; join a group membership */ +#define IPV6_LEAVE_GROUP 13 /* ipv6_mreq; leave a group membership */ #define IPV6_PORTRANGE 14 /* int; range to choose for unspec port */ #define ICMP6_FILTER 18 /* icmp6_filter; icmp6 filter */ /* RFC2292 options */ From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 09:18:05 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E6744106566B; Mon, 25 Apr 2011 09:18:05 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D4A5F8FC08; Mon, 25 Apr 2011 09:18:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3P9I5We069192; Mon, 25 Apr 2011 09:18:05 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3P9I5EY069190; Mon, 25 Apr 2011 09:18:05 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201104250918.p3P9I5EY069190@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Mon, 25 Apr 2011 09:18:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221010 - head/sys/dev/ichwd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2011 09:18:06 -0000 Author: des Date: Mon Apr 25 09:18:05 2011 New Revision: 221010 URL: http://svn.freebsd.org/changeset/base/221010 Log: Whitespace nit Modified: head/sys/dev/ichwd/ichwd.c Modified: head/sys/dev/ichwd/ichwd.c ============================================================================== --- head/sys/dev/ichwd/ichwd.c Mon Apr 25 09:00:52 2011 (r221009) +++ head/sys/dev/ichwd/ichwd.c Mon Apr 25 09:18:05 2011 (r221010) @@ -228,8 +228,8 @@ ichwd_sts_reset(struct ichwd_softc *sc) * by writing a 1, not a 0. */ ichwd_write_tco_2(sc, TCO1_STS, TCO_TIMEOUT); - /* - * According to Intel's docs, clearing SECOND_TO_STS and BOOT_STS must + /* + * According to Intel's docs, clearing SECOND_TO_STS and BOOT_STS must * be done in two separate operations. */ ichwd_write_tco_2(sc, TCO2_STS, TCO_SECOND_TO_STS); From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 10:08:35 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 03498106566B; Mon, 25 Apr 2011 10:08:35 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E5A688FC0A; Mon, 25 Apr 2011 10:08:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3PA8YKA070779; Mon, 25 Apr 2011 10:08:34 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3PA8Y7E070777; Mon, 25 Apr 2011 10:08:34 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201104251008.p3PA8Y7E070777@svn.freebsd.org> From: Jilles Tjoelker Date: Mon, 25 Apr 2011 10:08:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221011 - head/bin/sh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2011 10:08:35 -0000 Author: jilles Date: Mon Apr 25 10:08:34 2011 New Revision: 221011 URL: http://svn.freebsd.org/changeset/base/221011 Log: sh: Remove duplicate code resetting uid/gid for set +p/+o privileged. MFC after: 1 week Modified: head/bin/sh/options.c Modified: head/bin/sh/options.c ============================================================================== --- head/bin/sh/options.c Mon Apr 25 09:18:05 2011 (r221010) +++ head/bin/sh/options.c Mon Apr 25 10:08:34 2011 (r221011) @@ -198,13 +198,8 @@ options(int cmdline) minus_o(*argptr, val); if (*argptr) argptr++; - } else { - if (c == 'p' && !val && privileged) { - (void) setuid(getuid()); - (void) setgid(getgid()); - } + } else setoption(c, val); - } } } return; @@ -271,10 +266,6 @@ minus_o(char *name, int val) } else { for (i = 0; i < NOPTS; i++) if (equal(name, optlist[i].name)) { - if (!val && privileged && equal(name, "privileged")) { - (void) setuid(getuid()); - (void) setgid(getgid()); - } setoption(optlist[i].letter, val); return; } @@ -288,6 +279,10 @@ setoption(int flag, int val) { int i; + if (flag == 'p' && !val && privileged) { + (void) setuid(getuid()); + (void) setgid(getgid()); + } for (i = 0; i < NOPTS; i++) if (optlist[i].letter == flag) { optlist[i].val = val; From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 10:14:30 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 094EA106564A; Mon, 25 Apr 2011 10:14:30 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EBC4C8FC08; Mon, 25 Apr 2011 10:14:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3PAEThV070988; Mon, 25 Apr 2011 10:14:29 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3PAETAM070986; Mon, 25 Apr 2011 10:14:29 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201104251014.p3PAETAM070986@svn.freebsd.org> From: Jilles Tjoelker Date: Mon, 25 Apr 2011 10:14:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221012 - head/bin/sh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2011 10:14:30 -0000 Author: jilles Date: Mon Apr 25 10:14:29 2011 New Revision: 221012 URL: http://svn.freebsd.org/changeset/base/221012 Log: sh: Check setuid()/setgid() return values. If the -p option is turned off, privileges from a setuid or setgid binary are dropped. Make sure to check if this succeeds. If it fails, this is an error which will cause the shell to abort except in interactive mode or if 'command' was used to make 'set' or an outer 'eval' or '.' non-special. Note that taking advantage of this feature and writing setuid shell scripts seems unwise. MFC after: 1 week Modified: head/bin/sh/options.c Modified: head/bin/sh/options.c ============================================================================== --- head/bin/sh/options.c Mon Apr 25 10:08:34 2011 (r221011) +++ head/bin/sh/options.c Mon Apr 25 10:14:29 2011 (r221012) @@ -280,8 +280,10 @@ setoption(int flag, int val) int i; if (flag == 'p' && !val && privileged) { - (void) setuid(getuid()); - (void) setgid(getgid()); + if (setgid(getgid()) == -1) + error("setgid"); + if (setuid(getuid()) == -1) + error("setuid"); } for (i = 0; i < NOPTS; i++) if (optlist[i].letter == flag) { From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 12:36:29 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C7216106566C; Mon, 25 Apr 2011 12:36:29 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B683B8FC14; Mon, 25 Apr 2011 12:36:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3PCaTgw076479; Mon, 25 Apr 2011 12:36:29 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3PCaTYb076477; Mon, 25 Apr 2011 12:36:29 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201104251236.p3PCaTYb076477@svn.freebsd.org> From: Jilles Tjoelker Date: Mon, 25 Apr 2011 12:36:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221013 - head/usr.bin/printf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2011 12:36:29 -0000 Author: jilles Date: Mon Apr 25 12:36:29 2011 New Revision: 221013 URL: http://svn.freebsd.org/changeset/base/221013 Log: printf(1): Mention effect of '#' modifier on other conversions. Modified: head/usr.bin/printf/printf.1 Modified: head/usr.bin/printf/printf.1 ============================================================================== --- head/usr.bin/printf/printf.1 Mon Apr 25 10:14:29 2011 (r221012) +++ head/usr.bin/printf/printf.1 Mon Apr 25 12:36:29 2011 (r221013) @@ -31,7 +31,7 @@ .\" @(#)printf.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd November 19, 2010 +.Dd April 25, 2011 .Dt PRINTF 1 .Os .Sh NAME @@ -125,9 +125,9 @@ in the following order: A `#' character specifying that the value should be printed in an ``alternate form''. For -.Cm c , d , +.Cm b , c , d , s and -.Cm s , +.Cm u formats, this option has no effect. For the .Cm o @@ -141,9 +141,9 @@ format, a non-zero result has the string .Pq Li 0X prepended to it. For -.Cm e , E , f , g , +.Cm a , A , e , E , f , F , g and -.Cm G , +.Cm G formats, the result will always contain a decimal point, even if no digits follow the point (normally, a decimal point only appears in the results of those formats if a digit follows the decimal point). From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 13:09:33 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 058B01065670; Mon, 25 Apr 2011 13:09:33 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E835F8FC23; Mon, 25 Apr 2011 13:09:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3PD9WsM077436; Mon, 25 Apr 2011 13:09:32 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3PD9WW8077432; Mon, 25 Apr 2011 13:09:32 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201104251309.p3PD9WW8077432@svn.freebsd.org> From: Rick Macklem Date: Mon, 25 Apr 2011 13:09:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221014 - in head/sys: fs/nfs fs/nfsclient nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2011 13:09:33 -0000 Author: rmacklem Date: Mon Apr 25 13:09:32 2011 New Revision: 221014 URL: http://svn.freebsd.org/changeset/base/221014 Log: Modify the experimental NFS client so that it uses the same "struct nfs_args" as the regular NFS client. This is needed so that the old mount(2) syscall will work and it makes sharing of the diskless NFS root code easier. Eary in the porting exercise I introduced a new revision of nfs_args, but didn't actually need it, thanks to nmount(2). I re-introduced the NFSMNT_KERB flag, since it does essentially the same thing and the old one would not have been used because it never worked. I also added a few new NFSMNT_xxx flags to sys/nfsclient/nfs_args.h that are used by the experimental NFS client. MFC after: 2 weeks Deleted: head/sys/fs/nfsclient/nfsargs.h Modified: head/sys/fs/nfs/nfsport.h head/sys/fs/nfsclient/nfs_clvfsops.c head/sys/nfsclient/nfsargs.h Modified: head/sys/fs/nfs/nfsport.h ============================================================================== --- head/sys/fs/nfs/nfsport.h Mon Apr 25 12:36:29 2011 (r221013) +++ head/sys/fs/nfs/nfsport.h Mon Apr 25 13:09:32 2011 (r221014) @@ -372,7 +372,7 @@ struct ext_nfsstats { #include #include #include -#include +#include #include /* Modified: head/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvfsops.c Mon Apr 25 12:36:29 2011 (r221013) +++ head/sys/fs/nfsclient/nfs_clvfsops.c Mon Apr 25 13:09:32 2011 (r221014) @@ -102,8 +102,9 @@ static void nfs_decode_args(struct mount struct nfs_args *argp, const char *, struct ucred *, struct thread *); static int mountnfs(struct nfs_args *, struct mount *, - struct sockaddr *, char *, u_char *, u_char *, u_char *, - struct vnode **, struct ucred *, struct thread *, int); + struct sockaddr *, char *, u_char *, int, u_char *, int, + u_char *, int, struct vnode **, struct ucred *, + struct thread *, int); static void nfs_getnlminfo(struct vnode *, uint8_t *, size_t *, struct sockaddr_storage *, int *, off_t *, struct timeval *); @@ -503,11 +504,21 @@ nfs_mountdiskless(char *path, struct vnode **vpp, struct mount *mp) { struct sockaddr *nam; - int error; + int dirlen, error; + char *dirpath; + /* + * Find the directory path in "path", which also has the server's + * name/ip address in it. + */ + dirpath = strchr(path, ':'); + if (dirpath != NULL) + dirlen = strlen(++dirpath); + else + dirlen = 0; nam = sodupsockaddr((struct sockaddr *)sin, M_WAITOK); - if ((error = mountnfs(args, mp, nam, path, NULL, NULL, NULL, vpp, - td->td_ucred, td, NFS_DEFAULT_NEGNAMETIMEO)) != 0) { + if ((error = mountnfs(args, mp, nam, path, NULL, 0, dirpath, dirlen, + NULL, 0, vpp, td->td_ucred, td, NFS_DEFAULT_NEGNAMETIMEO)) != 0) { printf("nfs_mountroot: mount %s on /: %d\n", path, error); return (error); } @@ -735,14 +746,10 @@ nfs_mount(struct mount *mp) .readahead = NFS_DEFRAHEAD, .wcommitsize = 0, /* was: NQ_DEFLEASE */ .hostname = NULL, - /* args version 4 */ .acregmin = NFS_MINATTRTIMO, .acregmax = NFS_MAXATTRTIMO, .acdirmin = NFS_MINDIRATTRTIMO, .acdirmax = NFS_MAXDIRATTRTIMO, - .dirlen = 0, - .krbnamelen = 0, - .srvkrbnamelen = 0, }; int error = 0, ret, len; struct sockaddr *nam = NULL; @@ -752,6 +759,7 @@ nfs_mount(struct mount *mp) u_char nfh[NFSX_FHMAX], krbname[100], dirpath[100], srvkrbname[100]; char *opt, *name, *secname; int negnametimeo = NFS_DEFAULT_NEGNAMETIMEO; + int dirlen, krbnamelen, srvkrbnamelen; if (vfs_filteropt(mp->mnt_optnew, nfs_opts)) { error = EINVAL; @@ -1008,19 +1016,19 @@ nfs_mount(struct mount *mp) strlcpy(srvkrbname, name, sizeof (srvkrbname)); else snprintf(srvkrbname, sizeof (srvkrbname), "nfs@%s", hst); - args.srvkrbnamelen = strlen(srvkrbname); + srvkrbnamelen = strlen(srvkrbname); if (vfs_getopt(mp->mnt_optnew, "gssname", (void **)&name, NULL) == 0) strlcpy(krbname, name, sizeof (krbname)); else krbname[0] = '\0'; - args.krbnamelen = strlen(krbname); + krbnamelen = strlen(krbname); if (vfs_getopt(mp->mnt_optnew, "dirpath", (void **)&name, NULL) == 0) strlcpy(dirpath, name, sizeof (dirpath)); else dirpath[0] = '\0'; - args.dirlen = strlen(dirpath); + dirlen = strlen(dirpath); if (vfs_getopt(mp->mnt_optnew, "addr", (void **)&args.addr, &args.addrlen) == 0) { @@ -1034,8 +1042,9 @@ nfs_mount(struct mount *mp) } args.fh = nfh; - error = mountnfs(&args, mp, nam, hst, krbname, dirpath, srvkrbname, - &vp, td->td_ucred, td, negnametimeo); + error = mountnfs(&args, mp, nam, hst, krbname, krbnamelen, dirpath, + dirlen, srvkrbname, srvkrbnamelen, &vp, td->td_ucred, td, + negnametimeo); out: if (!error) { MNT_ILOCK(mp); @@ -1077,9 +1086,9 @@ nfs_cmount(struct mntarg *ma, void *data */ static int mountnfs(struct nfs_args *argp, struct mount *mp, struct sockaddr *nam, - char *hst, u_char *krbname, u_char *dirpath, u_char *srvkrbname, - struct vnode **vpp, struct ucred *cred, struct thread *td, - int negnametimeo) + char *hst, u_char *krbname, int krbnamelen, u_char *dirpath, int dirlen, + u_char *srvkrbname, int srvkrbnamelen, struct vnode **vpp, + struct ucred *cred, struct thread *td, int negnametimeo) { struct nfsmount *nmp; struct nfsnode *np; @@ -1094,17 +1103,15 @@ mountnfs(struct nfs_args *argp, struct m return (0); } else { MALLOC(nmp, struct nfsmount *, sizeof (struct nfsmount) + - argp->krbnamelen + argp->dirlen + argp->srvkrbnamelen + 2, - M_NEWNFSMNT, M_WAITOK); - bzero((caddr_t)nmp, sizeof (struct nfsmount) + - argp->krbnamelen + argp->dirlen + argp->srvkrbnamelen + 2); + krbnamelen + dirlen + srvkrbnamelen + 2, + M_NEWNFSMNT, M_WAITOK | M_ZERO); TAILQ_INIT(&nmp->nm_bufq); if (clval == 0) clval = (u_int64_t)nfsboottime.tv_sec; nmp->nm_clval = clval++; - nmp->nm_krbnamelen = argp->krbnamelen; - nmp->nm_dirpathlen = argp->dirlen; - nmp->nm_srvkrbnamelen = argp->srvkrbnamelen; + nmp->nm_krbnamelen = krbnamelen; + nmp->nm_dirpathlen = dirlen; + nmp->nm_srvkrbnamelen = srvkrbnamelen; if (td->td_ucred->cr_uid != (uid_t)0) { /* * nm_uid is used to get KerberosV credentials for Modified: head/sys/nfsclient/nfsargs.h ============================================================================== --- head/sys/nfsclient/nfsargs.h Mon Apr 25 12:36:29 2011 (r221013) +++ head/sys/nfsclient/nfsargs.h Mon Apr 25 13:09:32 2011 (r221014) @@ -78,7 +78,7 @@ struct nfs_args { #define NFSMNT_NOCONN 0x00000080 /* Don't Connect the socket */ /* 0x100 free, was NFSMNT_NQNFS */ #define NFSMNT_NFSV3 0x00000200 /* Use NFS Version 3 protocol */ -/* 0x400 free, was NFSMNT_KERB */ +#define NFSMNT_KERB 0x00000400 /* Use RPCSEC_GSS/Krb5 */ #define NFSMNT_DUMBTIMR 0x00000800 /* Don't estimate rtt dynamically */ #define NFSMNT_WCOMMITSIZE 0x00001000 /* set max write commit size */ #define NFSMNT_READAHEAD 0x00002000 /* set read ahead */ @@ -93,5 +93,9 @@ struct nfs_args { #define NFSMNT_NOLOCKD 0x00400000 /* Locks are local */ #define NFSMNT_NFSV4 0x00800000 /* Use NFS Version 4 protocol */ #define NFSMNT_HASWRITEVERF 0x01000000 /* NFSv4 Write verifier */ +#define NFSMNT_INTEGRITY 0x02000000 /* Use integrity with RPCSEC_GSS */ +#define NFSMNT_PRIVACY 0x04000000 /* Use privacy with RPCSEC_GSS */ +#define NFSMNT_ALLGSSNAME 0x08000000 /* Use principal for all accesses */ +#define NFSMNT_STRICT3530 0x10000000 /* Adhere strictly to RFC3530 */ #endif From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 13:45:50 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AAF44106566C; Mon, 25 Apr 2011 13:45:50 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.garage.freebsd.pl (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id 4C4FB8FC1B; Mon, 25 Apr 2011 13:45:49 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 6F82E45E93; Mon, 25 Apr 2011 15:45:47 +0200 (CEST) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 54B8B45C9C; Mon, 25 Apr 2011 15:45:42 +0200 (CEST) Date: Mon, 25 Apr 2011 15:45:31 +0200 From: Pawel Jakub Dawidek To: "Bjoern A. Zeeb" Message-ID: <20110425134531.GA4391@garage.freebsd.pl> References: <201104240858.p3O8wwqT024628@svn.freebsd.org> <4DB441B0.8020906@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/04w6evG8XlLl3ft" Content-Disposition: inline In-Reply-To: X-OS: FreeBSD 9.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-0.6 required=4.5 tests=BAYES_00,RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: svn-src-head@freebsd.org, Alexander Motin , src-committers@freebsd.org, Robert Watson , svn-src-all@freebsd.org Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2011 13:45:50 -0000 --/04w6evG8XlLl3ft Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Apr 24, 2011 at 06:59:40PM +0000, Bjoern A. Zeeb wrote: > I had been pondering devfs "link"s myself, the problem is that from the rc > framework they come too late. If you can add a simple .ko that does it > programmatically on 9 that would be great. The problem is that after boo= ting > the new kernel you don't know whether people had ATA_STATIC on or not, so > we'd have to go with the defaults, that were in 8.x (and an extra tunable= to > flip the logic maybe)? We do know that people have ATA_STATIC_ID, because if they don't, this means they have their custom kernel config which doesn't contain ATA_CAM and when they will use it next time they recompile their kernel they will still have /dev/adX entries. Also, as Alexander already noted, because of all the problems with ATA naming over the years and for other reasons too, people often hardcode provider name in various GEOM classes metadata, so symlink won't help. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com --/04w6evG8XlLl3ft Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk21evsACgkQForvXbEpPzSiXgCdFc2yODBwMNTpDw6Gehhyrbbx m+wAoPaAqKa9eaE9cvHbit2UBBzBaeIL =Xifb -----END PGP SIGNATURE----- --/04w6evG8XlLl3ft-- From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 14:10:33 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1965106564A; Mon, 25 Apr 2011 14:10:33 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C25168FC08; Mon, 25 Apr 2011 14:10:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3PEAXRX079288; Mon, 25 Apr 2011 14:10:33 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3PEAXY9079286; Mon, 25 Apr 2011 14:10:33 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201104251410.p3PEAXY9079286@svn.freebsd.org> From: Attilio Rao Date: Mon, 25 Apr 2011 14:10:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221015 - head/sys/dev/ichwd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2011 14:10:33 -0000 Author: attilio Date: Mon Apr 25 14:10:33 2011 New Revision: 221015 URL: http://svn.freebsd.org/changeset/base/221015 Log: Don't assume that SMI are enabled when attaching ichwd and then do correct unwind based on former state. Sponsored by: Sandvine Incorporated Reviewed by: des MFC after: 1 week Modified: head/sys/dev/ichwd/ichwd.h Modified: head/sys/dev/ichwd/ichwd.h ============================================================================== --- head/sys/dev/ichwd/ichwd.h Mon Apr 25 13:09:32 2011 (r221014) +++ head/sys/dev/ichwd/ichwd.h Mon Apr 25 14:10:33 2011 (r221015) @@ -45,6 +45,7 @@ struct ichwd_softc { int active; unsigned int timeout; + int smi_enabled; int smi_rid; struct resource *smi_res; bus_space_tag_t smi_bst; From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 14:12:58 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 736C61065676; Mon, 25 Apr 2011 14:12:58 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 645638FC12; Mon, 25 Apr 2011 14:12:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3PECw3Q079425; Mon, 25 Apr 2011 14:12:58 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3PECwb4079423; Mon, 25 Apr 2011 14:12:58 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201104251412.p3PECwb4079423@svn.freebsd.org> From: Attilio Rao Date: Mon, 25 Apr 2011 14:12:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221016 - head/sys/dev/ichwd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2011 14:12:58 -0000 Author: attilio Date: Mon Apr 25 14:12:58 2011 New Revision: 221016 URL: http://svn.freebsd.org/changeset/base/221016 Log: Add missing bit in r221015. Sponsored by: Sandvine Incorporated Reviewed by: des MFC after: 1 week X-MFC: r221015 Modified: head/sys/dev/ichwd/ichwd.c Modified: head/sys/dev/ichwd/ichwd.c ============================================================================== --- head/sys/dev/ichwd/ichwd.c Mon Apr 25 14:10:33 2011 (r221015) +++ head/sys/dev/ichwd/ichwd.c Mon Apr 25 14:12:58 2011 (r221016) @@ -217,6 +217,15 @@ ichwd_smi_enable(struct ichwd_softc *sc) } /* + * Check if the watchdog SMI triggering is enabled. + */ +static __inline int +ichwd_smi_is_enabled(struct ichwd_softc *sc) +{ + return ((ichwd_read_smi_4(sc, SMI_EN) & SMI_TCO_EN) != 0); +} + +/* * Reset the watchdog status bits. */ static __inline void @@ -534,6 +543,7 @@ ichwd_attach(device_t dev) sc->ev_tag = EVENTHANDLER_REGISTER(watchdog_list, ichwd_event, sc, 0); /* disable the SMI handler */ + sc->smi_enabled = ichwd_smi_is_enabled(sc); ichwd_smi_disable(sc); return (0); @@ -565,7 +575,8 @@ ichwd_detach(device_t dev) ichwd_tmr_disable(sc); /* enable the SMI handler */ - ichwd_smi_enable(sc); + if (sc->smi_enabled != 0) + ichwd_smi_enable(sc); /* deregister event handler */ if (sc->ev_tag != NULL) From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 14:36:39 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1DEAD106566B; Mon, 25 Apr 2011 14:36:39 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0BD7E8FC0C; Mon, 25 Apr 2011 14:36:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3PEacXL080273; Mon, 25 Apr 2011 14:36:38 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3PEac3J080271; Mon, 25 Apr 2011 14:36:38 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201104251436.p3PEac3J080271@svn.freebsd.org> From: Jilles Tjoelker Date: Mon, 25 Apr 2011 14:36:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221017 - stable/8/usr.bin/printf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2011 14:36:39 -0000 Author: jilles Date: Mon Apr 25 14:36:38 2011 New Revision: 221017 URL: http://svn.freebsd.org/changeset/base/221017 Log: MFC r212244: printf(1): Clarify that \OOO produces a byte, different %b escape sequences. Octal escape sequences are expanded to bytes, not characters, and multiple are required for a multibyte character. The valid escape sequences in %b strings are slightly different from the escape sequences in the format string. Modified: stable/8/usr.bin/printf/printf.1 Directory Properties: stable/8/usr.bin/printf/ (props changed) Modified: stable/8/usr.bin/printf/printf.1 ============================================================================== --- stable/8/usr.bin/printf/printf.1 Mon Apr 25 14:12:58 2011 (r221016) +++ stable/8/usr.bin/printf/printf.1 Mon Apr 25 14:36:38 2011 (r221017) @@ -35,7 +35,7 @@ .\" @(#)printf.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd April 14, 2005 +.Dd September 5, 2010 .Dt PRINTF 1 .Os .Sh NAME @@ -109,12 +109,13 @@ Write a character. .It Cm \e\e Write a backslash character. .It Cm \e Ns Ar num -.It Cm \e0 Ns Ar num -Write an 8-bit character whose -.Tn ASCII +Write a byte whose value is the 1-, 2-, or 3-digit octal number .Ar num . +Multibyte characters can be constructed using multiple +.Cm \e Ns Ar num +sequences. .El .Pp Each format specification is introduced by the percent character @@ -289,6 +290,11 @@ As for .Cm s , but interpret character escapes in backslash notation in the string .Ar argument . +The permitted escape sequences are slightly different in that +octal escapes are +.Cm \e0 Ns Ar num +instead of +.Cm \e Ns Ar num . .It Cm \&% Print a `%'; no argument is used. .El From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 14:51:09 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A74A10656D0; Mon, 25 Apr 2011 14:51:09 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4B51C8FC16; Mon, 25 Apr 2011 14:51:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3PEp9WT080718; Mon, 25 Apr 2011 14:51:09 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3PEp9Hv080716; Mon, 25 Apr 2011 14:51:09 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201104251451.p3PEp9Hv080716@svn.freebsd.org> From: Rick Macklem Date: Mon, 25 Apr 2011 14:51:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221018 - head/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2011 14:51:09 -0000 Author: rmacklem Date: Mon Apr 25 14:51:08 2011 New Revision: 221018 URL: http://svn.freebsd.org/changeset/base/221018 Log: Fix the experimental NFS client so that it does not bogusly set the f_flags field of "struct statfs". This had the interesting effect of making the NFSv4 mounts "disappear" after r221014, since NFSMNT_NFSV4 and MNT_IGNORE became the same bit. MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clvfsops.c Modified: head/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvfsops.c Mon Apr 25 14:36:38 2011 (r221017) +++ head/sys/fs/nfsclient/nfs_clvfsops.c Mon Apr 25 14:51:08 2011 (r221018) @@ -318,7 +318,6 @@ nfs_statfs(struct mount *mp, struct stat if (gotfsinfo || (nmp->nm_flag & NFSMNT_NFSV4)) nfscl_loadfsinfo(nmp, &fs); nfscl_loadsbinfo(nmp, &sb, sbp); - sbp->f_flags = nmp->nm_flag; sbp->f_iosize = newnfs_iosize(nmp); mtx_unlock(&nmp->nm_mtx); if (sbp != &mp->mnt_stat) { From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 15:36:52 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D184A106566B; Mon, 25 Apr 2011 15:36:52 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 890A08FC15; Mon, 25 Apr 2011 15:36:52 +0000 (UTC) Received: from 63.imp.bsdimp.com (63.imp.bsdimp.com [10.0.0.63]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p3PFVUXW021321 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Mon, 25 Apr 2011 09:31:32 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <34A34338-79E0-435E-9BF1-614D10FC9FC7@gsoft.com.au> Date: Mon, 25 Apr 2011 09:31:31 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201104240923.p3O9N8QG025386@svn.freebsd.org> <20110424161933.GA18775@vniz.net> <18B3AE1E-467E-4B23-81B9-AB1EDEFE1F7A@gsoft.com.au> <34A34338-79E0-435E-9BF1-614D10FC9FC7@gsoft.com.au> To: "Daniel O'Connor" X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Mon, 25 Apr 2011 09:31:32 -0600 (MDT) Cc: svn-src-head@FreeBSD.org, Alexander Motin , src-committers@FreeBSD.org, Andrey Chernov , svn-src-all@FreeBSD.org Subject: Re: svn commit: r220983 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2011 15:36:52 -0000 On Apr 25, 2011, at 12:52 AM, Daniel O'Connor wrote: >=20 > On 25/04/2011, at 6:55, Warner Losh wrote: >>> The best way is to change to use GPT IDs (/dev/gptid/xxx) if you are = on a GPT system) or UFS IDs (/dev/ufsid/xxx) if you can't. >>=20 >> I've been running with ufs labels for a couple of years now, since = the first rumblings of this hit the streets. They work great no matter = what the underlying partitioning scheme. The one drawback is that if = you have multiple disks with the same labels, then the first one wins. = Normally not a problem, but when you have it, you need to ensure the = right one is selected. I avoid this problem by prefixing a hostname to = the label... >=20 > This is why I prefer IDs since they are nominally unique (UFS ones, = GPTs damn well better be :) >=20 > Although I concede it is rather annoying to work out which is which, = or type them out manually.. For things like ZFS, UUIDs aren't so bad because it hides them. For things like /etc/fstab, I prefer the named approach. This allows me = to survive a newfs on a partition if I have to without having to hack my = /etc/fstab. I have a large /tmp partition at times, and it gets newfs'd = if there's a bad problem... Warner From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 15:37:05 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6133106571B; Mon, 25 Apr 2011 15:37:05 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 3F3108FC19; Mon, 25 Apr 2011 15:37:05 +0000 (UTC) Received: from 63.imp.bsdimp.com (63.imp.bsdimp.com [10.0.0.63]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p3PFYCxT021338 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Mon, 25 Apr 2011 09:34:12 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <20110425134531.GA4391@garage.freebsd.pl> Date: Mon, 25 Apr 2011 09:34:12 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <50385B7B-7EC8-4BC3-8F88-83F9EB4096FB@bsdimp.com> References: <201104240858.p3O8wwqT024628@svn.freebsd.org> <4DB441B0.8020906@FreeBSD.org> <20110425134531.GA4391@garage.freebsd.pl> To: Pawel Jakub Dawidek X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Mon, 25 Apr 2011 09:34:12 -0600 (MDT) Cc: src-committers@FreeBSD.org, Alexander Motin , "Bjoern A. Zeeb" , Robert Watson , svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2011 15:37:05 -0000 On Apr 25, 2011, at 7:45 AM, Pawel Jakub Dawidek wrote: > On Sun, Apr 24, 2011 at 06:59:40PM +0000, Bjoern A. Zeeb wrote: >> I had been pondering devfs "link"s myself, the problem is that from = the rc >> framework they come too late. If you can add a simple .ko that does = it >> programmatically on 9 that would be great. The problem is that after = booting >> the new kernel you don't know whether people had ATA_STATIC on or = not, so >> we'd have to go with the defaults, that were in 8.x (and an extra = tunable to >> flip the logic maybe)? >=20 > We do know that people have ATA_STATIC_ID, because if they don't, this > means they have their custom kernel config which doesn't contain = ATA_CAM > and when they will use it next time they recompile their kernel they > will still have /dev/adX entries. >=20 > Also, as Alexander already noted, because of all the problems with ATA > naming over the years and for other reasons too, people often hardcode > provider name in various GEOM classes metadata, so symlink won't help. Do we have a short list of the places to look? A lot of this could be = done with a script that gets run at installworld and boot time to hunt = down the old cases and report them to the user before they upgrade their = kernel (but this would mean backing out the GENERIC change for a while = to give people a chance to upgrade to label-based provisioning... Warner From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 15:51:49 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 66CF71065678; Mon, 25 Apr 2011 15:51:49 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 522128FC1E; Mon, 25 Apr 2011 15:51:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3PFpn5G082487; Mon, 25 Apr 2011 15:51:49 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3PFpnoS082485; Mon, 25 Apr 2011 15:51:49 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201104251551.p3PFpnoS082485@svn.freebsd.org> From: Adrian Chadd Date: Mon, 25 Apr 2011 15:51:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221019 - head/sys/dev/ath/ath_hal X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2011 15:51:49 -0000 Author: adrian Date: Mon Apr 25 15:51:49 2011 New Revision: 221019 URL: http://svn.freebsd.org/changeset/base/221019 Log: Wrap the MIMO stuff in #ifdef AH_SUPPORT_AR5416, as the channel state doesn't have MIMO stuff in it by default. Modified: head/sys/dev/ath/ath_hal/ah.c Modified: head/sys/dev/ath/ath_hal/ah.c ============================================================================== --- head/sys/dev/ath/ath_hal/ah.c Mon Apr 25 14:51:08 2011 (r221018) +++ head/sys/dev/ath/ath_hal/ah.c Mon Apr 25 15:51:49 2011 (r221019) @@ -906,6 +906,7 @@ ath_hal_get_mimo_chan_noise(struct ath_h const struct ieee80211_channel *chan, int16_t *nf_ctl, int16_t *nf_ext) { +#ifdef AH_SUPPORT_AR5416 HAL_CHANNEL_INTERNAL *ichan; int i; @@ -960,6 +961,9 @@ ath_hal_get_mimo_chan_noise(struct ath_h } return 1; } +#else + return 0; +#endif /* AH_SUPPORT_AR5416 */ } /* From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 16:29:34 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D5E7C106566C; Mon, 25 Apr 2011 16:29:34 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 4209A8FC17; Mon, 25 Apr 2011 16:29:33 +0000 (UTC) Received: by bwz12 with SMTP id 12so2707051bwz.13 for ; Mon, 25 Apr 2011 09:29:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=KDxuBPxlUZI6ADIv/alMArDSHUZ0JDGNTmwhA/OwQZU=; b=drZ+1/GW2ZyVwmE+EMzVELNrf904/XK8ply3efs55tdoeU7OxwM13bv3D4t9T+A2TK 3kl8lt95iW6ZuEelAvGMb4RKGj7smPE8S3yK+Q6syII1D84kImMv1vYssU/fqWT2/EJf +gS42N8oxgT6+e0CnfzDxQURxBCIE///eloK4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=sdQ83LOyV4JHq98OSOOdcWBCWrvVRyh9/2et2vgn89TpcrxpaISOlCgdGWKTzBqGSe v11J0w9T4QkVP/zNgyoIZ2SJ7pw4PPVkHGzVoNNWgIC6R65K4oRNMUnCcrB0KdIHQq27 vcHQKgAD4QnyC1dvlmGR5W86A5REn0Dt1zMKU= Received: by 10.204.83.228 with SMTP id g36mr3592600bkl.30.1303748972241; Mon, 25 Apr 2011 09:29:32 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id l1sm3350045bkl.13.2011.04.25.09.29.30 (version=SSLv3 cipher=OTHER); Mon, 25 Apr 2011 09:29:31 -0700 (PDT) Sender: Alexander Motin Message-ID: <4DB5A166.9010302@FreeBSD.org> Date: Mon, 25 Apr 2011 19:29:26 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: Warner Losh References: <201104240858.p3O8wwqT024628@svn.freebsd.org> <4DB441B0.8020906@FreeBSD.org> <20110425134531.GA4391@garage.freebsd.pl> <50385B7B-7EC8-4BC3-8F88-83F9EB4096FB@bsdimp.com> In-Reply-To: <50385B7B-7EC8-4BC3-8F88-83F9EB4096FB@bsdimp.com> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: src-committers@FreeBSD.org, Pawel Jakub Dawidek , svn-src-all@FreeBSD.org, "Bjoern A. Zeeb" , Robert Watson , svn-src-head@FreeBSD.org Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2011 16:29:35 -0000 Warner Losh wrote: > On Apr 25, 2011, at 7:45 AM, Pawel Jakub Dawidek wrote: >> On Sun, Apr 24, 2011 at 06:59:40PM +0000, Bjoern A. Zeeb wrote: >>> I had been pondering devfs "link"s myself, the problem is that from the rc >>> framework they come too late. If you can add a simple .ko that does it >>> programmatically on 9 that would be great. The problem is that after booting >>> the new kernel you don't know whether people had ATA_STATIC on or not, so >>> we'd have to go with the defaults, that were in 8.x (and an extra tunable to >>> flip the logic maybe)? >> We do know that people have ATA_STATIC_ID, because if they don't, this >> means they have their custom kernel config which doesn't contain ATA_CAM >> and when they will use it next time they recompile their kernel they >> will still have /dev/adX entries. >> >> Also, as Alexander already noted, because of all the problems with ATA >> naming over the years and for other reasons too, people often hardcode >> provider name in various GEOM classes metadata, so symlink won't help. > > Do we have a short list of the places to look? Quick man pages grepping shows that at least gmirror, gstripe, graid3, gjournal, gvirstor, gconcat, gshsec support provider names hardcoding. For gmirror and graid3 present status can be obtained by: `gXXX list | egrep "Flags: .*HARDCODED"`. For gvirstor, gshsec, gstripe and gconcat: `gXXX dump adX | egrep "Hardcoded provider: ad"`. For gjournal: `gjournal dump adX | egrep "hcprovider: ad"`. > A lot of this could be done with a script that gets run at installworld and boot time to hunt down the old cases and report them to the user before they upgrade their kernel (but this would mean backing out the GENERIC change for a while to give people a chance to upgrade to label-based provisioning... If I understand idea right, independently of how much we delay it, there will be some people who not updated during that window to get in code detecting it during boot. Hardly many people of target auditory updating their systems each month. Same time some checks indeed could be done in installkernel. -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 16:33:43 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 462841065672; Mon, 25 Apr 2011 16:33:43 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 29C978FC12; Mon, 25 Apr 2011 16:33:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3PGXhLW083778; Mon, 25 Apr 2011 16:33:43 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3PGXh6c083776; Mon, 25 Apr 2011 16:33:43 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201104251633.p3PGXh6c083776@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 25 Apr 2011 16:33:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221020 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2011 16:33:43 -0000 Author: bz Date: Mon Apr 25 16:33:42 2011 New Revision: 221020 URL: http://svn.freebsd.org/changeset/base/221020 Log: After r220885 compile the various NIC drivers depending on INET unconditionally backing out r193997, so that they are available for IPv6-only setups as well. Reviewed by: gnn Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems MFC after: 5 days Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Mon Apr 25 15:51:49 2011 (r221019) +++ head/sys/conf/files Mon Apr 25 16:33:42 2011 (r221020) @@ -493,7 +493,7 @@ dev/advansys/adwcam.c optional adw dev/advansys/adwlib.c optional adw dev/advansys/adwmcode.c optional adw dev/ae/if_ae.c optional ae pci -dev/age/if_age.c optional age pci inet +dev/age/if_age.c optional age pci dev/agp/agp.c optional agp pci dev/agp/agp_if.m optional agp pci dev/aha/aha.c optional aha @@ -515,8 +515,8 @@ dev/aic7xxx/aic7xxx.c optional ahc dev/aic7xxx/aic7xxx_93cx6.c optional ahc dev/aic7xxx/aic7xxx_osm.c optional ahc dev/aic7xxx/aic7xxx_pci.c optional ahc pci -dev/alc/if_alc.c optional alc pci inet -dev/ale/if_ale.c optional ale pci inet +dev/alc/if_alc.c optional alc pci +dev/ale/if_ale.c optional ale pci dev/amd/amd.c optional amd dev/amr/amr.c optional amr dev/amr/amr_cam.c optional amrp amr @@ -973,11 +973,11 @@ dev/ed/if_ed_pccard.c optional ed pccar dev/ed/if_ed_pci.c optional ed pci dev/eisa/eisa_if.m standard dev/eisa/eisaconf.c optional eisa -dev/e1000/if_em.c optional em inet \ +dev/e1000/if_em.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" -dev/e1000/if_lem.c optional em inet \ +dev/e1000/if_lem.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" -dev/e1000/if_igb.c optional igb inet \ +dev/e1000/if_igb.c optional igb \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_80003es2lan.c optional em | igb \ compile-with "${NORMAL_C} -I$S/dev/e1000" @@ -1046,7 +1046,7 @@ dev/firewire/sbp.c optional sbp dev/firewire/sbp_targ.c optional sbp_targ dev/flash/at45d.c optional at45d dev/flash/mx25l.c optional mx25l -dev/fxp/if_fxp.c optional fxp inet +dev/fxp/if_fxp.c optional fxp dev/gem/if_gem.c optional gem dev/gem/if_gem_pci.c optional gem pci dev/gem/if_gem_sbus.c optional gem sbus @@ -1336,7 +1336,7 @@ dev/ixgbe/ixgbe_82598.c optional ixgbe compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_82599.c optional ixgbe inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" -dev/jme/if_jme.c optional jme pci inet +dev/jme/if_jme.c optional jme pci dev/joy/joy.c optional joy dev/joy/joy_isa.c optional joy isa dev/joy/joy_pccard.c optional joy pccard @@ -1425,7 +1425,7 @@ dev/mpt/mpt_debug.c optional mpt dev/mpt/mpt_pci.c optional mpt pci dev/mpt/mpt_raid.c optional mpt dev/mpt/mpt_user.c optional mpt -dev/msk/if_msk.c optional msk inet +dev/msk/if_msk.c optional msk dev/mvs/mvs.c optional mvs dev/mvs/mvs_if.m optional mvs dev/mvs/mvs_pci.c optional mvs pci @@ -1639,7 +1639,7 @@ dev/siba/siba_bwn.c optional siba_bwn p dev/siba/siba_core.c optional siba_bwn pci dev/siis/siis.c optional siis pci dev/sis/if_sis.c optional sis pci -dev/sk/if_sk.c optional sk pci inet +dev/sk/if_sk.c optional sk pci dev/smbus/smb.c optional smb dev/smbus/smbconf.c optional smbus dev/smbus/smbus.c optional smbus @@ -1788,7 +1788,7 @@ dev/twa/tw_osl_freebsd.c optional twa \ dev/twe/twe.c optional twe dev/twe/twe_freebsd.c optional twe dev/tx/if_tx.c optional tx -dev/txp/if_txp.c optional txp inet +dev/txp/if_txp.c optional txp dev/uart/uart_bus_acpi.c optional uart acpi #dev/uart/uart_bus_cbus.c optional uart cbus dev/uart/uart_bus_ebus.c optional uart ebus From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 16:36:16 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9C4DC106564A; Mon, 25 Apr 2011 16:36:16 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8C0F38FC1F; Mon, 25 Apr 2011 16:36:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3PGaGSc083885; Mon, 25 Apr 2011 16:36:16 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3PGaG8n083883; Mon, 25 Apr 2011 16:36:16 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201104251636.p3PGaG8n083883@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 25 Apr 2011 16:36:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221021 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2011 16:36:16 -0000 Author: bz Date: Mon Apr 25 16:36:16 2011 New Revision: 221021 URL: http://svn.freebsd.org/changeset/base/221021 Log: Be less strict on includes than in r220746. We need in.h for both INET or INET6 as it holds all the IPPROTO_* definitions needed for the SYSCTL_NODE definitions. Reviewed by: gnn Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems MFC after: 5 days Modified: head/sys/netinet/in_proto.c Modified: head/sys/netinet/in_proto.c ============================================================================== --- head/sys/netinet/in_proto.c Mon Apr 25 16:33:42 2011 (r221020) +++ head/sys/netinet/in_proto.c Mon Apr 25 16:36:16 2011 (r221021) @@ -64,8 +64,13 @@ __FBSDID("$FreeBSD$"); #include #endif #include +#endif /* INET */ +#if defined(INET) || defined(INET6) #include +#endif + +#ifdef INET #include #include #include From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 16:37:47 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB38B106566B; Mon, 25 Apr 2011 16:37:47 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AAE888FC19; Mon, 25 Apr 2011 16:37:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3PGbls5083961; Mon, 25 Apr 2011 16:37:47 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3PGblqu083959; Mon, 25 Apr 2011 16:37:47 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201104251637.p3PGblqu083959@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 25 Apr 2011 16:37:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221022 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2011 16:37:47 -0000 Author: bz Date: Mon Apr 25 16:37:47 2011 New Revision: 221022 URL: http://svn.freebsd.org/changeset/base/221022 Log: We need in.h for both INET and INET6, as according to RFC 3493 it defines struct in6_addr, which is needed by ip6_hdr used in here. Reviewed by: gnn Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems MFC after: 5 days Modified: head/sys/net80211/ieee80211_output.c Modified: head/sys/net80211/ieee80211_output.c ============================================================================== --- head/sys/net80211/ieee80211_output.c Mon Apr 25 16:36:16 2011 (r221021) +++ head/sys/net80211/ieee80211_output.c Mon Apr 25 16:37:47 2011 (r221022) @@ -57,8 +57,11 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef INET +#if defined(INET) || defined(INET6) #include +#endif + +#ifdef INET #include #include #include From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 16:54:34 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 694A01065675; Mon, 25 Apr 2011 16:54:34 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 19E538FC0A; Mon, 25 Apr 2011 16:54:34 +0000 (UTC) Received: from [10.30.101.54] ([209.117.142.2]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p3PGs7Nu022039 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Mon, 25 Apr 2011 10:54:09 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <4DB5A166.9010302@FreeBSD.org> Date: Mon, 25 Apr 2011 10:54:02 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <67F62848-FAA3-4C46-A95A-DA7C82281898@bsdimp.com> References: <201104240858.p3O8wwqT024628@svn.freebsd.org> <4DB441B0.8020906@FreeBSD.org> <20110425134531.GA4391@garage.freebsd.pl> <50385B7B-7EC8-4BC3-8F88-83F9EB4096FB@bsdimp.com> <4DB5A166.9010302@FreeBSD.org> To: Alexander Motin X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Mon, 25 Apr 2011 10:54:09 -0600 (MDT) Cc: src-committers@freebsd.org, Pawel Jakub Dawidek , svn-src-all@freebsd.org, "Bjoern A. Zeeb" , Robert Watson , svn-src-head@freebsd.org Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2011 16:54:34 -0000 On Apr 25, 2011, at 10:29 AM, Alexander Motin wrote: > Warner Losh wrote: >> On Apr 25, 2011, at 7:45 AM, Pawel Jakub Dawidek wrote: >>> On Sun, Apr 24, 2011 at 06:59:40PM +0000, Bjoern A. Zeeb wrote: >>>> I had been pondering devfs "link"s myself, the problem is that from = the rc >>>> framework they come too late. If you can add a simple .ko that = does it >>>> programmatically on 9 that would be great. The problem is that = after booting >>>> the new kernel you don't know whether people had ATA_STATIC on or = not, so >>>> we'd have to go with the defaults, that were in 8.x (and an extra = tunable to >>>> flip the logic maybe)? >>> We do know that people have ATA_STATIC_ID, because if they don't, = this >>> means they have their custom kernel config which doesn't contain = ATA_CAM >>> and when they will use it next time they recompile their kernel they >>> will still have /dev/adX entries. >>>=20 >>> Also, as Alexander already noted, because of all the problems with = ATA >>> naming over the years and for other reasons too, people often = hardcode >>> provider name in various GEOM classes metadata, so symlink won't = help. >>=20 >> Do we have a short list of the places to look?=20 >=20 > Quick man pages grepping shows that at least gmirror, gstripe, graid3, > gjournal, gvirstor, gconcat, gshsec support provider names hardcoding. > For gmirror and graid3 present status can be obtained by: `gXXX list | > egrep "Flags: .*HARDCODED"`. For gvirstor, gshsec, gstripe and = gconcat: > `gXXX dump adX | egrep "Hardcoded provider: ad"`. For gjournal: > `gjournal dump adX | egrep "hcprovider: ad"`. That wouldn't be too horrible... >> A lot of this could be done with a script that gets run at = installworld and boot time to hunt down the old cases and report them to = the user before they upgrade their kernel (but this would mean backing = out the GENERIC change for a while to give people a chance to upgrade to = label-based provisioning... >=20 > If I understand idea right, independently of how much we delay it, = there > will be some people who not updated during that window to get in code > detecting it during boot. Hardly many people of target auditory = updating > their systems each month. Same time some checks indeed could be done = in > installkernel. We'd have to delay it at least a month, if not more. However, the time = to have done these checks were 8.1ish rather than 9.0 nearing = code-freezeish. I'd thought there was going to be better compatibility = last year at this time, or I'd have pushed this idea harder in the = community... And yes, I'd envisioned installkernel also doing these checks, just to = be complete and prevent foot-shooting. At this point, it's all we have. = For the 9.0 install, we'll likely need to do a subset of this as people = import their gmirrors created with 8.x... Warner >=20 > --=20 > Alexander Motin >=20 >=20 From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 17:13:41 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50910106566B; Mon, 25 Apr 2011 17:13:41 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3E8D48FC13; Mon, 25 Apr 2011 17:13:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3PHDfPL085044; Mon, 25 Apr 2011 17:13:41 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3PHDfYl085039; Mon, 25 Apr 2011 17:13:41 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201104251713.p3PHDfYl085039@svn.freebsd.org> From: Attilio Rao Date: Mon, 25 Apr 2011 17:13:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221023 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2011 17:13:41 -0000 Author: attilio Date: Mon Apr 25 17:13:40 2011 New Revision: 221023 URL: http://svn.freebsd.org/changeset/base/221023 Log: Add the possibility to verify MD5 hash of incoming TCP packets. As long as this is a costy function, even when compiled in (along with the option TCP_SIGNATURE), it can be disabled via the net.inet.tcp.signature_verify_input sysctl. Sponsored by: Sandvine Incorporated Reviewed by: emaste, bz MFC after: 2 weeks Modified: head/sys/netinet/tcp_input.c head/sys/netinet/tcp_subr.c head/sys/netinet/tcp_syncache.c head/sys/netinet/tcp_var.h Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Mon Apr 25 16:37:47 2011 (r221022) +++ head/sys/netinet/tcp_input.c Mon Apr 25 17:13:40 2011 (r221023) @@ -215,6 +215,12 @@ static void tcp_pulloutofband(struct so struct tcphdr *, struct mbuf *, int); static void tcp_xmit_timer(struct tcpcb *, int); static void tcp_newreno_partial_ack(struct tcpcb *, struct tcphdr *); +static void inline tcp_fields_to_host(struct tcphdr *); +#ifdef TCP_SIGNATURE +static void inline tcp_fields_to_net(struct tcphdr *); +static int inline tcp_signature_verify_input(struct mbuf *, int, int, + int, struct tcpopt *, struct tcphdr *, u_int); +#endif static void inline cc_ack_received(struct tcpcb *tp, struct tcphdr *th, uint16_t type); static void inline cc_conn_init(struct tcpcb *tp); @@ -440,6 +446,40 @@ cc_post_recovery(struct tcpcb *tp, struc tp->t_bytes_acked = 0; } +static inline void +tcp_fields_to_host(struct tcphdr *th) +{ + + th->th_seq = ntohl(th->th_seq); + th->th_ack = ntohl(th->th_ack); + th->th_win = ntohs(th->th_win); + th->th_urp = ntohs(th->th_urp); +} + +#ifdef TCP_SIGNATURE +static inline void +tcp_fields_to_net(struct tcphdr *th) +{ + + th->th_seq = htonl(th->th_seq); + th->th_ack = htonl(th->th_ack); + th->th_win = htons(th->th_win); + th->th_urp = htons(th->th_urp); +} + +static inline int +tcp_signature_verify_input(struct mbuf *m, int off0, int tlen, int optlen, + struct tcpopt *to, struct tcphdr *th, u_int tcpbflag) +{ + int ret; + + tcp_fields_to_net(th); + ret = tcp_signature_verify(m, off0, tlen, optlen, to, th, tcpbflag); + tcp_fields_to_host(th); + return (ret); +} +#endif + /* Neighbor Discovery, Neighbor Unreachability Detection Upper layer hint. */ #ifdef INET6 #define ND6_HINT(tp) \ @@ -519,6 +559,9 @@ tcp_input(struct mbuf *m, int off0) int thflags; int rstreason = 0; /* For badport_bandlim accounting purposes */ uint8_t iptos; +#ifdef TCP_SIGNATURE + uint8_t sig_checked = 0; +#endif #ifdef IPFIREWALL_FORWARD struct m_tag *fwd_tag; #endif @@ -676,10 +719,7 @@ tcp_input(struct mbuf *m, int off0) /* * Convert TCP protocol specific fields to host format. */ - th->th_seq = ntohl(th->th_seq); - th->th_ack = ntohl(th->th_ack); - th->th_win = ntohs(th->th_win); - th->th_urp = ntohs(th->th_urp); + tcp_fields_to_host(th); /* * Delay dropping TCP, IP headers, IPv6 ext headers, and TCP options. @@ -861,8 +901,24 @@ relocked: } INP_INFO_WLOCK_ASSERT(&V_tcbinfo); +#ifdef TCP_SIGNATURE + tcp_dooptions(&to, optp, optlen, + (thflags & TH_SYN) ? TO_SYN : 0); + if (sig_checked == 0) { + tp = intotcpcb(inp); + if (tp == NULL || tp->t_state == TCPS_CLOSED) { + rstreason = BANDLIM_RST_CLOSEDPORT; + goto dropwithreset; + } + if (!tcp_signature_verify_input(m, off0, tlen, optlen, + &to, th, tp->t_flags)) + goto dropunlock; + sig_checked = 1; + } +#else if (thflags & TH_SYN) tcp_dooptions(&to, optp, optlen, TO_SYN); +#endif /* * NB: tcp_twcheck unlocks the INP and frees the mbuf. */ @@ -1021,6 +1077,26 @@ relocked: tp = intotcpcb(inp); KASSERT(tp->t_state == TCPS_SYN_RECEIVED, ("%s: ", __func__)); +#ifdef TCP_SIGNATURE + if (sig_checked == 0) { + tcp_dooptions(&to, optp, optlen, + (thflags & TH_SYN) ? TO_SYN : 0); + if (!tcp_signature_verify_input(m, off0, tlen, + optlen, &to, th, tp->t_flags)) { + + /* + * In SYN_SENT state if it receives an + * RST, it is allowed for further + * processing. + */ + if ((thflags & TH_RST) == 0 || + (tp->t_state == TCPS_SYN_SENT) == 0) + goto dropunlock; + } + sig_checked = 1; + } +#endif + /* * Process the segment and the data it * contains. tcp_do_segment() consumes @@ -1225,6 +1301,25 @@ relocked: return; } +#ifdef TCP_SIGNATURE + if (sig_checked == 0) { + tcp_dooptions(&to, optp, optlen, + (thflags & TH_SYN) ? TO_SYN : 0); + if (!tcp_signature_verify_input(m, off0, tlen, optlen, &to, + th, tp->t_flags)) { + + /* + * In SYN_SENT state if it receives an RST, it is + * allowed for further processing. + */ + if ((thflags & TH_RST) == 0 || + (tp->t_state == TCPS_SYN_SENT) == 0) + goto dropunlock; + } + sig_checked = 1; + } +#endif + /* * Segment belongs to a connection in SYN_SENT, ESTABLISHED or later * state. tcp_do_segment() always consumes the mbuf chain, unlocks Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Mon Apr 25 16:37:47 2011 (r221022) +++ head/sys/netinet/tcp_subr.c Mon Apr 25 17:13:40 2011 (r221023) @@ -213,6 +213,12 @@ SYSCTL_INT(_net_inet_tcp, OID_AUTO, sore &tcp_soreceive_stream, 0, "Using soreceive_stream for TCP sockets"); #endif +#ifdef TCP_SIGNATURE +static int tcp_sig_checksigs = 1; +SYSCTL_INT(_net_inet_tcp, OID_AUTO, signature_verify_input, CTLFLAG_RW, + &tcp_sig_checksigs, 0, "Verify RFC2385 digests on inbound traffic"); +#endif + VNET_DEFINE(uma_zone_t, sack_hole_zone); #define V_sack_hole_zone VNET(sack_hole_zone) @@ -1998,6 +2004,66 @@ tcp_signature_compute(struct mbuf *m, in KEY_FREESAV(&sav); return (0); } + +/* + * Verify the TCP-MD5 hash of a TCP segment. (RFC2385) + * + * Parameters: + * m pointer to head of mbuf chain + * len length of TCP segment data, excluding options + * optlen length of TCP segment options + * buf pointer to storage for computed MD5 digest + * direction direction of flow (IPSEC_DIR_INBOUND or OUTBOUND) + * + * Return 1 if successful, otherwise return 0. + */ +int +tcp_signature_verify(struct mbuf *m, int off0, int tlen, int optlen, + struct tcpopt *to, struct tcphdr *th, u_int tcpbflag) +{ + char tmpdigest[TCP_SIGLEN]; + + if (tcp_sig_checksigs == 0) + return (1); + if ((tcpbflag & TF_SIGNATURE) == 0) { + if ((to->to_flags & TOF_SIGNATURE) != 0) { + + /* + * If this socket is not expecting signature but + * the segment contains signature just fail. + */ + TCPSTAT_INC(tcps_sig_err_sigopt); + TCPSTAT_INC(tcps_sig_rcvbadsig); + return (0); + } + + /* Signature is not expected, and not present in segment. */ + return (1); + } + + /* + * If this socket is expecting signature but the segment does not + * contain any just fail. + */ + if ((to->to_flags & TOF_SIGNATURE) == 0) { + TCPSTAT_INC(tcps_sig_err_nosigopt); + TCPSTAT_INC(tcps_sig_rcvbadsig); + return (0); + } + if (tcp_signature_compute(m, off0, tlen, optlen, &tmpdigest[0], + IPSEC_DIR_INBOUND) == -1) { + TCPSTAT_INC(tcps_sig_err_buildsig); + TCPSTAT_INC(tcps_sig_rcvbadsig); + return (0); + } + + if (bcmp(to->to_signature, &tmpdigest[0], TCP_SIGLEN) != 0) { + TCPSTAT_INC(tcps_sig_rcvbadsig); + return (0); + } + TCPSTAT_INC(tcps_sig_rcvgoodsig); + return (1); +} #endif /* TCP_SIGNATURE */ static int Modified: head/sys/netinet/tcp_syncache.c ============================================================================== --- head/sys/netinet/tcp_syncache.c Mon Apr 25 16:37:47 2011 (r221022) +++ head/sys/netinet/tcp_syncache.c Mon Apr 25 17:13:40 2011 (r221023) @@ -1010,7 +1010,8 @@ _syncache_add(struct in_conninfo *inc, s struct syncache_head *sch; struct mbuf *ipopts = NULL; u_int32_t flowtmp; - int win, sb_hiwat, ip_ttl, ip_tos, noopt; + u_int ltflags; + int win, sb_hiwat, ip_ttl, ip_tos; char *s; #ifdef INET6 int autoflowlabel = 0; @@ -1043,7 +1044,7 @@ _syncache_add(struct in_conninfo *inc, s ip_tos = inp->inp_ip_tos; win = sbspace(&so->so_rcv); sb_hiwat = so->so_rcv.sb_hiwat; - noopt = (tp->t_flags & TF_NOOPT); + ltflags = (tp->t_flags & (TF_NOOPT | TF_SIGNATURE)); /* By the time we drop the lock these should no longer be used. */ so = NULL; @@ -1238,14 +1239,14 @@ _syncache_add(struct in_conninfo *inc, s * XXX: Currently we always record the option by default and will * attempt to use it in syncache_respond(). */ - if (to->to_flags & TOF_SIGNATURE) + if (to->to_flags & TOF_SIGNATURE || ltflags & TF_SIGNATURE) sc->sc_flags |= SCF_SIGNATURE; #endif if (to->to_flags & TOF_SACKPERM) sc->sc_flags |= SCF_SACK; if (to->to_flags & TOF_MSS) sc->sc_peer_mss = to->to_mss; /* peer mss may be zero */ - if (noopt) + if (ltflags & TF_NOOPT) sc->sc_flags |= SCF_NOOPT; if ((th->th_flags & (TH_ECE|TH_CWR)) && V_tcp_do_ecn) sc->sc_flags |= SCF_ECN; Modified: head/sys/netinet/tcp_var.h ============================================================================== --- head/sys/netinet/tcp_var.h Mon Apr 25 16:37:47 2011 (r221022) +++ head/sys/netinet/tcp_var.h Mon Apr 25 17:13:40 2011 (r221023) @@ -485,6 +485,13 @@ struct tcpstat { u_long tcps_ecn_shs; /* ECN successful handshakes */ u_long tcps_ecn_rcwnd; /* # times ECN reduced the cwnd */ + /* TCP_SIGNATURE related stats */ + u_long tcps_sig_rcvgoodsig; /* Total matching signature received */ + u_long tcps_sig_rcvbadsig; /* Total bad signature received */ + u_long tcps_sig_err_buildsig; /* Mismatching signature received */ + u_long tcps_sig_err_sigopt; /* No signature expected by socket */ + u_long tcps_sig_err_nosigopt; /* No signature provided by segment */ + u_long _pad[12]; /* 6 UTO, 6 TBD */ }; @@ -684,6 +691,8 @@ int tcp_twrespond(struct tcptw *, int); void tcp_setpersist(struct tcpcb *); #ifdef TCP_SIGNATURE int tcp_signature_compute(struct mbuf *, int, int, int, u_char *, u_int); +int tcp_signature_verify(struct mbuf *, int, int, int, struct tcpopt *, + struct tcphdr *, u_int); #endif void tcp_slowtimo(void); struct tcptemp * From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 17:34:42 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E9711065674; Mon, 25 Apr 2011 17:34:42 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id AF4DF8FC12; Mon, 25 Apr 2011 17:34:40 +0000 (UTC) Received: by bwz12 with SMTP id 12so2785549bwz.13 for ; Mon, 25 Apr 2011 10:34:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=HYPckpByzpxGvDjb1DzfJzo2eI0tkUI/Y0mhjvY54PY=; b=sGwDZdl+ToJFVEqb6mH5cGtd1rXoVue9V/O/3aP/TAKlhIQANUANn7Qzx7DP3tOose EypvLLTsu6mVgwyxIWIxVZB2KO9QKBpxhZINBQv/Z1bqjW67CtbAixNsKPokhjHVTkzA MRjQFn6fGvFY74LjmJ/6FmcN1wN6LJC24ANBs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=uqMEBb5pQRuL/0/amGlkaXquRPwId6k1dJ8+3djW6TkX7FASRXlCc7fGuBW0ET1Gn9 FmJ941d1J7Jvpxe1KztLmxScM/hejo2Tl2VGwqJBUgxsBnapfJ/G3mCLDtTO4msUVHbT jbOrf8ZOeAXVm/ya8HBkKsqJ2jvlaypRQ/tFQ= Received: by 10.204.19.65 with SMTP id z1mr3449988bka.202.1303752879669; Mon, 25 Apr 2011 10:34:39 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id l1sm3382935bkl.1.2011.04.25.10.34.37 (version=SSLv3 cipher=OTHER); Mon, 25 Apr 2011 10:34:39 -0700 (PDT) Sender: Alexander Motin Message-ID: <4DB5B0A9.4030805@FreeBSD.org> Date: Mon, 25 Apr 2011 20:34:33 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: Warner Losh References: <201104240858.p3O8wwqT024628@svn.freebsd.org> <4DB441B0.8020906@FreeBSD.org> <20110425134531.GA4391@garage.freebsd.pl> <50385B7B-7EC8-4BC3-8F88-83F9EB4096FB@bsdimp.com> <4DB5A166.9010302@FreeBSD.org> <67F62848-FAA3-4C46-A95A-DA7C82281898@bsdimp.com> In-Reply-To: <67F62848-FAA3-4C46-A95A-DA7C82281898@bsdimp.com> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: src-committers@freebsd.org, Pawel Jakub Dawidek , svn-src-all@freebsd.org, "Bjoern A. Zeeb" , Robert Watson , svn-src-head@freebsd.org Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2011 17:34:42 -0000 Warner Losh wrote: > On Apr 25, 2011, at 10:29 AM, Alexander Motin wrote: >> Warner Losh wrote: >>> On Apr 25, 2011, at 7:45 AM, Pawel Jakub Dawidek wrote: >>>> On Sun, Apr 24, 2011 at 06:59:40PM +0000, Bjoern A. Zeeb wrote: >>>>> I had been pondering devfs "link"s myself, the problem is that from the rc >>>>> framework they come too late. If you can add a simple .ko that does it >>>>> programmatically on 9 that would be great. The problem is that after booting >>>>> the new kernel you don't know whether people had ATA_STATIC on or not, so >>>>> we'd have to go with the defaults, that were in 8.x (and an extra tunable to >>>>> flip the logic maybe)? >>>> We do know that people have ATA_STATIC_ID, because if they don't, this >>>> means they have their custom kernel config which doesn't contain ATA_CAM >>>> and when they will use it next time they recompile their kernel they >>>> will still have /dev/adX entries. >>>> >>>> Also, as Alexander already noted, because of all the problems with ATA >>>> naming over the years and for other reasons too, people often hardcode >>>> provider name in various GEOM classes metadata, so symlink won't help. >>> Do we have a short list of the places to look? >> Quick man pages grepping shows that at least gmirror, gstripe, graid3, >> gjournal, gvirstor, gconcat, gshsec support provider names hardcoding. >> For gmirror and graid3 present status can be obtained by: `gXXX list | >> egrep "Flags: .*HARDCODED"`. For gvirstor, gshsec, gstripe and gconcat: >> `gXXX dump adX | egrep "Hardcoded provider: ad"`. For gjournal: >> `gjournal dump adX | egrep "hcprovider: ad"`. > > That wouldn't be too horrible... > >>> A lot of this could be done with a script that gets run at installworld and boot time to hunt down the old cases and report them to the user before they upgrade their kernel (but this would mean backing out the GENERIC change for a while to give people a chance to upgrade to label-based provisioning... >> If I understand idea right, independently of how much we delay it, there >> will be some people who not updated during that window to get in code >> detecting it during boot. Hardly many people of target auditory updating >> their systems each month. Same time some checks indeed could be done in >> installkernel. > > We'd have to delay it at least a month, if not more. However, the time to have done these checks were 8.1ish rather than 9.0 nearing code-freezeish. I'd thought there was going to be better compatibility last year at this time, or I'd have pushed this idea harder in the community... > > And yes, I'd envisioned installkernel also doing these checks, just to be complete and prevent foot-shooting. At this point, it's all we have. For the 9.0 install, we'll likely need to do a subset of this as people import their gmirrors created with 8.x... I've thought about the process of fixing hardcoded provider names there, and it is absolutely not trivial. If we take the "symlinking" way (patch is already posted to current@), I think it will be much easier for everybody, and especially users, if I hack all mentioned above GEOM classes to ignore adX/adaY difference in provider names. And it should perfectly fit into remaining time window. -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 17:49:37 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0C43106566B; Mon, 25 Apr 2011 17:49:37 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id A159B8FC0A; Mon, 25 Apr 2011 17:49:37 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 3923C46B06; Mon, 25 Apr 2011 13:49:37 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id B1D158A027; Mon, 25 Apr 2011 13:49:36 -0400 (EDT) From: John Baldwin To: Alexander Motin Date: Mon, 25 Apr 2011 13:23:36 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110325; KDE/4.5.5; amd64; ; ) References: <201104240858.p3O8wwqT024628@svn.freebsd.org> <4DB47CD4.9060300@FreeBSD.org> In-Reply-To: <4DB47CD4.9060300@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201104251323.36510.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Mon, 25 Apr 2011 13:49:36 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, "Bjoern A. Zeeb" , Robert Watson , src-committers@freebsd.org Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2011 17:49:37 -0000 On Sunday, April 24, 2011 3:41:08 pm Alexander Motin wrote: > On 24.04.2011 21:59, Bjoern A. Zeeb wrote: > >> What's about creating some kind of symlinks, it could be nice if it > >> worked, but I don't see the way to do it on disk(9) or GEOM layers > >> without breaking device's access counters and as result further random > >> problems. > > > > I had been pondering devfs "link"s myself, the problem is that from the rc > > framework they come too late. If you can add a simple .ko that does it > > programmatically on 9 that would be great. The problem is that after booting > > the new kernel you don't know whether people had ATA_STATIC on or not, so > > we'd have to go with the defaults, that were in 8.x (and an extra tunable to > > flip the logic maybe)? > > Devfs links won't help users with hardcoded provider names in gmirror, > etc -- from GEOM PoV there will be no such providers. Also to create > proper mapping that module should have real-time information from CAM > about ATA controller details. And looking that it will have to link in > real time any derivative providers also (ad4s1a -> ada0s1a) I worry if > it is possible at all. Some devfs expert needed here. I think the biggest goal is to make /etc/fstab migration easiest. I wonder if you could leverage the device cloning callback in devfs to create symlinks on the fly as name lookups were done (so if mount tries to use /dev/ad4 from /etc/fstab the symlink would be created on the fly). This would allow you to handle arbitrary suffixes (i.e. just make sure it matches 'adX(.*)' and generate 'adaY\1' as the link target) without having to modify any of gpart, etc. to create a forest of symlinks. The only possible issue with this is that the devfs cloning eventhandler wants you to return a dev_t, not a symlink. That might still work fine (you might have to do a namei() lookup to find the adaX.* devfs entry), but then you would not get /dev/adX.* entries listed in /dev when you did an ls. Instead, trying to open those old names would just transparently "work". You could maybe print a message on the console warning that you were remapping an old name to a new one. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 18:15:45 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B27A106566B; Mon, 25 Apr 2011 18:15:45 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 793AF8FC15; Mon, 25 Apr 2011 18:15:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3PIFjT8086927; Mon, 25 Apr 2011 18:15:45 GMT (envelope-from cognet@svn.freebsd.org) Received: (from cognet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3PIFj0s086925; Mon, 25 Apr 2011 18:15:45 GMT (envelope-from cognet@svn.freebsd.org) Message-Id: <201104251815.p3PIFj0s086925@svn.freebsd.org> From: Olivier Houchard Date: Mon, 25 Apr 2011 18:15:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221025 - head/sys/arm/at91 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2011 18:15:45 -0000 Author: cognet Date: Mon Apr 25 18:15:45 2011 New Revision: 221025 URL: http://svn.freebsd.org/changeset/base/221025 Log: Typo fix Modified: head/sys/arm/at91/at91_wdt.c Modified: head/sys/arm/at91/at91_wdt.c ============================================================================== --- head/sys/arm/at91/at91_wdt.c Mon Apr 25 17:34:10 2011 (r221024) +++ head/sys/arm/at91/at91_wdt.c Mon Apr 25 18:15:45 2011 (r221025) @@ -102,7 +102,7 @@ wdt_watchdog(void *argp, u_int cmd, int else if (interval > 0) sc->cmd = interval | WD_ACTIVE; - /* We cannot turn of our watchdog so if user + /* We cannot turn off our watchdog so if user * fails to turn us on go to passive mode. */ if ((sc->cmd & WD_ACTIVE) == 0) sc->cmd = WD_PASSIVE; From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 18:35:47 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4830E106566B; Mon, 25 Apr 2011 18:35:47 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85]) by mx1.freebsd.org (Postfix) with ESMTP id A1AB98FC08; Mon, 25 Apr 2011 18:35:46 +0000 (UTC) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.4/8.14.4) with ESMTP id p3PIZkeF007091; Mon, 25 Apr 2011 11:35:46 -0700 (PDT) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.4/8.14.4/Submit) id p3PIZkr5007090; Mon, 25 Apr 2011 11:35:46 -0700 (PDT) (envelope-from obrien) Date: Mon, 25 Apr 2011 11:35:46 -0700 From: "David O'Brien" To: Alexander Motin Message-ID: <20110425183546.GA6188@dragon.NUXI.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201104240858.p3O8wwqT024628@svn.freebsd.org> X-Operating-System: FreeBSD 9.0-CURRENT X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? X-Mutt-References: <201104240858.p3O8wwqT024628@svn.freebsd.org> X-Mutt-Fcc: =sent User-Agent: Mutt/1.5.16 (2007-06-09) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@FreeBSD.org List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2011 18:35:47 -0000 On Sun, Apr 24, 2011 at 08:58:58AM +0000, Alexander Motin wrote: > Log: > Switch the GENERIC kernels for all architectures to the new CAM-based ATA > stack. It means that all legacy ATA drivers are disabled and replaced by > respective CAM drivers. If you are using ATA device names in /etc/fstab or > other places, make sure to update them respectively (adX -> adaY, > acdX -> cdY, afdX -> daY, astX -> saY, where 'Y's are the sequential > numbers for each type in order of detection, unless configured otherwise > with tunables, see cam(4)). I apologize if I missed a past discussion... but wasn't CAM designed so that all disk-like things would be 'da' (direct access) irregardless of underling protocol (SCSI/SAS/PATA/SATA)? "afdX -> daY" above helps suggest this. Wasn't that the reason we moved from 'sd' to 'da'? At least this was the impression on freebsd-current@ back when we when thru this in 1999 (e.g., <36EFF7C2.41C67EA6@whistle.com>, <4714.920569143@verdi.nethelp.no>, <29382.921672594@verdi.nethelp.no>, <199903172035.PAA07013@khavrinen.lcs.mit.edu>). Now ATA-CAM is the default, why aren't disks devices named by the established CAM names? If we're not going to call CAM controlled ATA disks "da", then why not keep the existing "ad" and "ar" given "ad" stood for "ATA-Disk" and "ATA-RAID" -- you're still calling the subsystem "ata". Otherwise, we can just recycle email from 1999 where folks didn't see much value in the sd->da change. -- -- David (obrien@FreeBSD.org) From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 19:15:58 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A01A81065675; Mon, 25 Apr 2011 19:15:58 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8D9D78FC13; Mon, 25 Apr 2011 19:15:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3PJFwJ7088706; Mon, 25 Apr 2011 19:15:58 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3PJFwZ7088704; Mon, 25 Apr 2011 19:15:58 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201104251915.p3PJFwZ7088704@svn.freebsd.org> From: Jilles Tjoelker Date: Mon, 25 Apr 2011 19:15:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221026 - head/usr.bin/printf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2011 19:15:58 -0000 Author: jilles Date: Mon Apr 25 19:15:58 2011 New Revision: 221026 URL: http://svn.freebsd.org/changeset/base/221026 Log: printf(1): Move non-bugs from the BUGS section to a new section CAVEATS. Modified: head/usr.bin/printf/printf.1 Modified: head/usr.bin/printf/printf.1 ============================================================================== --- head/usr.bin/printf/printf.1 Mon Apr 25 18:15:45 2011 (r221025) +++ head/usr.bin/printf/printf.1 Mon Apr 25 19:15:58 2011 (r221026) @@ -337,6 +337,16 @@ command appeared in It is modeled after the standard library function, .Xr printf 3 . +.Sh CAVEATS +.Tn ANSI +hexadecimal character constants were deliberately not provided. +.Pp +Trying to print a dash ("-") as the first character causes +.Nm +to interpret the dash as a program argument. +.Nm -- +must be used before +.Ar format . .Sh BUGS Since the floating point numbers are translated from .Tn ASCII @@ -348,9 +358,6 @@ The .Cm L modifier may produce additional precision, depending on the hardware platform.) .Pp -.Tn ANSI -hexadecimal character constants were deliberately not provided. -.Pp The escape sequence \e000 is the string terminator. When present in the argument for the .Cm b @@ -360,10 +367,3 @@ Multibyte characters are not recognized a problem if .Ql % can appear inside a multibyte character). -.Pp -Trying to print a dash ("-") as the first character causes -.Nm -to interpet the dash as a program argument. -.Nm -- -must be used before -.Ar format . From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 19:16:37 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E0F951065670; Mon, 25 Apr 2011 19:16:37 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-pw0-f54.google.com (mail-pw0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 43E818FC14; Mon, 25 Apr 2011 19:16:37 +0000 (UTC) Received: by pwj8 with SMTP id 8so1752716pwj.13 for ; Mon, 25 Apr 2011 12:16:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:references:in-reply-to:mime-version :content-transfer-encoding:content-type:message-id:cc:x-mailer:from :subject:date:to; bh=14eX7lr2Gjz4DDYr6VnS3uFqoxq4CXGGfgn/VDAAdFc=; b=dvustF1/4GcYxAekDjWxDHE02MJFia6qG7nKgcvzmWPciln5iWg7pGn+iTfjSq1F4Q aS//eF4FN8lK5YeVaqZ0W6T3sxQVXwj+cct2eLYB5cR3oXisCpJVvcIu8qKUV66JaqPG FzHaZm8j7DhEe3PODSB03Oc8vLZZ1AdxkT6bc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=references:in-reply-to:mime-version:content-transfer-encoding :content-type:message-id:cc:x-mailer:from:subject:date:to; b=UCqT4Vk75C9whk7CvAegepdIRycUT5WpriIi6zGTLBlZ4u61/LR3RZcv2JVtAIyMOS GhdzfDzKDPWa12CgHAB3svpFw//UlX49iOTO2Ll7061PSdr13r5YRDF03yi3mR6iXLOJ 5t3ORb0sOthBmLOIZXjGUUc+T3ED+wlyH2768= Received: by 10.142.151.4 with SMTP id y4mr2927244wfd.133.1303758996950; Mon, 25 Apr 2011 12:16:36 -0700 (PDT) Received: from [10.64.171.124] ([166.205.143.68]) by mx.google.com with ESMTPS id w14sm7257579wfh.8.2011.04.25.12.16.31 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 25 Apr 2011 12:16:35 -0700 (PDT) References: <201104240858.p3O8wwqT024628@svn.freebsd.org> <4DB441B0.8020906@FreeBSD.org> <20110425134531.GA4391@garage.freebsd.pl> <50385B7B-7EC8-4BC3-8F88-83F9EB4096FB@bsdimp.com> <4DB5A166.9010302@FreeBSD.org> In-Reply-To: <4DB5A166.9010302@FreeBSD.org> Mime-Version: 1.0 (iPhone Mail 8C148) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Message-Id: <11B524F2-70D6-4B8A-BC7C-005EB5D6E393@gmail.com> X-Mailer: iPhone Mail (8C148) From: Garrett Cooper Date: Mon, 25 Apr 2011 12:16:22 -0700 To: Alexander Motin Cc: "src-committers@FreeBSD.org" , Pawel Jakub Dawidek , "svn-src-all@FreeBSD.org" , "Bjoern A. Zeeb" , Robert Watson , "svn-src-head@FreeBSD.org" , Warner Losh Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2011 19:16:38 -0000 On Apr 25, 2011, at 9:29 AM, Alexander Motin wrote: > Warner Losh wrote: >> On Apr 25, 2011, at 7:45 AM, Pawel Jakub Dawidek wrote: >>> On Sun, Apr 24, 2011 at 06:59:40PM +0000, Bjoern A. Zeeb wrote: >>>> I had been pondering devfs "link"s myself, the problem is that from the= rc >>>> framework they come too late. If you can add a simple .ko that does it= >>>> programmatically on 9 that would be great. The problem is that after b= ooting >>>> the new kernel you don't know whether people had ATA_STATIC on or not, s= o >>>> we'd have to go with the defaults, that were in 8.x (and an extra tunab= le to >>>> flip the logic maybe)? >>> We do know that people have ATA_STATIC_ID, because if they don't, this >>> means they have their custom kernel config which doesn't contain ATA_CAM= >>> and when they will use it next time they recompile their kernel they >>> will still have /dev/adX entries. >>>=20 >>> Also, as Alexander already noted, because of all the problems with ATA >>> naming over the years and for other reasons too, people often hardcode >>> provider name in various GEOM classes metadata, so symlink won't help. >>=20 >> Do we have a short list of the places to look?=20 >=20 > Quick man pages grepping shows that at least gmirror, gstripe, graid3, > gjournal, gvirstor, gconcat, gshsec support provider names hardcoding. > For gmirror and graid3 present status can be obtained by: `gXXX list | > egrep "Flags: .*HARDCODED"`. For gvirstor, gshsec, gstripe and gconcat: > `gXXX dump adX | egrep "Hardcoded provider: ad"`. For gjournal: > `gjournal dump adX | egrep "hcprovider: ad"`. >=20 >> A lot of this could be done with a script that gets run at installworld a= nd boot time to hunt down the old cases and report them to the user before t= hey upgrade their kernel (but this would mean backing out the GENERIC change= for a while to give people a chance to upgrade to label-based provisioning.= .. >=20 > If I understand idea right, independently of how much we delay it, there > will be some people who not updated during that window to get in code > detecting it during boot. Hardly many people of target auditory updating > their systems each month. Same time some checks indeed could be done in > installkernel. For people like me who install multiple kernels and boot them at will, espec= ially when there are other features under a large degree of development, thi= s kind of action isn't acceptable because it shoots you in the foot when mov= ing between the different kernels. I'd prefer having an UPDATING note with all of the affected areas so that pe= ople can understand what needs to change and adjust their systems accordingl= y. As far as geom based hardcoding is concerned: maybe this can serve as a g= ood lesson of what shouldn't be done and what should be fixed/have a transla= tion layer added for this item? Thanks, -Garrett= From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 19:23:07 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 593CB106566C; Mon, 25 Apr 2011 19:23:07 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 4F92B8FC13; Mon, 25 Apr 2011 19:23:05 +0000 (UTC) Received: by bwz12 with SMTP id 12so2897960bwz.13 for ; Mon, 25 Apr 2011 12:23:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=V0bPMybhXpr0UBlWcTvuK5+VjaAzr+3+BI4YhmuBfsE=; b=v/eGL62D9wuzdZZgSlDpTvlvUJpWMXTT93Qom9LMVRI5C9tHKx6jL6PK303/ptWwci H8xI9RignomElZBxFjlBhCg2ulz/l0TwA5Sw4vxAu7MgGxSU3zKE9Q3IY3+WcT6hvi2n Zw1f3aEhgYGVfP+lOIdghYuLMS2sTEkbx7knE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=CmSbbn+OCCl9YPiikwVZ2vi7rX2F4k+YnXHc3QKpljnd6dYyJQLYdCVQf7TLun68aA +xhmhvVeZw+n2tDwaa8TatxMzGUoc0sXAzgCCeXYFyQb5Ajd6OxHmJsTkVuhedFbbx/Z mzh+CrHJSPpxl0z+CE3Ih+YWMGF/B8WfG5ZHc= Received: by 10.204.49.87 with SMTP id u23mr3734330bkf.171.1303759385067; Mon, 25 Apr 2011 12:23:05 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id 16sm3428414bkm.6.2011.04.25.12.23.03 (version=SSLv3 cipher=OTHER); Mon, 25 Apr 2011 12:23:04 -0700 (PDT) Sender: Alexander Motin Message-ID: <4DB5CA13.8040305@FreeBSD.org> Date: Mon, 25 Apr 2011 22:22:59 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: obrien@FreeBSD.org References: <20110425183546.GA6188@dragon.NUXI.org> In-Reply-To: <20110425183546.GA6188@dragon.NUXI.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2011 19:23:07 -0000 David O'Brien wrote: > On Sun, Apr 24, 2011 at 08:58:58AM +0000, Alexander Motin wrote: >> Log: >> Switch the GENERIC kernels for all architectures to the new CAM-based ATA >> stack. It means that all legacy ATA drivers are disabled and replaced by >> respective CAM drivers. If you are using ATA device names in /etc/fstab or >> other places, make sure to update them respectively (adX -> adaY, >> acdX -> cdY, afdX -> daY, astX -> saY, where 'Y's are the sequential >> numbers for each type in order of detection, unless configured otherwise >> with tunables, see cam(4)). > > I apologize if I missed a past discussion... but wasn't CAM designed > so that all disk-like things would be 'da' (direct access) irregardless > of underling protocol (SCSI/SAS/PATA/SATA)? "afdX -> daY" above helps > suggest this. Wasn't that the reason we moved from 'sd' to 'da'? > At least this was the impression on freebsd-current@ back when we when > thru this in 1999 (e.g., <36EFF7C2.41C67EA6@whistle.com>, > <4714.920569143@verdi.nethelp.no>, <29382.921672594@verdi.nethelp.no>, > <199903172035.PAA07013@khavrinen.lcs.mit.edu>). CAM unifies the way to execute commands on devices with different transports. That is why after this change afdX become daY and acdX become cdY -- they all use SCSI command set. adaX same time stays on it's own because it is ATA and uses different peripheral driver. It was one of options to go by emulation way, translating SCSI commands into ATA. That would turned all direct access devices into SCSI and daX, but we went other way to not implement additional state machines for this translation, since existing ata(4) state machine was horrible and we prefer to drop it completely. > Now ATA-CAM is the default, why aren't disks devices named by the > established CAM names? > > If we're not going to call CAM controlled ATA disks "da", then why not > keep the existing "ad" and "ar" given "ad" stood for "ATA-Disk" and > "ATA-RAID" -- you're still calling the subsystem "ata". What's about ad and ada, there is about 18 month history of early adopting this new ATA stack. Using same name initially wasn't possible due to collisions old stack, change now -- due to many adopted systems. What's about ar, it is not so principal to me. With new names I was trying to mimic other GEOMs behavior. But if people decide otherwise, I see no problem to change it now. > Otherwise, we can just recycle email from 1999 where folks didn't > see much value in the sd->da change. Sorry, I wasn't there in 1990s to speak about that change. -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 20:25:08 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 277441065676; Mon, 25 Apr 2011 20:25:08 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id CA3418FC1D; Mon, 25 Apr 2011 20:25:07 +0000 (UTC) Received: from [10.30.101.54] ([209.117.142.2]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p3PKKD11023681 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Mon, 25 Apr 2011 14:20:14 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <11B524F2-70D6-4B8A-BC7C-005EB5D6E393@gmail.com> Date: Mon, 25 Apr 2011 14:20:08 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201104240858.p3O8wwqT024628@svn.freebsd.org> <4DB441B0.8020906@FreeBSD.org> <20110425134531.GA4391@garage.freebsd.pl> <50385B7B-7EC8-4BC3-8F88-83F9EB4096FB@bsdimp.com> <4DB5A166.9010302@FreeBSD.org> <11B524F2-70D6-4B8A-BC7C-005EB5D6E393@gmail.com> To: Garrett Cooper X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Mon, 25 Apr 2011 14:20:15 -0600 (MDT) Cc: "src-committers@FreeBSD.org" , Pawel Jakub Dawidek , Alexander Motin , "Bjoern A. Zeeb" , Robert Watson , "svn-src-head@FreeBSD.org" , "svn-src-all@FreeBSD.org" Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2011 20:25:08 -0000 On Apr 25, 2011, at 1:16 PM, Garrett Cooper wrote: > On Apr 25, 2011, at 9:29 AM, Alexander Motin wrote: >=20 >> Warner Losh wrote: >>> On Apr 25, 2011, at 7:45 AM, Pawel Jakub Dawidek wrote: >>>> On Sun, Apr 24, 2011 at 06:59:40PM +0000, Bjoern A. Zeeb wrote: >>>>> I had been pondering devfs "link"s myself, the problem is that = from the rc >>>>> framework they come too late. If you can add a simple .ko that = does it >>>>> programmatically on 9 that would be great. The problem is that = after booting >>>>> the new kernel you don't know whether people had ATA_STATIC on or = not, so >>>>> we'd have to go with the defaults, that were in 8.x (and an extra = tunable to >>>>> flip the logic maybe)? >>>> We do know that people have ATA_STATIC_ID, because if they don't, = this >>>> means they have their custom kernel config which doesn't contain = ATA_CAM >>>> and when they will use it next time they recompile their kernel = they >>>> will still have /dev/adX entries. >>>>=20 >>>> Also, as Alexander already noted, because of all the problems with = ATA >>>> naming over the years and for other reasons too, people often = hardcode >>>> provider name in various GEOM classes metadata, so symlink won't = help. >>>=20 >>> Do we have a short list of the places to look?=20 >>=20 >> Quick man pages grepping shows that at least gmirror, gstripe, = graid3, >> gjournal, gvirstor, gconcat, gshsec support provider names = hardcoding. >> For gmirror and graid3 present status can be obtained by: `gXXX list = | >> egrep "Flags: .*HARDCODED"`. For gvirstor, gshsec, gstripe and = gconcat: >> `gXXX dump adX | egrep "Hardcoded provider: ad"`. For gjournal: >> `gjournal dump adX | egrep "hcprovider: ad"`. >>=20 >>> A lot of this could be done with a script that gets run at = installworld and boot time to hunt down the old cases and report them to = the user before they upgrade their kernel (but this would mean backing = out the GENERIC change for a while to give people a chance to upgrade to = label-based provisioning... >>=20 >> If I understand idea right, independently of how much we delay it, = there >> will be some people who not updated during that window to get in code >> detecting it during boot. Hardly many people of target auditory = updating >> their systems each month. Same time some checks indeed could be done = in >> installkernel. >=20 > For people like me who install multiple kernels and boot them at will, = especially when there are other features under a large degree of = development, this kind of action isn't acceptable because it shoots you = in the foot when moving between the different kernels. No it doesn't. (a) There will be an override flag, if you really don't want to. = WITHOUT_FSCK_SANITY_CHECK=3Dt and we're done. (b) The /dev/ufsid/*,/dev/gpt/*, /dev/ufs/* naming works on both flavors = of kernel. > I'd prefer having an UPDATING note with all of the affected areas so = that people can understand what needs to change and adjust their systems = accordingly. As far as geom based hardcoding is concerned: maybe this = can serve as a good lesson of what shouldn't be done and what should be = fixed/have a translation layer added for this item? I'd prefer having it be there also. Warner > Thanks, > -Garrett >=20 >=20 From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 20:54:12 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC1F81065673; Mon, 25 Apr 2011 20:54:12 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9E91E8FC18; Mon, 25 Apr 2011 20:54:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3PKsC6t091926; Mon, 25 Apr 2011 20:54:12 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3PKsCaN091921; Mon, 25 Apr 2011 20:54:12 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201104252054.p3PKsCaN091921@svn.freebsd.org> From: Jilles Tjoelker Date: Mon, 25 Apr 2011 20:54:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221027 - in head: bin/sh tools/regression/bin/sh/execution X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2011 20:54:12 -0000 Author: jilles Date: Mon Apr 25 20:54:12 2011 New Revision: 221027 URL: http://svn.freebsd.org/changeset/base/221027 Log: sh: Set $? to 0 for background commands. For backgrounded pipelines and subshells, the previous value of $? was being preserved, which is incorrect. For backgrounded simple commands containing a command substitution, the status of the last command substitution was returned instead of 0. If fork() fails, this is an error. Added: head/tools/regression/bin/sh/execution/bg1.0 (contents, props changed) head/tools/regression/bin/sh/execution/bg2.0 (contents, props changed) head/tools/regression/bin/sh/execution/bg3.0 (contents, props changed) Modified: head/bin/sh/eval.c Modified: head/bin/sh/eval.c ============================================================================== --- head/bin/sh/eval.c Mon Apr 25 19:15:58 2011 (r221026) +++ head/bin/sh/eval.c Mon Apr 25 20:54:12 2011 (r221027) @@ -420,7 +420,8 @@ evalsubshell(union node *n, int flags) INTOFF; exitstatus = waitforjob(jp, (int *)NULL); INTON; - } + } else + exitstatus = 0; } @@ -559,7 +560,8 @@ evalpipe(union node *n) exitstatus = waitforjob(jp, (int *)NULL); TRACE(("evalpipe: job done exit status %d\n", exitstatus)); INTON; - } + } else + exitstatus = 0; } @@ -1056,7 +1058,8 @@ parent: /* parent process gets here (if backcmd->fd = pip[0]; close(pip[1]); backcmd->jp = jp; - } + } else + exitstatus = 0; out: if (lastarg) Added: head/tools/regression/bin/sh/execution/bg1.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/execution/bg1.0 Mon Apr 25 20:54:12 2011 (r221027) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +: `false` & Added: head/tools/regression/bin/sh/execution/bg2.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/execution/bg2.0 Mon Apr 25 20:54:12 2011 (r221027) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +f() { return 42; } +f +: | : & Added: head/tools/regression/bin/sh/execution/bg3.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/execution/bg3.0 Mon Apr 25 20:54:12 2011 (r221027) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +f() { return 42; } +f +(:) & From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 21:14:14 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 01A3A106564A; Mon, 25 Apr 2011 21:14:14 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E1EBA8FC15; Mon, 25 Apr 2011 21:14:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3PLEDlT092584; Mon, 25 Apr 2011 21:14:13 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3PLEDoa092581; Mon, 25 Apr 2011 21:14:13 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201104252114.p3PLEDoa092581@svn.freebsd.org> From: Rick Macklem Date: Mon, 25 Apr 2011 21:14:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221028 - stable/8/usr.sbin/nfsd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2011 21:14:14 -0000 Author: rmacklem Date: Mon Apr 25 21:14:13 2011 New Revision: 221028 URL: http://svn.freebsd.org/changeset/base/221028 Log: MFC: r210933,r211397,r220518 Modify the man pages to reflect the addition of a backup stable restart file, as done by r220510. I also merged the typo fixes done in head as r210933, r211397 with joel@'s permission. This is a content change. Modified: stable/8/usr.sbin/nfsd/nfsv4.4 stable/8/usr.sbin/nfsd/stablerestart.5 Directory Properties: stable/8/usr.sbin/nfsd/ (props changed) Modified: stable/8/usr.sbin/nfsd/nfsv4.4 ============================================================================== --- stable/8/usr.sbin/nfsd/nfsv4.4 Mon Apr 25 20:54:12 2011 (r221027) +++ stable/8/usr.sbin/nfsd/nfsv4.4 Mon Apr 25 21:14:13 2011 (r221028) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 30, 2009 +.Dd April 10, 2011 .Dt NFSV4 4 .Os .Sh NAME @@ -56,12 +56,13 @@ open/lock state changing operations. To provide for correct recovery semantics, a small file described by .Xr stablerestart 5 is used by the server during the recovery phase. -If this file is missing, -the server will not start. -If this file is lost, it should be recovered from backups, since creating -an empty -.Xr stablerestart 5 -file will result in the server starting without providing a Grace Period +If this file is missing or empty, there is a backup copy maintained by +.Xr nfsd 8 +that will be used. If either file is missing, they will be +created by the +.Xr nfsd 8 . +If both the file and the backup copy are empty, +it will result in the server starting without providing a grace period for recovery. Note that recovery only occurs when the server machine is rebooted, not when the @@ -187,25 +188,9 @@ are set in .Pp You will also need to add at least one ``V4:'' line to the .Xr exports 5 -file and, before starting the server for the first time, create an empty -.sp -.Bd -literal -offset indent -compact -/var/db/nfs-stablerestart -.Ed -.sp -file. -The command -.sp -.Bd -literal -offset indent -compact -install -o root -g wheel -m 600 /dev/null /var/db/nfs-stablerestart -.Ed -.sp -executed as ``su'' should suffice. -This can only be done when the server is not running and there are no +file for .Nm -file system mounts against the server. -If this file is lost during a crash, recovery from backups is -recommended. +to work. .Pp If the file systems you are exporting are only being accessed via .Nm @@ -313,9 +298,11 @@ daemons at boot time via the ``nfsuserd_ .Xr rc.conf 5 variables. .Sh FILES -.Bl -tag -width /var/db/nfs-stablerestart -compact +.Bl -tag -width /var/db/nfs-stablerestart.bak -compact .It Pa /var/db/nfs-stablerestart NFS V4 stable restart file +.It Pa /var/db/nfs-stablerestart.bak +backup copy of the file .El .Sh SEE ALSO .Xr stablerestart 5 @@ -329,5 +316,5 @@ NFS V4 stable restart file At this time, there is no recall of delegations for local file system operations. As such, delegations should only be enabled for file systems -that are being used soley as NFS export volumes and are not being accessed +that are being used solely as NFS export volumes and are not being accessed via local system calls nor services such as Samba. Modified: stable/8/usr.sbin/nfsd/stablerestart.5 ============================================================================== --- stable/8/usr.sbin/nfsd/stablerestart.5 Mon Apr 25 20:54:12 2011 (r221027) +++ stable/8/usr.sbin/nfsd/stablerestart.5 Mon Apr 25 21:14:13 2011 (r221028) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Sept 7, 2007 +.Dd April 10, 2011 .Dt STABLERESTART 5 .Os .Sh NAME @@ -58,7 +58,7 @@ end of the Grace Period. The rest of the file are appended records, as defined by struct nfst_rec in /usr/include/fs/nfs/nfsrvstate.h and are used represent one of two things. There are records which indicate that a -client successfully aquired state and records that indicate a client's state was revoked. +client successfully acquired state and records that indicate a client's state was revoked. State revoke records indicate that state information for a client was discarded, due to lease expiry and an otherwise conflicting open or lock request being made by a different client. @@ -75,9 +75,11 @@ is written to stable storage by the time has returned. This might require hardware level caching to be disabled for a local disk drive that holds the file, or similar. .Sh FILES -.Bl -tag -width /var/db/nfs-stablerestart -compact +.Bl -tag -width /var/db/nfs-stablerestart.bak -compact .It Pa /var/db/nfs-stablerestart NFS V4 stable restart file +.It Pa /var/db/nfs-stablerestart.bak +backup copy of the file .El .Sh SEE ALSO .Xr nfsv4 4 @@ -86,8 +88,10 @@ NFS V4 stable restart file If the file is empty, the NFS V4 server has no choice but to return NFSERR_NOGRACE for all Reclaim requests. Although correct, this is a highly undesirable occurrence, so the file should not be lost if -at all possible. Nfsd will not create the file if it does not -exist and will simply log a failure to start, in the hopes that the -file can be recovered from a backup. To move the file, you must edit +at all possible. The backup copy of the file is maintained +and used by the +.Xr nfsd 8 +to minimize the risk of this occurring. +To move the file, you must edit the nfsd sources and recompile it. This was done to discourage accidental relocation of the file. From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 21:27:39 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B691106566C; Mon, 25 Apr 2011 21:27:39 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 088808FC15; Mon, 25 Apr 2011 21:27:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3PLRcgf093032; Mon, 25 Apr 2011 21:27:38 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3PLRcwI093030; Mon, 25 Apr 2011 21:27:38 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201104252127.p3PLRcwI093030@svn.freebsd.org> From: Rick Macklem Date: Mon, 25 Apr 2011 21:27:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221029 - stable/8/sys/fs/nfsserver X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2011 21:27:39 -0000 Author: rmacklem Date: Mon Apr 25 21:27:38 2011 New Revision: 221029 URL: http://svn.freebsd.org/changeset/base/221029 Log: MFC: r220546 Vrele ni_startdir in the experimental NFS server for the case of NFSv2 getting an error return from VOP_MKNOD(). Without this patch, the server file system remains busy after an NFSv2 VOP_MKNOD() fails. Modified: stable/8/sys/fs/nfsserver/nfs_nfsdport.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- stable/8/sys/fs/nfsserver/nfs_nfsdport.c Mon Apr 25 21:14:13 2011 (r221028) +++ stable/8/sys/fs/nfsserver/nfs_nfsdport.c Mon Apr 25 21:27:38 2011 (r221029) @@ -763,10 +763,9 @@ nfsvno_createsub(struct nfsrv_descript * &ndp->ni_cnd, &nvap->na_vattr); vput(ndp->ni_dvp); nfsvno_relpathbuf(ndp); - if (error) { - vrele(ndp->ni_startdir); + vrele(ndp->ni_startdir); + if (error) return (error); - } } else { vrele(ndp->ni_startdir); nfsvno_relpathbuf(ndp); From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 21:53:42 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57DBE106564A; Mon, 25 Apr 2011 21:53:42 +0000 (UTC) (envelope-from davidch@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4639E8FC16; Mon, 25 Apr 2011 21:53:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3PLrgQ2093852; Mon, 25 Apr 2011 21:53:42 GMT (envelope-from davidch@svn.freebsd.org) Received: (from davidch@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3PLrgkW093850; Mon, 25 Apr 2011 21:53:42 GMT (envelope-from davidch@svn.freebsd.org) Message-Id: <201104252153.p3PLrgkW093850@svn.freebsd.org> From: David Christensen Date: Mon, 25 Apr 2011 21:53:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221030 - head/sys/modules X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2011 21:53:42 -0000 Author: davidch Date: Mon Apr 25 21:53:41 2011 New Revision: 221030 URL: http://svn.freebsd.org/changeset/base/221030 Log: - Added bxe(4) driver for i386 and amd64. Currently untested on other CPU architectures. MFC after: One week Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Mon Apr 25 21:27:38 2011 (r221029) +++ head/sys/modules/Makefile Mon Apr 25 21:53:41 2011 (r221030) @@ -40,6 +40,8 @@ SUBDIR= ${_3dfx} \ bce \ bfe \ bge \ + ${_bxe} \ + ${_bxe} \ ${_bios} \ ${_bktr} \ ${_bm} \ @@ -383,6 +385,7 @@ _aout= aout _apm= apm _arcnet= arcnet _bktr= bktr +_bxe= bxe _cardbus= cardbus _cbb= cbb _ce= ce @@ -529,6 +532,7 @@ _amdsbwd= amdsbwd _amdtemp= amdtemp _arcmsr= arcmsr _asmc= asmc +_bxe= bxe _cardbus= cardbus _cbb= cbb _cmx= cmx From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 22:00:23 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94A311065670; Mon, 25 Apr 2011 22:00:23 +0000 (UTC) (envelope-from davidch@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 68B6D8FC0A; Mon, 25 Apr 2011 22:00:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3PM0NU2094125; Mon, 25 Apr 2011 22:00:23 GMT (envelope-from davidch@svn.freebsd.org) Received: (from davidch@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3PM0NiG094123; Mon, 25 Apr 2011 22:00:23 GMT (envelope-from davidch@svn.freebsd.org) Message-Id: <201104252200.p3PM0NiG094123@svn.freebsd.org> From: David Christensen Date: Mon, 25 Apr 2011 22:00:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221031 - head/sys/modules X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2011 22:00:23 -0000 Author: davidch Date: Mon Apr 25 22:00:23 2011 New Revision: 221031 URL: http://svn.freebsd.org/changeset/base/221031 Log: - Removed duplicate {_bxe} definition. MFC after: One week Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Mon Apr 25 21:53:41 2011 (r221030) +++ head/sys/modules/Makefile Mon Apr 25 22:00:23 2011 (r221031) @@ -41,7 +41,6 @@ SUBDIR= ${_3dfx} \ bfe \ bge \ ${_bxe} \ - ${_bxe} \ ${_bios} \ ${_bktr} \ ${_bm} \ From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 22:22:51 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA203106566B; Mon, 25 Apr 2011 22:22:51 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D633B8FC1B; Mon, 25 Apr 2011 22:22:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3PMMpxJ094882; Mon, 25 Apr 2011 22:22:51 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3PMMpJe094870; Mon, 25 Apr 2011 22:22:51 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201104252222.p3PMMpJe094870@svn.freebsd.org> From: Rick Macklem Date: Mon, 25 Apr 2011 22:22:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221032 - in head/sys: amd64/amd64 conf i386/i386 modules/nfscl modules/nfsclient nfs nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2011 22:22:52 -0000 Author: rmacklem Date: Mon Apr 25 22:22:51 2011 New Revision: 221032 URL: http://svn.freebsd.org/changeset/base/221032 Log: Fix the experimental NFS client so that it does not bogusly set the f_flags field of "struct statfs". This had the interesting effect of making the NFSv4 mounts "disappear" after r221014, since NFSMNT_NFSV4 and MNT_IGNORE became the same bit. Move the files used for a diskless NFS root from sys/nfsclient to sys/nfs in preparation for them to be used by both NFS clients. Also, move the declaration of the three global data structures from sys/nfsclient/nfs_vfsops.c to sys/nfs/nfs_diskless.c so that they are defined when either client uses them. Reviewed by: jhb MFC after: 2 weeks Added: head/sys/nfs/bootp_subr.c - copied, changed from r221031, head/sys/nfsclient/bootp_subr.c head/sys/nfs/krpc.h - copied unchanged from r221031, head/sys/nfsclient/krpc.h head/sys/nfs/krpc_subr.c - copied, changed from r221031, head/sys/nfsclient/krpc_subr.c head/sys/nfs/nfs_diskless.c - copied, changed from r221031, head/sys/nfsclient/nfs_diskless.c head/sys/nfs/nfsdiskless.h - copied unchanged from r221031, head/sys/nfsclient/nfsdiskless.h Deleted: head/sys/nfsclient/bootp_subr.c head/sys/nfsclient/krpc.h head/sys/nfsclient/krpc_subr.c head/sys/nfsclient/nfs_diskless.c head/sys/nfsclient/nfsdiskless.h Modified: head/sys/amd64/amd64/genassym.c head/sys/conf/files head/sys/i386/i386/genassym.c head/sys/modules/nfscl/Makefile head/sys/modules/nfsclient/Makefile head/sys/nfsclient/nfs_vfsops.c Modified: head/sys/amd64/amd64/genassym.c ============================================================================== --- head/sys/amd64/amd64/genassym.c Mon Apr 25 22:00:23 2011 (r221031) +++ head/sys/amd64/amd64/genassym.c Mon Apr 25 22:22:51 2011 (r221032) @@ -65,7 +65,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include #include #include Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Mon Apr 25 22:00:23 2011 (r221031) +++ head/sys/conf/files Mon Apr 25 22:22:51 2011 (r221032) @@ -2822,12 +2822,12 @@ netsmb/smb_smb.c optional netsmb netsmb/smb_subr.c optional netsmb netsmb/smb_trantcp.c optional netsmb netsmb/smb_usr.c optional netsmb +nfs/bootp_subr.c optional bootp nfsclient | bootp nfscl +nfs/krpc_subr.c optional bootp nfsclient | bootp nfscl nfs/nfs_common.c optional nfsclient | nfsserver +nfs/nfs_diskless.c optional nfsclient nfs_root | nfscl nfs_root nfs/nfs_lock.c optional nfsclient | nfscl | nfslockd | nfsd -nfsclient/bootp_subr.c optional bootp nfsclient -nfsclient/krpc_subr.c optional bootp nfsclient nfsclient/nfs_bio.c optional nfsclient -nfsclient/nfs_diskless.c optional nfsclient nfs_root nfsclient/nfs_node.c optional nfsclient nfsclient/nfs_krpc.c optional nfsclient nfsclient/nfs_subs.c optional nfsclient Modified: head/sys/i386/i386/genassym.c ============================================================================== --- head/sys/i386/i386/genassym.c Mon Apr 25 22:00:23 2011 (r221031) +++ head/sys/i386/i386/genassym.c Mon Apr 25 22:22:51 2011 (r221032) @@ -68,7 +68,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #ifdef DEV_APIC #include #endif Modified: head/sys/modules/nfscl/Makefile ============================================================================== --- head/sys/modules/nfscl/Makefile Mon Apr 25 22:00:23 2011 (r221031) +++ head/sys/modules/nfscl/Makefile Mon Apr 25 22:22:51 2011 (r221032) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../fs/nfsclient +.PATH: ${.CURDIR}/../../fs/nfsclient ${.CURDIR}/../../nfs KMOD= nfscl SRCS= vnode_if.h \ nfs_clrpcops.c \ @@ -22,4 +22,36 @@ SRCS= vnode_if.h \ opt_ufs.h \ opt_kgssapi.h +.if !defined(KERNBUILDDIR) +NFS_INET?= 1 # 0/1 - requires INET to be configured in kernel +NFS_INET6?= 1 # 0/1 - requires INET6 to be configured in kernel +NFS_ROOT?= 1 # 0/1 - requires NFS_ROOT to be configured in kernel + +.if ${NFS_INET} > 0 +opt_inet.h: + echo "#define INET 1" > ${.TARGET} +.endif + +.if ${NFS_INET6} > 0 +opt_inet6.h: + echo "#define INET6 1" > ${.TARGET} +.endif + +.if ${NFS_ROOT} > 0 +opt_nfsroot.h: + echo "#define NFS_ROOT 1" > ${.TARGET} +.endif +.else +OPT_NFS_ROOT!= cat ${KERNBUILDDIR}/opt_nfsroot.h +.if empty(OPT_NFS_ROOT) +NFS_ROOT= 0 +.else +NFS_ROOT= 1 +.endif +.endif + +.if ${NFS_ROOT} > 0 +SRCS+= nfs_diskless.c +.endif + .include Modified: head/sys/modules/nfsclient/Makefile ============================================================================== --- head/sys/modules/nfsclient/Makefile Mon Apr 25 22:00:23 2011 (r221031) +++ head/sys/modules/nfsclient/Makefile Mon Apr 25 22:22:51 2011 (r221032) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../nfsclient ${.CURDIR}/../../rpc +.PATH: ${.CURDIR}/../../nfsclient ${.CURDIR}/../../nfs ${.CURDIR}/../../rpc KMOD= nfsclient SRCS= vnode_if.h \ Copied and modified: head/sys/nfs/bootp_subr.c (from r221031, head/sys/nfsclient/bootp_subr.c) ============================================================================== --- head/sys/nfsclient/bootp_subr.c Mon Apr 25 22:00:23 2011 (r221031, copy source) +++ head/sys/nfs/bootp_subr.c Mon Apr 25 22:22:51 2011 (r221032) @@ -69,8 +69,8 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include +#include +#include #include Copied: head/sys/nfs/krpc.h (from r221031, head/sys/nfsclient/krpc.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/nfs/krpc.h Mon Apr 25 22:22:51 2011 (r221032, copy of r221031, head/sys/nfsclient/krpc.h) @@ -0,0 +1,31 @@ +/* $NetBSD: krpc.h,v 1.4 1995/12/19 23:07:11 cgd Exp $ */ +/* $FreeBSD$ */ + +#include + +struct mbuf; +struct thread; +struct sockaddr; +struct sockaddr_in; + +int krpc_call(struct sockaddr_in *_sin, + u_int prog, u_int vers, u_int func, + struct mbuf **data, struct sockaddr **from, struct thread *td); + +int krpc_portmap(struct sockaddr_in *_sin, + u_int prog, u_int vers, u_int16_t *portp, struct thread *td); + +struct mbuf *xdr_string_encode(char *str, int len); + +/* + * RPC definitions for the portmapper + */ +#define PMAPPORT 111 +#define PMAPPROG 100000 +#define PMAPVERS 2 +#define PMAPPROC_NULL 0 +#define PMAPPROC_SET 1 +#define PMAPPROC_UNSET 2 +#define PMAPPROC_GETPORT 3 +#define PMAPPROC_DUMP 4 +#define PMAPPROC_CALLIT 5 Copied and modified: head/sys/nfs/krpc_subr.c (from r221031, head/sys/nfsclient/krpc_subr.c) ============================================================================== --- head/sys/nfsclient/krpc_subr.c Mon Apr 25 22:00:23 2011 (r221031, copy source) +++ head/sys/nfs/krpc_subr.c Mon Apr 25 22:22:51 2011 (r221032) @@ -63,7 +63,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include /* Copied and modified: head/sys/nfs/nfs_diskless.c (from r221031, head/sys/nfsclient/nfs_diskless.c) ============================================================================== --- head/sys/nfsclient/nfs_diskless.c Mon Apr 25 22:00:23 2011 (r221031, copy source) +++ head/sys/nfs/nfs_diskless.c Mon Apr 25 22:22:51 2011 (r221032) @@ -55,13 +55,22 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include static int inaddr_to_sockaddr(char *ev, struct sockaddr_in *sa); static int hwaddr_to_sockaddr(char *ev, struct sockaddr_dl *sa); static int decode_nfshandle(char *ev, u_char *fh, int maxfh); /* + * This structure must be filled in by a primary bootstrap or bootstrap + * server for a diskless/dataless machine. It is initialized below just + * to ensure that it is allocated to initialized data (.data not .bss). + */ +struct nfs_diskless nfs_diskless = { { { 0 } } }; +struct nfsv3_diskless nfsv3_diskless = { { { 0 } } }; +int nfs_diskless_valid = 0; + +/* * Validate/sanity check a rsize/wsize parameter. */ static int Copied: head/sys/nfs/nfsdiskless.h (from r221031, head/sys/nfsclient/nfsdiskless.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/nfs/nfsdiskless.h Mon Apr 25 22:22:51 2011 (r221032, copy of r221031, head/sys/nfsclient/nfsdiskless.h) @@ -0,0 +1,114 @@ +/*- + * Copyright (c) 1991, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Rick Macklem at The University of Guelph. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVI