svn commit: r246533 - stable/9/sys/cddl/compat/opensolaris/sys
Author: avg Date: Fri Feb 8 07:59:13 2013 New Revision: 246533 URL: http://svnweb.freebsd.org/changeset/base/246533 Log: MFC r246244: solaris compat: remove KM_ZERO Modified: stable/9/sys/cddl/compat/opensolaris/sys/kmem.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cddl/compat/opensolaris/sys/kmem.h == --- stable/9/sys/cddl/compat/opensolaris/sys/kmem.h Fri Feb 8 07:49:54 2013(r246532) +++ stable/9/sys/cddl/compat/opensolaris/sys/kmem.h Fri Feb 8 07:59:13 2013(r246533) @@ -45,7 +45,6 @@ MALLOC_DECLARE(M_SOLARIS); #defineKM_SLEEPM_WAITOK #defineKM_PUSHPAGE M_WAITOK #defineKM_NOSLEEP M_NOWAIT -#defineKM_ZERO M_ZERO #defineKM_NODEBUG M_NODUMP #defineKMC_NOTOUCH 0 #defineKMC_NODEBUG UMA_ZONE_NODUMP ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r246534 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: avg Date: Fri Feb 8 08:03:03 2013 New Revision: 246534 URL: http://svnweb.freebsd.org/changeset/base/246534 Log: MFC r246242: zfs: add MODULE_VERSION for zfsctrl Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c == --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Fri Feb 8 07:59:13 2013(r246533) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Fri Feb 8 08:03:03 2013(r246534) @@ -5517,5 +5517,6 @@ static moduledata_t zfs_mod = { 0 }; DECLARE_MODULE(zfsctrl, zfs_mod, SI_SUB_VFS, SI_ORDER_ANY); +MODULE_VERSION(zfsctrl, 1); MODULE_DEPEND(zfsctrl, opensolaris, 1, 1, 1); MODULE_DEPEND(zfsctrl, krpc, 1, 1, 1); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r246535 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: avg Date: Fri Feb 8 08:03:18 2013 New Revision: 246535 URL: http://svnweb.freebsd.org/changeset/base/246535 Log: MFC r246242: zfs: add MODULE_VERSION for zfsctr Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/cddl/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c == --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Fri Feb 8 08:03:03 2013(r246534) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Fri Feb 8 08:03:18 2013(r246535) @@ -5517,5 +5517,6 @@ static moduledata_t zfs_mod = { 0 }; DECLARE_MODULE(zfsctrl, zfs_mod, SI_SUB_VFS, SI_ORDER_ANY); +MODULE_VERSION(zfsctrl, 1); MODULE_DEPEND(zfsctrl, opensolaris, 1, 1, 1); MODULE_DEPEND(zfsctrl, krpc, 1, 1, 1); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r246536 - head/sys/dev/ath
Author: adrian Date: Fri Feb 8 09:07:03 2013 New Revision: 246536 URL: http://svnweb.freebsd.org/changeset/base/246536 Log: Fix a corner case that I noticed with the AR5416 (and it's currently crappy 802.11n performance, sigh.) With the AR5416, aggregates need to be limited to 8KiB if RTS/CTS is enabled. However, larger aggregates were going out with RTSCTS enabled. The following was going on: * The first buffer in the list would have RTS/CTS enabled in bf->bf_state.txflags; * The aggregate would be formed; * The "copy over the txflags from the first buffer" logic that I added blanked the RTS/CTS TX flags fields, and then copied the bf_first RTS/CTS flags over; * .. but that'd cause bf_first to be blanked out! And thus the flag was cleared; * So the rest of the aggregate formation would run with those flags cleared, and thus > 8KiB aggregates were formed. The driver is now (again) correctly limiting aggregate formation for the AR5416 but there are still other pending issues to resolve. Tested: * AR5416, STA mode Modified: head/sys/dev/ath/if_ath_tx_ht.c Modified: head/sys/dev/ath/if_ath_tx_ht.c == --- head/sys/dev/ath/if_ath_tx_ht.c Fri Feb 8 08:03:18 2013 (r246535) +++ head/sys/dev/ath/if_ath_tx_ht.c Fri Feb 8 09:07:03 2013 (r246536) @@ -688,11 +688,6 @@ ath_tx_form_aggr(struct ath_softc *sc, s bf->bf_next = NULL; /* -* Don't unlock the tid lock until we're sure we are going -* to queue this frame. -*/ - - /* * If the frame doesn't have a sequence number that we're * tracking in the BAW (eg NULL QOS data frame), we can't * aggregate it. Stop the aggregation process; the sender @@ -749,11 +744,13 @@ ath_tx_form_aggr(struct ath_softc *sc, s * that differs from the first frame, override the * subsequent frame with this config. */ - bf->bf_state.bfs_txflags &= - ~ (HAL_TXDESC_RTSENA | HAL_TXDESC_CTSENA); - bf->bf_state.bfs_txflags |= - bf_first->bf_state.bfs_txflags & - (HAL_TXDESC_RTSENA | HAL_TXDESC_CTSENA); + if (bf != bf_first) { + bf->bf_state.bfs_txflags &= + ~ (HAL_TXDESC_RTSENA | HAL_TXDESC_CTSENA); + bf->bf_state.bfs_txflags |= + bf_first->bf_state.bfs_txflags & + (HAL_TXDESC_RTSENA | HAL_TXDESC_CTSENA); + } /* * If the packet has a sequence number, do not ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r246537 - head/sys/net80211
Author: adrian Date: Fri Feb 8 09:11:55 2013 New Revision: 246537 URL: http://svnweb.freebsd.org/changeset/base/246537 Log: Fix ieee80211_mesh.c compilation. * Add the superg.h header to allow ieee80211_check_ff() to work * Since the assert stuff creates assertions based on line numbers and there was a conflict, just nudge things down a bit. Modified: head/sys/net80211/ieee80211_mesh.c Modified: head/sys/net80211/ieee80211_mesh.c == --- head/sys/net80211/ieee80211_mesh.c Fri Feb 8 09:07:03 2013 (r246536) +++ head/sys/net80211/ieee80211_mesh.c Fri Feb 8 09:11:55 2013 (r246537) @@ -60,6 +60,9 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef IEEE80211_SUPPORT_SUPERG +#include +#endif #include #include @@ -110,6 +113,7 @@ SYSCTL_PROC(_net_wlan_mesh, OID_AUTO, re &ieee80211_mesh_retrytimeout, 0, ieee80211_sysctl_msecs_ticks, "I", "Retry timeout (msec)"); static int ieee80211_mesh_holdingtimeout = -1; + SYSCTL_PROC(_net_wlan_mesh, OID_AUTO, holdingtimeout, CTLTYPE_INT | CTLFLAG_RW, &ieee80211_mesh_holdingtimeout, 0, ieee80211_sysctl_msecs_ticks, "I", "Holding state timeout (msec)"); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r246538 - head/sys/cddl/dev/dtrace
Author: pluknet Date: Fri Feb 8 09:54:53 2013 New Revision: 246538 URL: http://svnweb.freebsd.org/changeset/base/246538 Log: Fix warning: comparison of unsigned expression < 0 is always false. Reported by: clang Modified: head/sys/cddl/dev/dtrace/dtrace_ioctl.c Modified: head/sys/cddl/dev/dtrace/dtrace_ioctl.c == --- head/sys/cddl/dev/dtrace/dtrace_ioctl.c Fri Feb 8 09:11:55 2013 (r246537) +++ head/sys/cddl/dev/dtrace/dtrace_ioctl.c Fri Feb 8 09:54:53 2013 (r246538) @@ -215,7 +215,7 @@ dtrace_ioctl(struct cdev *dev, u_long cm "DTRACEIOC_AGGSNAP":"DTRACEIOC_BUFSNAP", curcpu, desc.dtbd_cpu); - if (desc.dtbd_cpu < 0 || desc.dtbd_cpu >= NCPU) + if (desc.dtbd_cpu >= NCPU) return (ENOENT); if (pcpu_find(desc.dtbd_cpu) == NULL) return (ENOENT); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r246539 - stable/9/sys/fs/nfs
Author: kib Date: Fri Feb 8 10:20:00 2013 New Revision: 246539 URL: http://svnweb.freebsd.org/changeset/base/246539 Log: MFC r246213: Assert that the mbuf in the chain has sane length. Modified: stable/9/sys/fs/nfs/nfs_commonsubs.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/nfs/nfs_commonsubs.c == --- stable/9/sys/fs/nfs/nfs_commonsubs.cFri Feb 8 09:54:53 2013 (r246538) +++ stable/9/sys/fs/nfs/nfs_commonsubs.cFri Feb 8 10:20:00 2013 (r246539) @@ -199,6 +199,7 @@ nfsm_mbufuio(struct nfsrv_descript *nd, } mbufcp = NFSMTOD(mp, caddr_t); len = mbuf_len(mp); + KASSERT(len > 0, ("len %d", len)); } xfer = (left > len) ? len : left; #ifdef notdef ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r246540 - stable/9/sys/fs/msdosfs
Author: kib Date: Fri Feb 8 10:25:24 2013 New Revision: 246540 URL: http://svnweb.freebsd.org/changeset/base/246540 Log: MFC r246215: Fix a backwards comment in markvoldirty(). Modified: stable/9/sys/fs/msdosfs/msdosfs_fat.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/msdosfs/msdosfs_fat.c == --- stable/9/sys/fs/msdosfs/msdosfs_fat.c Fri Feb 8 10:20:00 2013 (r246539) +++ stable/9/sys/fs/msdosfs/msdosfs_fat.c Fri Feb 8 10:25:24 2013 (r246540) @@ -1114,7 +1114,7 @@ extendfile(dep, count, bpp, ncp, flags) * Routine to mark a FAT16 or FAT32 volume as "clean" or "dirty" by * manipulating the upper bit of the FAT entry for cluster 1. Note that * this bit is not defined for FAT12 volumes, which are always assumed to - * be dirty. + * be clean. * * The fatentry() routine only works on cluster numbers that a file could * occupy, so it won't manipulate the entry for cluster 1. So we have to do ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r246541 - stable/9/sys/fs/msdosfs
Author: kib Date: Fri Feb 8 10:30:04 2013 New Revision: 246541 URL: http://svnweb.freebsd.org/changeset/base/246541 Log: MFC r246216: The mountmsdosfs() function had an insane sanity test, remove it. Modified: stable/9/sys/fs/msdosfs/msdosfs_vfsops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/msdosfs/msdosfs_vfsops.c == --- stable/9/sys/fs/msdosfs/msdosfs_vfsops.cFri Feb 8 10:25:24 2013 (r246540) +++ stable/9/sys/fs/msdosfs/msdosfs_vfsops.cFri Feb 8 10:30:04 2013 (r246541) @@ -553,8 +553,7 @@ mountmsdosfs(struct vnode *devvp, struct } if (pmp->pm_RootDirEnts == 0) { - if (pmp->pm_Sectors - || pmp->pm_FATsecs + if (pmp->pm_FATsecs || getushort(b710->bpbFSVers)) { error = EINVAL; #ifdef MSDOSFS_DEBUG ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r246542 - stable/9/sys/fs/msdosfs
Author: kib Date: Fri Feb 8 10:34:07 2013 New Revision: 246542 URL: http://svnweb.freebsd.org/changeset/base/246542 Log: MFC r246217: Fix the corruption of the ".." entry for the directory moved to a subdirectory of the root on FAT32. Modified: stable/9/sys/fs/msdosfs/msdosfs_vnops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/msdosfs/msdosfs_vnops.c == --- stable/9/sys/fs/msdosfs/msdosfs_vnops.c Fri Feb 8 10:30:04 2013 (r246541) +++ stable/9/sys/fs/msdosfs/msdosfs_vnops.c Fri Feb 8 10:34:07 2013 (r246542) @@ -973,7 +973,7 @@ msdosfs_rename(ap) u_char to_count; int doingdirectory = 0, newparent = 0; int error; - u_long cn; + u_long cn, pcl; daddr_t bn; struct denode *fddep; /* from file's parent directory */ struct msdosfsmount *pmp; @@ -1246,9 +1246,12 @@ abortit: goto bad; } dotdotp = (struct direntry *)bp->b_data + 1; - putushort(dotdotp->deStartCluster, dp->de_StartCluster); + pcl = dp->de_StartCluster; + if (FAT32(pmp) && pcl == pmp->pm_rootdirblk) + pcl = MSDOSFSROOT; + putushort(dotdotp->deStartCluster, pcl); if (FAT32(pmp)) - putushort(dotdotp->deHighClust, dp->de_StartCluster >> 16); + putushort(dotdotp->deHighClust, pcl >> 16); if (DOINGASYNC(fvp)) bdwrite(bp); else if ((error = bwrite(bp)) != 0) { @@ -1369,8 +1372,13 @@ msdosfs_mkdir(ap) putushort(denp[0].deMDate, ndirent.de_MDate); putushort(denp[0].deMTime, ndirent.de_MTime); pcl = pdep->de_StartCluster; + /* +* Although the root directory has a non-magic starting cluster +* number for FAT32, chkdsk and fsck_msdosfs still require +* references to it in dotdot entries to be magic. +*/ if (FAT32(pmp) && pcl == pmp->pm_rootdirblk) - pcl = 0; + pcl = MSDOSFSROOT; putushort(denp[1].deStartCluster, pcl); putushort(denp[1].deCDate, ndirent.de_CDate); putushort(denp[1].deCTime, ndirent.de_CTime); @@ -1380,7 +1388,7 @@ msdosfs_mkdir(ap) putushort(denp[1].deMTime, ndirent.de_MTime); if (FAT32(pmp)) { putushort(denp[0].deHighClust, newcluster >> 16); - putushort(denp[1].deHighClust, pdep->de_StartCluster >> 16); + putushort(denp[1].deHighClust, pcl >> 16); } if (DOINGASYNC(ap->a_dvp)) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r246543 - stable/9/sys/fs/msdosfs
Author: kib Date: Fri Feb 8 10:38:12 2013 New Revision: 246543 URL: http://svnweb.freebsd.org/changeset/base/246543 Log: MFC r246218: Backup FATs were sometimes marked dirty by copying their first block from the primary FAT, and then they were not marked clean on unmount. Force marking them clean when appropriate. Modified: stable/9/sys/fs/msdosfs/msdosfs_fat.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/msdosfs/msdosfs_fat.c == --- stable/9/sys/fs/msdosfs/msdosfs_fat.c Fri Feb 8 10:34:07 2013 (r246542) +++ stable/9/sys/fs/msdosfs/msdosfs_fat.c Fri Feb 8 10:38:12 2013 (r246543) @@ -321,8 +321,8 @@ updatefats(pmp, bp, fatbn) struct buf *bp; u_long fatbn; { - int i; struct buf *bpn; + int cleanfat, i; #ifdef MSDOSFS_DEBUG printf("updatefats(pmp %p, bp %p, fatbn %lu)\n", pmp, bp, fatbn); @@ -362,12 +362,23 @@ updatefats(pmp, bp, fatbn) * filesystem was mounted. If synch is asked for then use * bwrite()'s and really slow things down. */ + if (fatbn != pmp->pm_fatblk || FAT12(pmp)) + cleanfat = 0; + else if (FAT16(pmp)) + cleanfat = 16; + else + cleanfat = 32; for (i = 1; i < pmp->pm_FATs; i++) { fatbn += pmp->pm_FATsecs; /* getblk() never fails */ bpn = getblk(pmp->pm_devvp, fatbn, bp->b_bcount, 0, 0, 0); bcopy(bp->b_data, bpn->b_data, bp->b_bcount); + /* Force the clean bit on in the other copies. */ + if (cleanfat == 16) + ((u_int8_t *)bpn->b_data)[3] |= 0x80; + else if (cleanfat == 32) + ((u_int8_t *)bpn->b_data)[7] |= 0x08; if (pmp->pm_flags & MSDOSFSMNT_WAITONFAT) bwrite(bpn); else ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r246544 - stable/9/sys/fs/msdosfs
Author: kib Date: Fri Feb 8 10:41:51 2013 New Revision: 246544 URL: http://svnweb.freebsd.org/changeset/base/246544 Log: MFC r246219: Use MNT_SYNCHRONOUS to decide to write the FAT updates syncrhonously. Modified: stable/9/sys/fs/msdosfs/msdosfs_fat.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/msdosfs/msdosfs_fat.c == --- stable/9/sys/fs/msdosfs/msdosfs_fat.c Fri Feb 8 10:38:12 2013 (r246543) +++ stable/9/sys/fs/msdosfs/msdosfs_fat.c Fri Feb 8 10:41:51 2013 (r246544) @@ -379,7 +379,7 @@ updatefats(pmp, bp, fatbn) ((u_int8_t *)bpn->b_data)[3] |= 0x80; else if (cleanfat == 32) ((u_int8_t *)bpn->b_data)[7] |= 0x08; - if (pmp->pm_flags & MSDOSFSMNT_WAITONFAT) + if (pmp->pm_mountp->mnt_flag & MNT_SYNCHRONOUS) bwrite(bpn); else bdwrite(bpn); @@ -389,7 +389,7 @@ updatefats(pmp, bp, fatbn) /* * Write out the first (or current) fat last. */ - if (pmp->pm_flags & MSDOSFSMNT_WAITONFAT) + if (pmp->pm_mountp->mnt_flag & MNT_SYNCHRONOUS) bwrite(bp); else bdwrite(bp); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r246545 - stable/8/sys/fs/msdosfs
Author: kib Date: Fri Feb 8 11:10:26 2013 New Revision: 246545 URL: http://svnweb.freebsd.org/changeset/base/246545 Log: MFC r246215: Fix a backwards comment in markvoldirty(). Modified: stable/8/sys/fs/msdosfs/msdosfs_fat.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/fs/ (props changed) Modified: stable/8/sys/fs/msdosfs/msdosfs_fat.c == --- stable/8/sys/fs/msdosfs/msdosfs_fat.c Fri Feb 8 10:41:51 2013 (r246544) +++ stable/8/sys/fs/msdosfs/msdosfs_fat.c Fri Feb 8 11:10:26 2013 (r246545) @@ -1114,7 +1114,7 @@ extendfile(dep, count, bpp, ncp, flags) * Routine to mark a FAT16 or FAT32 volume as "clean" or "dirty" by * manipulating the upper bit of the FAT entry for cluster 1. Note that * this bit is not defined for FAT12 volumes, which are always assumed to - * be dirty. + * be clean. * * The fatentry() routine only works on cluster numbers that a file could * occupy, so it won't manipulate the entry for cluster 1. So we have to do ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r246546 - in head/usr.sbin: bsdconfig sysrc
Author: dteske Date: Fri Feb 8 11:14:01 2013 New Revision: 246546 URL: http://svnweb.freebsd.org/changeset/base/246546 Log: Remove NO_OBJ from Makefiles that generate manuals because this causes the GZIP compressed manuals to appear in ./src instead of the appropriate obj dir. PR: conf/175844 Submitted by: Dominique Goncalves Modified: head/usr.sbin/bsdconfig/Makefile head/usr.sbin/sysrc/Makefile Modified: head/usr.sbin/bsdconfig/Makefile == --- head/usr.sbin/bsdconfig/MakefileFri Feb 8 11:10:26 2013 (r246545) +++ head/usr.sbin/bsdconfig/MakefileFri Feb 8 11:14:01 2013 (r246546) @@ -1,7 +1,5 @@ # $FreeBSD$ -NO_OBJ= - SUBDIR=console \ diskmgmt \ docsinstall \ Modified: head/usr.sbin/sysrc/Makefile == --- head/usr.sbin/sysrc/MakefileFri Feb 8 11:10:26 2013 (r246545) +++ head/usr.sbin/sysrc/MakefileFri Feb 8 11:14:01 2013 (r246546) @@ -1,7 +1,5 @@ # $FreeBSD$ -NO_OBJ= - SCRIPTS= sysrc MAN= sysrc.8 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r246547 - stable/8/sys/fs/msdosfs
Author: kib Date: Fri Feb 8 11:14:23 2013 New Revision: 246547 URL: http://svnweb.freebsd.org/changeset/base/246547 Log: MFC r246216: The mountmsdosfs() function had an insane sanity test, remove it. Modified: stable/8/sys/fs/msdosfs/msdosfs_vfsops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/fs/ (props changed) Modified: stable/8/sys/fs/msdosfs/msdosfs_vfsops.c == --- stable/8/sys/fs/msdosfs/msdosfs_vfsops.cFri Feb 8 11:14:01 2013 (r246546) +++ stable/8/sys/fs/msdosfs/msdosfs_vfsops.cFri Feb 8 11:14:23 2013 (r246547) @@ -551,8 +551,7 @@ mountmsdosfs(struct vnode *devvp, struct } if (pmp->pm_RootDirEnts == 0) { - if (pmp->pm_Sectors - || pmp->pm_FATsecs + if (pmp->pm_FATsecs || getushort(b710->bpbFSVers)) { error = EINVAL; #ifdef MSDOSFS_DEBUG ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r246548 - stable/8/sys/fs/msdosfs
Author: kib Date: Fri Feb 8 11:15:57 2013 New Revision: 246548 URL: http://svnweb.freebsd.org/changeset/base/246548 Log: MFC r246217: Fix the corruption of the ".." entry for the directory moved to a subdirectory of the root on FAT32. Modified: stable/8/sys/fs/msdosfs/msdosfs_vnops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/fs/ (props changed) Modified: stable/8/sys/fs/msdosfs/msdosfs_vnops.c == --- stable/8/sys/fs/msdosfs/msdosfs_vnops.c Fri Feb 8 11:14:23 2013 (r246547) +++ stable/8/sys/fs/msdosfs/msdosfs_vnops.c Fri Feb 8 11:15:57 2013 (r246548) @@ -974,7 +974,7 @@ msdosfs_rename(ap) u_char to_count; int doingdirectory = 0, newparent = 0; int error; - u_long cn; + u_long cn, pcl; daddr_t bn; struct denode *fddep; /* from file's parent directory */ struct msdosfsmount *pmp; @@ -1247,9 +1247,12 @@ abortit: goto bad; } dotdotp = (struct direntry *)bp->b_data + 1; - putushort(dotdotp->deStartCluster, dp->de_StartCluster); + pcl = dp->de_StartCluster; + if (FAT32(pmp) && pcl == pmp->pm_rootdirblk) + pcl = MSDOSFSROOT; + putushort(dotdotp->deStartCluster, pcl); if (FAT32(pmp)) - putushort(dotdotp->deHighClust, dp->de_StartCluster >> 16); + putushort(dotdotp->deHighClust, pcl >> 16); if (fvp->v_mount->mnt_flag & MNT_ASYNC) bdwrite(bp); else if ((error = bwrite(bp)) != 0) { @@ -1370,8 +1373,13 @@ msdosfs_mkdir(ap) putushort(denp[0].deMDate, ndirent.de_MDate); putushort(denp[0].deMTime, ndirent.de_MTime); pcl = pdep->de_StartCluster; + /* +* Although the root directory has a non-magic starting cluster +* number for FAT32, chkdsk and fsck_msdosfs still require +* references to it in dotdot entries to be magic. +*/ if (FAT32(pmp) && pcl == pmp->pm_rootdirblk) - pcl = 0; + pcl = MSDOSFSROOT; putushort(denp[1].deStartCluster, pcl); putushort(denp[1].deCDate, ndirent.de_CDate); putushort(denp[1].deCTime, ndirent.de_CTime); @@ -1381,7 +1389,7 @@ msdosfs_mkdir(ap) putushort(denp[1].deMTime, ndirent.de_MTime); if (FAT32(pmp)) { putushort(denp[0].deHighClust, newcluster >> 16); - putushort(denp[1].deHighClust, pdep->de_StartCluster >> 16); + putushort(denp[1].deHighClust, pcl >> 16); } if (ap->a_dvp->v_mount->mnt_flag & MNT_ASYNC) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r246549 - stable/8/sys/fs/msdosfs
Author: kib Date: Fri Feb 8 11:17:47 2013 New Revision: 246549 URL: http://svnweb.freebsd.org/changeset/base/246549 Log: MFC r246218: Backup FATs were sometimes marked dirty by copying their first block from the primary FAT, and then they were not marked clean on unmount. Force marking them clean when appropriate. Modified: stable/8/sys/fs/msdosfs/msdosfs_fat.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/fs/ (props changed) Modified: stable/8/sys/fs/msdosfs/msdosfs_fat.c == --- stable/8/sys/fs/msdosfs/msdosfs_fat.c Fri Feb 8 11:15:57 2013 (r246548) +++ stable/8/sys/fs/msdosfs/msdosfs_fat.c Fri Feb 8 11:17:47 2013 (r246549) @@ -321,8 +321,8 @@ updatefats(pmp, bp, fatbn) struct buf *bp; u_long fatbn; { - int i; struct buf *bpn; + int cleanfat, i; #ifdef MSDOSFS_DEBUG printf("updatefats(pmp %p, bp %p, fatbn %lu)\n", pmp, bp, fatbn); @@ -362,12 +362,23 @@ updatefats(pmp, bp, fatbn) * filesystem was mounted. If synch is asked for then use * bwrite()'s and really slow things down. */ + if (fatbn != pmp->pm_fatblk || FAT12(pmp)) + cleanfat = 0; + else if (FAT16(pmp)) + cleanfat = 16; + else + cleanfat = 32; for (i = 1; i < pmp->pm_FATs; i++) { fatbn += pmp->pm_FATsecs; /* getblk() never fails */ bpn = getblk(pmp->pm_devvp, fatbn, bp->b_bcount, 0, 0, 0); bcopy(bp->b_data, bpn->b_data, bp->b_bcount); + /* Force the clean bit on in the other copies. */ + if (cleanfat == 16) + ((u_int8_t *)bpn->b_data)[3] |= 0x80; + else if (cleanfat == 32) + ((u_int8_t *)bpn->b_data)[7] |= 0x08; if (pmp->pm_flags & MSDOSFSMNT_WAITONFAT) bwrite(bpn); else ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r246550 - stable/8/sys/fs/msdosfs
Author: kib Date: Fri Feb 8 11:19:43 2013 New Revision: 246550 URL: http://svnweb.freebsd.org/changeset/base/246550 Log: MFC r246219: Use MNT_SYNCHRONOUS to decide to write the FAT updates syncrhonously. Modified: stable/8/sys/fs/msdosfs/msdosfs_fat.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/fs/ (props changed) Modified: stable/8/sys/fs/msdosfs/msdosfs_fat.c == --- stable/8/sys/fs/msdosfs/msdosfs_fat.c Fri Feb 8 11:17:47 2013 (r246549) +++ stable/8/sys/fs/msdosfs/msdosfs_fat.c Fri Feb 8 11:19:43 2013 (r246550) @@ -379,7 +379,7 @@ updatefats(pmp, bp, fatbn) ((u_int8_t *)bpn->b_data)[3] |= 0x80; else if (cleanfat == 32) ((u_int8_t *)bpn->b_data)[7] |= 0x08; - if (pmp->pm_flags & MSDOSFSMNT_WAITONFAT) + if (pmp->pm_mountp->mnt_flag & MNT_SYNCHRONOUS) bwrite(bpn); else bdwrite(bpn); @@ -389,7 +389,7 @@ updatefats(pmp, bp, fatbn) /* * Write out the first (or current) fat last. */ - if (pmp->pm_flags & MSDOSFSMNT_WAITONFAT) + if (pmp->pm_mountp->mnt_flag & MNT_SYNCHRONOUS) bwrite(bp); else bdwrite(bp); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r246552 - head/share/man/man5
Author: des Date: Fri Feb 8 14:11:12 2013 New Revision: 246552 URL: http://svnweb.freebsd.org/changeset/base/246552 Log: Cross-reference newgrp(1), and document the use of pw(8) to set the group password. PR: docs/167741 MFC after:3 weeks Modified: head/share/man/man5/group.5 Modified: head/share/man/man5/group.5 == --- head/share/man/man5/group.5 Fri Feb 8 12:53:29 2013(r246551) +++ head/share/man/man5/group.5 Fri Feb 8 14:11:12 2013(r246552) @@ -32,7 +32,7 @@ .\" From: @(#)group.5 8.3 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd September 29, 1994 +.Dd February 8, 2013 .Dt GROUP 5 .Os .Sh NAME @@ -139,6 +139,7 @@ may still have this limit. .It Pa /etc/group .El .Sh SEE ALSO +.Xr newgrp 1 , .Xr passwd 1 , .Xr setgroups 2 , .Xr crypt 3 , @@ -156,9 +157,14 @@ file format appeared in .At v6 . Support for comments first appeared in .Fx 3.0 . -.Sh BUGS +.Sh IMPLEMENTATION NOTES The .Xr passwd 1 command does not change the .Nm passwords. +The +.Xr pw 8 +utility's +.Cm groupmod +command should be used instead. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r246553 - head/usr.bin/newgrp
Author: des Date: Fri Feb 8 14:14:00 2013 New Revision: 246553 URL: http://svnweb.freebsd.org/changeset/base/246553 Log: Print a warning if not setuid root. Document the need for the setuid bit and how to set it. Explain why it isn't set by default, and suggest simply adding users to groups instead. PR: docs/167741 MFC after:3 weeks Modified: head/usr.bin/newgrp/newgrp.1 head/usr.bin/newgrp/newgrp.c Modified: head/usr.bin/newgrp/newgrp.1 == --- head/usr.bin/newgrp/newgrp.1Fri Feb 8 14:11:12 2013 (r246552) +++ head/usr.bin/newgrp/newgrp.1Fri Feb 8 14:14:00 2013 (r246553) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 23, 2002 +.Dd February 8, 2013 .Dt NEWGRP 1 .Os .Sh NAME @@ -90,6 +90,15 @@ A utility appeared in .At v6 . .Sh BUGS +For security reasons, the +.Nm +utility is normally installed without the setuid bit. +To enable it, run the following command: +.Bd -literal -offset indent +chmod u+s /usr/bin/newgrp +.Ed +.Pp Group passwords are inherently insecure as there is no way to stop -users obtaining the crypted passwords from the group database. +users obtaining the password hash from the group database. Their use is discouraged. +Instead, users should simply be added to the necessary groups. Modified: head/usr.bin/newgrp/newgrp.c == --- head/usr.bin/newgrp/newgrp.cFri Feb 8 14:11:12 2013 (r246552) +++ head/usr.bin/newgrp/newgrp.cFri Feb 8 14:14:00 2013 (r246553) @@ -73,7 +73,8 @@ main(int argc, char *argv[]) { int ch, login; - euid = geteuid(); + if ((euid = geteuid()) != 0) + warnx("need root permissions to function properly, check setuid bit"); if (seteuid(getuid()) < 0) err(1, "seteuid"); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r246554 - head/sys/sparc64/include
Author: kib Date: Fri Feb 8 15:52:20 2013 New Revision: 246554 URL: http://svnweb.freebsd.org/changeset/base/246554 Log: The 'end' word was missed in the comment. MFC after: 3 days Modified: head/sys/sparc64/include/vmparam.h Modified: head/sys/sparc64/include/vmparam.h == --- head/sys/sparc64/include/vmparam.h Fri Feb 8 14:14:00 2013 (r246553) +++ head/sys/sparc64/include/vmparam.h Fri Feb 8 15:52:20 2013 (r246554) @@ -149,8 +149,8 @@ * * We define some interesting address constants: * - * VM_MIN_ADDRESS and VM_MAX_ADDRESS define the start and of the entire 64 bit - * address space, mostly just for convenience. + * VM_MIN_ADDRESS and VM_MAX_ADDRESS define the start and end of the entire + * 64 bit address space, mostly just for convenience. * * VM_MIN_DIRECT_ADDRESS and VM_MAX_DIRECT_ADDRESS define the start and end * of the direct mapped region. This maps virtual addresses to physical ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r246556 - head/libexec/rtld-elf/powerpc64
Author: nwhitehorn Date: Fri Feb 8 17:44:44 2013 New Revision: 246556 URL: http://svnweb.freebsd.org/changeset/base/246556 Log: Avoid use of register variables, which some compilers (e.g. clang) don't like. It makes the code a little clearer as well. MFC after:1 week Modified: head/libexec/rtld-elf/powerpc64/reloc.c Modified: head/libexec/rtld-elf/powerpc64/reloc.c == --- head/libexec/rtld-elf/powerpc64/reloc.c Fri Feb 8 16:10:16 2013 (r246555) +++ head/libexec/rtld-elf/powerpc64/reloc.c Fri Feb 8 17:44:44 2013 (r246556) @@ -486,8 +486,7 @@ init_pltgot(Obj_Entry *obj) void allocate_initial_tls(Obj_Entry *list) { - register Elf_Addr **tp __asm__("r13"); - Elf_Addr **_tp; + Elf_Addr **tp; /* * Fix the size of the static TLS block by using the maximum @@ -497,22 +496,19 @@ allocate_initial_tls(Obj_Entry *list) tls_static_space = tls_last_offset + tls_last_size + RTLD_STATIC_TLS_EXTRA; - _tp = (Elf_Addr **) ((char *)allocate_tls(list, NULL, TLS_TCB_SIZE, 16) + tp = (Elf_Addr **) ((char *)allocate_tls(list, NULL, TLS_TCB_SIZE, 16) + TLS_TP_OFFSET + TLS_TCB_SIZE); - /* -* XXX gcc seems to ignore 'tp = _tp;' -*/ - - __asm __volatile("mr %0,%1" : "=r"(tp) : "r"(_tp)); + __asm __volatile("mr 13,%0" :: "r"(tp)); } void* __tls_get_addr(tls_index* ti) { - register Elf_Addr **tp __asm__("r13"); + Elf_Addr **tp; char *p; + __asm __volatile("mr %0,13" : "=r"(tp)); p = tls_get_addr_common((Elf_Addr**)((Elf_Addr)tp - TLS_TP_OFFSET - TLS_TCB_SIZE), ti->ti_module, ti->ti_offset); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r246557 - head/bin/setfacl
Author: trasz Date: Fri Feb 8 18:02:28 2013 New Revision: 246557 URL: http://svnweb.freebsd.org/changeset/base/246557 Log: In the setfacl(1) manual page, make it clear that for NFSv4 ACLs, one should really use -a and -x instead of -m. MFC after:1 week Modified: head/bin/setfacl/setfacl.1 Modified: head/bin/setfacl/setfacl.1 == --- head/bin/setfacl/setfacl.1 Fri Feb 8 17:44:44 2013(r246556) +++ head/bin/setfacl/setfacl.1 Fri Feb 8 18:02:28 2013(r246557) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 2, 2012 +.Dd February 8, 2013 .Dt SETFACL 1 .Os .Sh NAME @@ -95,6 +95,11 @@ Modify the ACL entries on the specified entries and modifying existing ACL entries with the ACL entries specified in .Ar entries . +For NFSv4 ACLs, it is recommended to use the +.Fl a +and +.Fl x +instead. .It Fl M Ar file Modify the ACL entries on the specified files by adding new ACL entries and modifying existing ACL entries with the ACL ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r246558 - head/bin/setfacl
Author: trasz Date: Fri Feb 8 18:12:16 2013 New Revision: 246558 URL: http://svnweb.freebsd.org/changeset/base/246558 Log: Improve description of the "-m" option to setfacl(1). Submitted by: scottl MFC after:1 week Modified: head/bin/setfacl/setfacl.1 Modified: head/bin/setfacl/setfacl.1 == --- head/bin/setfacl/setfacl.1 Fri Feb 8 18:02:28 2013(r246557) +++ head/bin/setfacl/setfacl.1 Fri Feb 8 18:12:16 2013(r246558) @@ -91,15 +91,16 @@ An error will be reported if any of the specified files cannot have a default entry (i.e.\& non-directories). This option is not applicable to NFSv4 ACLs. .It Fl m Ar entries -Modify the ACL entries on the specified files by adding new -entries and modifying existing ACL entries with the ACL entries -specified in -.Ar entries . +Modify the ACL on the specified file. +New entries will be added, and existing entries will be modified +according to the +.Ar entries +argument. For NFSv4 ACLs, it is recommended to use the .Fl a and .Fl x -instead. +options instead. .It Fl M Ar file Modify the ACL entries on the specified files by adding new ACL entries and modifying existing ACL entries with the ACL ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r246559 - head/bin/setfacl
Author: trasz Date: Fri Feb 8 18:43:47 2013 New Revision: 246559 URL: http://svnweb.freebsd.org/changeset/base/246559 Log: Fix NFSv4 permission description in setfacl(1) manual page: the 'D' means delete_child, not delete. MFC after:1 week Modified: head/bin/setfacl/setfacl.1 Modified: head/bin/setfacl/setfacl.1 == --- head/bin/setfacl/setfacl.1 Fri Feb 8 18:12:16 2013(r246558) +++ head/bin/setfacl/setfacl.1 Fri Feb 8 18:43:47 2013(r246559) @@ -325,9 +325,9 @@ write_data execute .It p append_data -.It d -delete_child .It D +delete_child +.It d delete .It a read_attributes ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r246560 - head/usr.bin/patch
Author: pfg Date: Fri Feb 8 19:39:15 2013 New Revision: 246560 URL: http://svnweb.freebsd.org/changeset/base/246560 Log: patch: Follow original versioning convention. According to the README file [1] the 12u variant, unlike the 12g variant, contains no copyleft code. It is therefore convenient to keep using the original versioning scheme to prevent confusions. [1] http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/patch/README Modified: head/usr.bin/patch/util.c Modified: head/usr.bin/patch/util.c == --- head/usr.bin/patch/util.c Fri Feb 8 18:43:47 2013(r246559) +++ head/usr.bin/patch/util.c Fri Feb 8 19:39:15 2013(r246560) @@ -412,7 +412,7 @@ checked_in(char *file) void version(void) { - fprintf(stderr, "patch (BSD patch) 2.0-FreeBSD\n"); + fprintf(stderr, "patch 2.0-12u8 FreeBSD\n"); my_exit(EXIT_SUCCESS); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r246561 - head/share/man/man9
Author: alfred Date: Fri Feb 8 20:13:28 2013 New Revision: 246561 URL: http://svnweb.freebsd.org/changeset/base/246561 Log: add semicolon to end of CALLOUT_HANDLE_INITIALIZER example. Modified: head/share/man/man9/timeout.9 Modified: head/share/man/man9/timeout.9 == --- head/share/man/man9/timeout.9 Fri Feb 8 19:39:15 2013 (r246560) +++ head/share/man/man9/timeout.9 Fri Feb 8 20:13:28 2013 (r246561) @@ -62,7 +62,7 @@ typedef void timeout_t (void *); .Ft void .Fn callout_handle_init "struct callout_handle *handle" .Bd -literal -struct callout_handle handle = CALLOUT_HANDLE_INITIALIZER(&handle) +struct callout_handle handle = CALLOUT_HANDLE_INITIALIZER(&handle); .Ed .Ft void .Fn untimeout "timeout_t *func" "void *arg" "struct callout_handle handle" ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r246562 - in head/sys: fs/ext2fs ufs/ufs
Author: pfg Date: Fri Feb 8 20:30:19 2013 New Revision: 246562 URL: http://svnweb.freebsd.org/changeset/base/246562 Log: Remove unused MAXSYMLINKLEN macro. Reviewed by: mckusick PR: kern/175794 MFC after:1 week Modified: head/sys/fs/ext2fs/inode.h head/sys/ufs/ufs/inode.h Modified: head/sys/fs/ext2fs/inode.h == --- head/sys/fs/ext2fs/inode.h Fri Feb 8 20:13:28 2013(r246561) +++ head/sys/fs/ext2fs/inode.h Fri Feb 8 20:30:19 2013(r246562) @@ -108,7 +108,6 @@ struct inode { */ #definei_shortlink i_db #definei_rdev i_db[0] -#defineMAXSYMLINKLEN ((NDADDR + NIADDR) * sizeof(int32_t)) /* File permissions. */ #defineIEXEC 100 /* Executable. */ Modified: head/sys/ufs/ufs/inode.h == --- head/sys/ufs/ufs/inode.hFri Feb 8 20:13:28 2013(r246561) +++ head/sys/ufs/ufs/inode.hFri Feb 8 20:30:19 2013(r246562) @@ -151,10 +151,6 @@ struct inode { (ip)->i_din2->d##field = (val); \ } while (0) -#defineMAXSYMLINKLEN(ip) \ - ((ip)->i_ump->um_fstype == UFS1) ? \ - ((NDADDR + NIADDR) * sizeof(ufs1_daddr_t)) : \ - ((NDADDR + NIADDR) * sizeof(ufs2_daddr_t)) #defineSHORTLINK(ip) \ (((ip)->i_ump->um_fstype == UFS1) ? \ (caddr_t)(ip)->i_din1->di_db : (caddr_t)(ip)->i_din2->di_db) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r246563 - head/sys/fs/ext2fs
Author: pfg Date: Fri Feb 8 20:58:00 2013 New Revision: 246563 URL: http://svnweb.freebsd.org/changeset/base/246563 Log: ext2fs: make e2fs_maxcontig local and remove tautological check. e2fs_maxcontig was modelled after UFS when bringing the "Orlov allocator" to ext2. On UFS fs_maxcontig is kept in the superblock and is used by userland tools (fsck and growfs), In ext2 this information is volatile so it is not available for userland tools, so in this case it doesn't have sense to carry it in the in-memory superblock. Also remove a pointless check for MAX(1, x) > 0. Submitted by: Christoph Mallon MFC after:2 weeks Modified: head/sys/fs/ext2fs/ext2_vfsops.c head/sys/fs/ext2fs/ext2fs.h Modified: head/sys/fs/ext2fs/ext2_vfsops.c == --- head/sys/fs/ext2fs/ext2_vfsops.cFri Feb 8 20:30:19 2013 (r246562) +++ head/sys/fs/ext2fs/ext2_vfsops.cFri Feb 8 20:58:00 2013 (r246563) @@ -527,6 +527,7 @@ ext2_mountfs(struct vnode *devvp, struct int ronly; int i, size; int32_t *lp; + int32_t e2fs_maxcontig; ronly = vfs_flagopt(mp->mnt_optnew, "ro", NULL, 0); /* XXX: use VOP_ACESS to check FS perms */ @@ -601,12 +602,8 @@ ext2_mountfs(struct vnode *devvp, struct * in ext2fs doesn't have these variables, so we can calculate * them here. */ - ump->um_e2fs->e2fs_maxcontig = MAX(1, MAXPHYS / ump->um_e2fs->e2fs_bsize); - if (ump->um_e2fs->e2fs_maxcontig > 0) - ump->um_e2fs->e2fs_contigsumsize = - MIN(ump->um_e2fs->e2fs_maxcontig, EXT2_MAXCONTIG); - else - ump->um_e2fs->e2fs_contigsumsize = 0; + e2fs_maxcontig = MAX(1, MAXPHYS / ump->um_e2fs->e2fs_bsize); + ump->um_e2fs->e2fs_contigsumsize = MIN(e2fs_maxcontig, EXT2_MAXCONTIG); if (ump->um_e2fs->e2fs_contigsumsize > 0) { size = ump->um_e2fs->e2fs_gcount * sizeof(int32_t); ump->um_e2fs->e2fs_maxcluster = malloc(size, M_EXT2MNT, M_WAITOK); Modified: head/sys/fs/ext2fs/ext2fs.h == --- head/sys/fs/ext2fs/ext2fs.h Fri Feb 8 20:30:19 2013(r246562) +++ head/sys/fs/ext2fs/ext2fs.h Fri Feb 8 20:58:00 2013(r246563) @@ -170,7 +170,6 @@ struct m_ext2fs { char e2fs_wasvalid; /* valid at mount time */ off_te2fs_maxfilesize; struct ext2_gd *e2fs_gd; /* Group Descriptors */ - int32_t e2fs_maxcontig;/* max number of contiguous blks */ int32_t e2fs_contigsumsize;/* size of cluster summary array */ int32_t *e2fs_maxcluster; /* max cluster in each cyl group */ struct csum *e2fs_clustersum; /* cluster summary in each cyl group */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r246564 - head/sys/fs/ext2fs
Author: pfg Date: Fri Feb 8 21:09:44 2013 New Revision: 246564 URL: http://svnweb.freebsd.org/changeset/base/246564 Log: ext2fs: Replace redundant EXT2_MIN_BLOCK with EXT2_MIN_BLOCK_SIZE. Submitted by: Christoph Mallon MFC after:2 weeks Modified: head/sys/fs/ext2fs/ext2_vfsops.c head/sys/fs/ext2fs/ext2fs.h Modified: head/sys/fs/ext2fs/ext2_vfsops.c == --- head/sys/fs/ext2fs/ext2_vfsops.cFri Feb 8 20:58:00 2013 (r246563) +++ head/sys/fs/ext2fs/ext2_vfsops.cFri Feb 8 21:09:44 2013 (r246564) @@ -320,8 +320,8 @@ compute_sb_data(struct vnode *devvp, str struct buf *bp; uint32_t e2fs_descpb; - fs->e2fs_bsize = EXT2_MIN_BLOCK_SIZE << es->e2fs_log_bsize; fs->e2fs_bshift = EXT2_MIN_BLOCK_LOG_SIZE + es->e2fs_log_bsize; + fs->e2fs_bsize = 1U << fs->e2fs_bshift; fs->e2fs_fsbtodb = es->e2fs_log_bsize + 1; fs->e2fs_qbmask = fs->e2fs_bsize - 1; fs->e2fs_fsize = EXT2_MIN_FRAG_SIZE << es->e2fs_log_fsize; Modified: head/sys/fs/ext2fs/ext2fs.h == --- head/sys/fs/ext2fs/ext2fs.h Fri Feb 8 20:58:00 2013(r246563) +++ head/sys/fs/ext2fs/ext2fs.h Fri Feb 8 21:09:44 2013(r246564) @@ -303,7 +303,6 @@ struct csum { /* * Macro-instructions used to manage several block sizes */ -#define EXT2_MIN_BLOCK_SIZE1024 #defineEXT2_MAX_BLOCK_SIZE 4096 #define EXT2_MIN_BLOCK_LOG_SIZE 10 #define EXT2_BLOCK_SIZE(s) ((s)->e2fs_bsize) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r246565 - head/sys/dev/usb/wlan
Author: hselasky Date: Fri Feb 8 21:15:47 2013 New Revision: 246565 URL: http://svnweb.freebsd.org/changeset/base/246565 Log: Fix regression issue after r244503: Correct init order to fix a NULL pointer access. MFC after:1 week Reported by: Ian FREISLICH Modified: head/sys/dev/usb/wlan/if_uath.c head/sys/dev/usb/wlan/if_upgt.c Modified: head/sys/dev/usb/wlan/if_uath.c == --- head/sys/dev/usb/wlan/if_uath.c Fri Feb 8 21:09:44 2013 (r246564) +++ head/sys/dev/usb/wlan/if_uath.c Fri Feb 8 21:15:47 2013 (r246565) @@ -358,22 +358,12 @@ uath_attach(device_t dev) callout_init(&sc->stat_ch, 0); callout_init_mtx(&sc->watchdog_ch, &sc->sc_mtx, 0); - /* -* Allocate xfers for firmware commands. -*/ - error = uath_alloc_cmd_list(sc, sc->sc_cmd); - if (error != 0) { - device_printf(sc->sc_dev, - "could not allocate Tx command list\n"); - goto fail; - } - error = usbd_transfer_setup(uaa->device, &iface_index, sc->sc_xfer, uath_usbconfig, UATH_N_XFERS, sc, &sc->sc_mtx); if (error) { device_printf(dev, "could not allocate USB transfers, " "err=%s\n", usbd_errstr(error)); - goto fail1; + goto fail; } sc->sc_cmd_dma_buf = @@ -382,6 +372,16 @@ uath_attach(device_t dev) usbd_xfer_get_frame_buffer(sc->sc_xfer[UATH_BULK_TX], 0); /* +* Setup buffers for firmware commands. +*/ + error = uath_alloc_cmd_list(sc, sc->sc_cmd); + if (error != 0) { + device_printf(sc->sc_dev, + "could not allocate Tx command list\n"); + goto fail1; + } + + /* * We're now ready to send+receive firmware commands. */ UATH_LOCK(sc); @@ -492,8 +492,8 @@ uath_attach(device_t dev) fail4: if_free(ifp); fail3: UATH_UNLOCK(sc); -fail2: usbd_transfer_unsetup(sc->sc_xfer, UATH_N_XFERS); -fail1: uath_free_cmd_list(sc, sc->sc_cmd); +fail2: uath_free_cmd_list(sc, sc->sc_cmd); +fail1: usbd_transfer_unsetup(sc->sc_xfer, UATH_N_XFERS); fail: return (error); } Modified: head/sys/dev/usb/wlan/if_upgt.c == --- head/sys/dev/usb/wlan/if_upgt.c Fri Feb 8 21:09:44 2013 (r246564) +++ head/sys/dev/usb/wlan/if_upgt.c Fri Feb 8 21:15:47 2013 (r246565) @@ -259,20 +259,12 @@ upgt_attach(device_t dev) callout_init(&sc->sc_led_ch, 0); callout_init(&sc->sc_watchdog_ch, 0); - /* Allocate TX and RX xfers. */ - error = upgt_alloc_tx(sc); - if (error) - goto fail1; - error = upgt_alloc_rx(sc); - if (error) - goto fail2; - error = usbd_transfer_setup(uaa->device, &iface_index, sc->sc_xfer, upgt_config, UPGT_N_XFERS, sc, &sc->sc_mtx); if (error) { device_printf(dev, "could not allocate USB transfers, " "err=%s\n", usbd_errstr(error)); - goto fail3; + goto fail1; } sc->sc_rx_dma_buf = usbd_xfer_get_frame_buffer( @@ -280,6 +272,14 @@ upgt_attach(device_t dev) sc->sc_tx_dma_buf = usbd_xfer_get_frame_buffer( sc->sc_xfer[UPGT_BULK_TX], 0); + /* Setup TX and RX buffers */ + error = upgt_alloc_tx(sc); + if (error) + goto fail2; + error = upgt_alloc_rx(sc); + if (error) + goto fail3; + ifp = sc->sc_ifp = if_alloc(IFT_IEEE80211); if (ifp == NULL) { device_printf(dev, "can not if_alloc()\n"); @@ -382,9 +382,9 @@ upgt_attach(device_t dev) return (0); fail5: if_free(ifp); -fail4: usbd_transfer_unsetup(sc->sc_xfer, UPGT_N_XFERS); -fail3: upgt_free_rx(sc); -fail2: upgt_free_tx(sc); +fail4: upgt_free_rx(sc); +fail3: upgt_free_tx(sc); +fail2: usbd_transfer_unsetup(sc->sc_xfer, UPGT_N_XFERS); fail1: mtx_destroy(&sc->sc_mtx); return (error); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r246566 - stable/9/usr.bin/stdbuf
Author: jlh Date: Fri Feb 8 22:13:20 2013 New Revision: 246566 URL: http://svnweb.freebsd.org/changeset/base/246566 Log: MFC r245418: Allow commands without any additional arguments, as stated in the manpage. While here, exit early when there is nothing to do. PR:168415 Submitted by: Zhihao Yuan (initial version) MFC r245419: Remove stray tabs. Submitted by: kib Modified: stable/9/usr.bin/stdbuf/stdbuf.c Directory Properties: stable/9/usr.bin/stdbuf/ (props changed) Modified: stable/9/usr.bin/stdbuf/stdbuf.c == --- stable/9/usr.bin/stdbuf/stdbuf.cFri Feb 8 21:15:47 2013 (r246565) +++ stable/9/usr.bin/stdbuf/stdbuf.cFri Feb 8 22:13:20 2013 (r246566) @@ -39,7 +39,7 @@ extern char *__progname; static void usage(int s) { - + fprintf(stderr, "Usage: %s [-e 0|L|] [-i 0|L|] [-o 0|L|] " " [args ...]\n", __progname); exit(s); @@ -72,8 +72,8 @@ main(int argc, char *argv[]) } argc -= optind; argv += optind; - if (argc < 2) - usage(0); + if (argc == 0) + exit(0); if (ibuf != NULL && setenv("_STDBUF_I", ibuf, 1) == -1) warn("Failed to set environment variable: %s=%s", @@ -94,7 +94,7 @@ main(int argc, char *argv[]) if (i < 0 || putenv(preload1) == -1) warn("Failed to set environment variable: LD_PRELOAD"); - + preload0 = getenv("LD_32_PRELOAD"); if (preload0 == NULL) i = asprintf(&preload1, "LD_32_PRELOAD=" LIBSTDBUF32); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r246567 - stable/8/usr.bin/stdbuf
Author: jlh Date: Fri Feb 8 22:23:22 2013 New Revision: 246567 URL: http://svnweb.freebsd.org/changeset/base/246567 Log: MFC r245418: Allow commands without any additional arguments, as stated in the manpage. While here, exit early when there is nothing to do. PR:168415 Submitted by: Zhihao Yuan (initial version) MFC r245419: Remove stray tabs. Submitted by: kib Modified: stable/8/usr.bin/stdbuf/stdbuf.c Directory Properties: stable/8/usr.bin/stdbuf/ (props changed) Modified: stable/8/usr.bin/stdbuf/stdbuf.c == --- stable/8/usr.bin/stdbuf/stdbuf.cFri Feb 8 22:13:20 2013 (r246566) +++ stable/8/usr.bin/stdbuf/stdbuf.cFri Feb 8 22:23:22 2013 (r246567) @@ -39,7 +39,7 @@ extern char *__progname; static void usage(int s) { - + fprintf(stderr, "Usage: %s [-e 0|L|] [-i 0|L|] [-o 0|L|] " " [args ...]\n", __progname); exit(s); @@ -72,8 +72,8 @@ main(int argc, char *argv[]) } argc -= optind; argv += optind; - if (argc < 2) - usage(0); + if (argc == 0) + exit(0); if (ibuf != NULL && setenv("_STDBUF_I", ibuf, 1) == -1) warn("Failed to set environment variable: %s=%s", @@ -94,7 +94,7 @@ main(int argc, char *argv[]) if (i < 0 || putenv(preload1) == -1) warn("Failed to set environment variable: LD_PRELOAD"); - + preload0 = getenv("LD_32_PRELOAD"); if (preload0 == NULL) i = asprintf(&preload1, "LD_32_PRELOAD=" LIBSTDBUF32); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r246568 - head/sys/conf
Author: delphij Date: Fri Feb 8 22:41:48 2013 New Revision: 246568 URL: http://svnweb.freebsd.org/changeset/base/246568 Log: In r246282 the KTR_ENTRIES was specified with syntax error, fix it so 'make universe' would work. MFC after:12 days X-MFC-with: r246282 Modified: head/sys/conf/NOTES Modified: head/sys/conf/NOTES == --- head/sys/conf/NOTES Fri Feb 8 22:23:22 2013(r246567) +++ head/sys/conf/NOTES Fri Feb 8 22:41:48 2013(r246568) @@ -462,7 +462,7 @@ options KTRACE_REQUEST_POOL=101 # optionsKTR optionsKTR_BOOT_ENTRIES=1024 -optionsKTR_ENTRIES=(128 * 1024) +optionsKTR_ENTRIES=(128*1024) optionsKTR_COMPILE=(KTR_INTR|KTR_PROC) optionsKTR_MASK=KTR_INTR optionsKTR_CPUMASK=0x3 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r246570 - head/sys/dev/usb/wlan
Author: hselasky Date: Fri Feb 8 22:51:09 2013 New Revision: 246570 URL: http://svnweb.freebsd.org/changeset/base/246570 Log: Make sure we don't leak command buffers when a USB command transfer fails. MFC after:1 week Reported by: Ian FREISLICH Modified: head/sys/dev/usb/wlan/if_uath.c Modified: head/sys/dev/usb/wlan/if_uath.c == --- head/sys/dev/usb/wlan/if_uath.c Fri Feb 8 22:45:47 2013 (r246569) +++ head/sys/dev/usb/wlan/if_uath.c Fri Feb 8 22:51:09 2013 (r246570) @@ -2436,11 +2436,8 @@ uath_intr_tx_callback(struct usb_xfer *x UATH_ASSERT_LOCKED(sc); - switch (USB_GET_STATE(xfer)) { - case USB_ST_TRANSFERRED: - cmd = STAILQ_FIRST(&sc->sc_cmd_active); - if (cmd == NULL) - goto setup; + cmd = STAILQ_FIRST(&sc->sc_cmd_active); + if (cmd != NULL && USB_GET_STATE(xfer) != USB_ST_SETUP) { STAILQ_REMOVE_HEAD(&sc->sc_cmd_active, next); UATH_STAT_DEC(sc, st_cmd_active); STAILQ_INSERT_TAIL((cmd->flags & UATH_CMD_FLAG_READ) ? @@ -2449,7 +2446,10 @@ uath_intr_tx_callback(struct usb_xfer *x UATH_STAT_INC(sc, st_cmd_waiting); else UATH_STAT_INC(sc, st_cmd_inactive); - /* FALLTHROUGH */ + } + + switch (USB_GET_STATE(xfer)) { + case USB_ST_TRANSFERRED: case USB_ST_SETUP: setup: cmd = STAILQ_FIRST(&sc->sc_cmd_pending); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r246571 - head/sys/boot/usb
Author: hselasky Date: Fri Feb 8 23:13:46 2013 New Revision: 246571 URL: http://svnweb.freebsd.org/changeset/base/246571 Log: Correctly list the usbloader dependencies. Modified: head/sys/boot/usb/Makefile.test Modified: head/sys/boot/usb/Makefile.test == --- head/sys/boot/usb/Makefile.test Fri Feb 8 22:51:09 2013 (r246570) +++ head/sys/boot/usb/Makefile.test Fri Feb 8 23:13:46 2013 (r246571) @@ -53,9 +53,9 @@ SRCS+=bsd_usbloader_test.c LDADD+=libusbboot.a DPADD+= libusbboot.a -all: libusbboot.a - .include +${PROG}: libusbboot.a + libusbboot.a: make -f Makefile ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r246361 - head/sbin/devd
On Tue, 2013-02-05 at 14:29 +, Niclas Zeising wrote: > Author: zeising (doc,ports committer) > Date: Tue Feb 5 14:29:37 2013 > New Revision: 246361 > URL: http://svnweb.freebsd.org/changeset/base/246361 > > Log: > Bump .Dd for the change in r246121. > > Approved by:joel (mentor) > > Modified: > head/sbin/devd/devd.8 > > Modified: head/sbin/devd/devd.8 > == > --- head/sbin/devd/devd.8 Tue Feb 5 13:30:07 2013(r246360) > +++ head/sbin/devd/devd.8 Tue Feb 5 14:29:37 2013(r246361) > @@ -25,7 +25,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd November 24, 2005 > +.Dd January 30, 2013 > .Dt DEVD 8 > .Os > .Sh NAME Does this imply that I should update the .Dd line whenever I touch a manpage? -- Ian ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r246361 - head/sbin/devd
On 8 February 2013 18:31, Ian Lepore wrote: > Does this imply that I should update the .Dd line whenever I touch a > manpage? For content changes, yes. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r246574 - in stable/9: cddl/contrib/opensolaris/cmd/zdb sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys
Author: delphij Date: Sat Feb 9 00:29:36 2013 New Revision: 246574 URL: http://svnweb.freebsd.org/changeset/base/246574 Log: MFC r245264: The current ZFS code expects ddt_zap_count to always succeed by asserting the underlying zap_count() to return no errors. However, it is possible that the pool reaches to such a state where zap_count would return error, leading to panics when a pool is imported. This commit changes the ddt_zap_count to return error returned from zap_count and handle the error appropriately. With this change, it's now possible to let zpool rollback damaged transaction groups and import the pool. Obtained from:ZFS on Linux github (e8fd45a0f975c6b8ae8cd644714fc21f14fac2bf) Modified: stable/9/cddl/contrib/opensolaris/cmd/zdb/zdb.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ddt_zap.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/ddt.h Directory Properties: stable/9/cddl/ (props changed) stable/9/cddl/contrib/opensolaris/ (props changed) stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/cmd/zdb/zdb.c == --- stable/9/cddl/contrib/opensolaris/cmd/zdb/zdb.c Fri Feb 8 23:59:21 2013(r246573) +++ stable/9/cddl/contrib/opensolaris/cmd/zdb/zdb.c Sat Feb 9 00:29:36 2013(r246574) @@ -704,7 +704,9 @@ dump_ddt(ddt_t *ddt, enum ddt_type type, return; ASSERT(error == 0); - if ((count = ddt_object_count(ddt, type, class)) == 0) + error = ddt_object_count(ddt, type, class, &count); + ASSERT(error == 0); + if (count == 0) return; dspace = doi.doi_physical_blocks_512 << 9; Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c == --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c Fri Feb 8 23:59:21 2013(r246573) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c Sat Feb 9 00:29:36 2013(r246574) @@ -89,12 +89,13 @@ ddt_object_destroy(ddt_t *ddt, enum ddt_ spa_t *spa = ddt->ddt_spa; objset_t *os = ddt->ddt_os; uint64_t *objectp = &ddt->ddt_object[type][class]; + uint64_t count; char name[DDT_NAMELEN]; ddt_object_name(ddt, type, class, name); ASSERT(*objectp != 0); - ASSERT(ddt_object_count(ddt, type, class) == 0); + VERIFY(ddt_object_count(ddt, type, class, &count) == 0 && count == 0); ASSERT(ddt_histogram_empty(&ddt->ddt_histogram[type][class])); VERIFY(zap_remove(os, DMU_POOL_DIRECTORY_OBJECT, name, tx) == 0); VERIFY(zap_remove(os, spa->spa_ddt_stat_object, name, tx) == 0); @@ -109,6 +110,7 @@ ddt_object_load(ddt_t *ddt, enum ddt_typ { ddt_object_t *ddo = &ddt->ddt_object_stats[type][class]; dmu_object_info_t doi; + uint64_t count; char name[DDT_NAMELEN]; int error; @@ -129,7 +131,11 @@ ddt_object_load(ddt_t *ddt, enum ddt_typ */ VERIFY(ddt_object_info(ddt, type, class, &doi) == 0); - ddo->ddo_count = ddt_object_count(ddt, type, class); + error = ddt_object_count(ddt, type, class, &count); + if (error) + return error; + + ddo->ddo_count = count; ddo->ddo_dspace = doi.doi_physical_blocks_512 << 9; ddo->ddo_mspace = doi.doi_fill_count * doi.doi_data_block_size; @@ -143,6 +149,7 @@ ddt_object_sync(ddt_t *ddt, enum ddt_typ { ddt_object_t *ddo = &ddt->ddt_object_stats[type][class]; dmu_object_info_t doi; + uint64_t count; char name[DDT_NAMELEN]; ddt_object_name(ddt, type, class, name); @@ -155,8 +162,9 @@ ddt_object_sync(ddt_t *ddt, enum ddt_typ * Cache DDT statistics; this is the only time they'll change. */ VERIFY(ddt_object_info(ddt, type, class, &doi) == 0); + VERIFY(ddt_object_count(ddt, type, class, &count) == 0); - ddo->ddo_count = ddt_object_count(ddt, type, class); + ddo->ddo_count = count; ddo->ddo_dspace = doi.doi_physical_blocks_512 << 9; ddo->ddo_mspace = doi.doi_fill_count * doi.doi_data_block_size; } @@ -213,13 +221,13 @@ ddt_object_walk(ddt_t *ddt, enum ddt_typ ddt->ddt_object[type][class], dde, walk)); } -uint64_t -ddt_object_count(ddt_t *ddt, enum ddt_type type, enum ddt_class class) +int +ddt_object_count(ddt_t *ddt, enum ddt_type type, enum ddt_class class, uint64_t *count) { ASSERT(ddt_object_exists(ddt, type, class)); return (ddt_ops[type]->ddt_op_count(ddt->ddt_os, - ddt->ddt_object[type][class])); + ddt->ddt_object[type][class], count)); } int @@ -1079,11 +1087,13 @
svn commit: r246575 - head/sys/dev/cxgbe
Author: np Date: Sat Feb 9 00:35:28 2013 New Revision: 246575 URL: http://svnweb.freebsd.org/changeset/base/246575 Log: Do not hold locks around hardware context reads. MFC after:3 days Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c == --- head/sys/dev/cxgbe/t4_main.cSat Feb 9 00:29:36 2013 (r246574) +++ head/sys/dev/cxgbe/t4_main.cSat Feb 9 00:35:28 2013 (r246575) @@ -5161,23 +5161,24 @@ get_sge_context(struct adapter *sc, stru cntxt->mem_id != CTXT_FLM && cntxt->mem_id != CTXT_CNM) return (EINVAL); + rc = begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, "t4ctxt"); + if (rc) + return (rc); + if (sc->flags & FW_OK) { - rc = begin_synchronized_op(sc, NULL, HOLD_LOCK, "t4ctxt"); - if (rc == 0) { - rc = -t4_sge_ctxt_rd(sc, sc->mbox, cntxt->cid, - cntxt->mem_id, &cntxt->data[0]); - end_synchronized_op(sc, LOCK_HELD); - if (rc == 0) - return (0); - } + rc = -t4_sge_ctxt_rd(sc, sc->mbox, cntxt->cid, cntxt->mem_id, + &cntxt->data[0]); + if (rc == 0) + goto done; } /* * Read via firmware failed or wasn't even attempted. Read directly via * the backdoor. */ - rc = -t4_sge_ctxt_rd_bd(sc, cntxt->cid, cntxt->mem_id, - &cntxt->data[0]); + rc = -t4_sge_ctxt_rd_bd(sc, cntxt->cid, cntxt->mem_id, &cntxt->data[0]); +done: + end_synchronized_op(sc, 0); return (rc); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r246576 - in stable/9/usr.sbin/crunch: crunchgen crunchide examples
Author: pfg Date: Sat Feb 9 01:08:49 2013 New Revision: 246576 URL: http://svnweb.freebsd.org/changeset/base/246576 Log: MFC r237574, r237625, r246256; crunch: Sync some NetBSD changes. crunchide: Apr 11, 2009: fix some -Wsign-compare issues. Sep 20, 1999: Free the right thing. crunchgen: Apr 14, 2009: Fix some WARNS=4 issues (-Wshadow -Wcast-qual) Oct 30, 2004: Add (unsigned char) cast to ctype functions Feb 5, 2001: fix nested extern. examples: Aug 30, 2007: NetBSD 36867 - trsp references are deprecated In order to merge this I also had to merge some previous changes: - Ensure crunchen uses the same make binary as the rest of the build. - Some amount of style(9): function definitions, header ordering, and $FreeBSD$. Modified: stable/9/usr.sbin/crunch/crunchgen/crunched_main.c stable/9/usr.sbin/crunch/crunchgen/crunchgen.c stable/9/usr.sbin/crunch/crunchide/crunchide.c stable/9/usr.sbin/crunch/crunchide/exec_elf32.c stable/9/usr.sbin/crunch/examples/really-big.conf Directory Properties: stable/9/usr.sbin/crunch/ (props changed) Modified: stable/9/usr.sbin/crunch/crunchgen/crunched_main.c == --- stable/9/usr.sbin/crunch/crunchgen/crunched_main.c Sat Feb 9 00:35:28 2013(r246575) +++ stable/9/usr.sbin/crunch/crunchgen/crunched_main.c Sat Feb 9 01:08:49 2013(r246576) @@ -22,8 +22,6 @@ * Author: James da Silva, Systems Design and Analysis Group *Computer Science Department *University of Maryland at College Park - * - * $FreeBSD$ */ /* * crunched_main.c - main program for crunched binaries, it branches to a @@ -33,6 +31,10 @@ * or calls one of them based on argv[1]. This allows the testing of * the crunched binary without creating all the links. */ + +#include +__FBSDID("$FreeBSD$"); + #include #include #include @@ -45,7 +47,8 @@ struct stub { extern char *__progname; extern struct stub entry_points[]; -int main(int argc, char **argv, char **envp) +int +main(int argc, char **argv, char **envp) { char *slash, *basename; struct stub *ep; @@ -68,7 +71,8 @@ int main(int argc, char **argv, char **e } -int crunched_here(char *path) +int +crunched_here(char *path) { char *slash, *basename; struct stub *ep; @@ -83,7 +87,8 @@ int crunched_here(char *path) } -int crunched_main(int argc, char **argv, char **envp) +int +crunched_main(int argc, char **argv, char **envp) { char *slash; struct stub *ep; @@ -99,7 +104,8 @@ int crunched_main(int argc, char **argv, } -int crunched_usage() +int +crunched_usage() { int columns, len; struct stub *ep; @@ -122,4 +128,3 @@ int crunched_usage() } /* end of crunched_main.c */ - Modified: stable/9/usr.sbin/crunch/crunchgen/crunchgen.c == --- stable/9/usr.sbin/crunch/crunchgen/crunchgen.c Sat Feb 9 00:35:28 2013(r246575) +++ stable/9/usr.sbin/crunch/crunchgen/crunchgen.c Sat Feb 9 01:08:49 2013(r246576) @@ -22,8 +22,6 @@ * Author: James da Silva, Systems Design and Analysis Group *Computer Science Department *University of Maryland at College Park - * - * $FreeBSD$ */ /* * @@ -32,9 +30,12 @@ * Generates a Makefile and main C file for a crunched executable, * from specs given in a .conf file. */ -#include -#include + +#include +__FBSDID("$FreeBSD$"); + #include +#include #include #include @@ -92,6 +93,7 @@ char outmkname[MAXPATHLEN], outcfname[MA char tempfname[MAXPATHLEN], cachename[MAXPATHLEN], curfilename[MAXPATHLEN]; char outhdrname[MAXPATHLEN] ; /* user-supplied header for *.mk */ char *objprefix; /* where are the objects ? */ +char *path_make; int linenum = -1; int goterror = 0; @@ -103,22 +105,24 @@ int list_mode; /* general library routines */ -void status(char *str); +void status(const char *str); void out_of_memory(void); void add_string(strlst_t **listp, char *str); -int is_dir(char *pathname); -int is_nonempty_file(char *pathname); +int is_dir(const char *pathname); +int is_nonempty_file(const char *pathname); int subtract_strlst(strlst_t **lista, strlst_t **listb); int in_list(strlst_t **listp, char *str); -/* helper routines for main() */ + +extern char *crunched_skel[]; void usage(void); void parse_conf_file(void); void gen_outputs(void); -int main(int argc, char **argv) +int +main(int argc, char **argv) { char *p; int optc; @@ -127,6 +131,10 @@ int main(int argc, char **argv) readcache = 1; *outmkname = *outcfname = *execfname = '\0'; + path_make = getenv("MAKE"); + if (path_make == NULL || *path_make == '\0') +
svn commit: r246577 - in stable/8: cddl/compat/opensolaris/include sys/cddl/compat/opensolaris/sys sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys
Author: delphij Date: Sat Feb 9 01:38:43 2013 New Revision: 246577 URL: http://svnweb.freebsd.org/changeset/base/246577 Log: MFC r222950 (gibbs): Remove C constructs that are incompatible with C++ from various OpenSolaris and ZFS header files. These changes are sufficient to allow a C++ program to use the libzfs library. Note: The majority of these files already included 'extern "C"' declarations, so the intention of providing C++ compatibility already existed even if it wasn't provided. cddl/compat/opensolaris/include/assert.h: Wrap our compatibility assert implementation in 'extern "C"'. Since this is a compatibility header I matched the Solaris style of doing this explicitly rather than rely on FreeBSD's __BEGIN/END_DECLS macro. sys/cddl/compat/opensolaris/sys/kstat.h: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/ddt.h: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h: Rename parameters in function declarations that conflict with C++ keywords. This was the solution preferred by members of the Illumos community. sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h: In C, nested structures are visible in the global namespace, but in C++, they take on the namespace of the structure in which they are contained. Flatten nested structure definitions within struct zfs_cmd so these structures are visible in the global namespace when compiled in both languages. Sponsored by: Spectra Logic Corporation Modified: stable/8/cddl/compat/opensolaris/include/assert.h stable/8/sys/cddl/compat/opensolaris/sys/kstat.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/ddt.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Directory Properties: stable/8/cddl/ (props changed) stable/8/cddl/compat/opensolaris/ (props changed) stable/8/sys/ (props changed) stable/8/sys/cddl/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/8/cddl/compat/opensolaris/include/assert.h == --- stable/8/cddl/compat/opensolaris/include/assert.h Sat Feb 9 01:08:49 2013(r246576) +++ stable/8/cddl/compat/opensolaris/include/assert.h Sat Feb 9 01:38:43 2013(r246577) @@ -43,6 +43,10 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif + static __inline void __assert(const char *expr, const char *file, int line) { @@ -52,4 +56,9 @@ __assert(const char *expr, const char *f abort(); /* NOTREACHED */ } + +#ifdef __cplusplus +} +#endif + #endif /* !_ASSERT_H_ */ Modified: stable/8/sys/cddl/compat/opensolaris/sys/kstat.h == --- stable/8/sys/cddl/compat/opensolaris/sys/kstat.hSat Feb 9 01:08:49 2013(r246576) +++ stable/8/sys/cddl/compat/opensolaris/sys/kstat.hSat Feb 9 01:38:43 2013(r246577) @@ -58,7 +58,7 @@ typedef struct kstat_named { } value; } kstat_named_t; -kstat_t *kstat_create(char *module, int instance, char *name, char *class, +kstat_t *kstat_create(char *module, int instance, char *name, char *cls, uchar_t type, ulong_t ndata, uchar_t flags); void kstat_install(kstat_t *ksp); void kstat_delete(kstat_t *ksp); Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h == --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h Sat Feb 9 01:08:49 2013(r246576) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h Sat Feb 9 01:38:43 2013(r246577) @@ -38,8 +38,8 @@ extern "C" { typedef struct arc_buf_hdr arc_buf_hdr_t; typedef struct arc_buf arc_buf_t; -typedef void arc_done_func_t(zio_t *zio, arc_buf_t *buf, void *private); -typedef int arc_evict_func_t(void *private); +typedef void arc_done_func_t(zio_t *zio, arc_buf_t *buf, void *priv); +typedef int arc_evict_func_t(void *priv); /* generic arc_done_func_t's which you can use */ arc_done_func_t arc_bcopy_func; @@ -104,17 +104,17 @@ int arc_referenced(arc_buf_t *buf); #endif int arc_read(zio_t *pio, spa_t *spa, const blkptr_t *bp, arc_buf_t *pbuf, -arc_done_func_t *done, void *private, int priority, int zio_flags, +arc_done_func_t *done, void *
svn commit: r246578 - in stable/8: cddl/contrib/opensolaris/cmd/zdb sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys
Author: delphij Date: Sat Feb 9 01:41:21 2013 New Revision: 246578 URL: http://svnweb.freebsd.org/changeset/base/246578 Log: MFC r245264: The current ZFS code expects ddt_zap_count to always succeed by asserting the underlying zap_count() to return no errors. However, it is possible that the pool reaches to such a state where zap_count would return error, leading to panics when a pool is imported. This commit changes the ddt_zap_count to return error returned from zap_count and handle the error appropriately. With this change, it's now possible to let zpool rollback damaged transaction groups and import the pool. Obtained from:ZFS on Linux github (e8fd45a0f975c6b8ae8cd644714fc21f14fac2bf) Modified: stable/8/cddl/contrib/opensolaris/cmd/zdb/zdb.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ddt_zap.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/ddt.h Directory Properties: stable/8/cddl/ (props changed) stable/8/cddl/contrib/opensolaris/ (props changed) stable/8/sys/ (props changed) stable/8/sys/cddl/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/8/cddl/contrib/opensolaris/cmd/zdb/zdb.c == --- stable/8/cddl/contrib/opensolaris/cmd/zdb/zdb.c Sat Feb 9 01:38:43 2013(r246577) +++ stable/8/cddl/contrib/opensolaris/cmd/zdb/zdb.c Sat Feb 9 01:41:21 2013(r246578) @@ -704,7 +704,9 @@ dump_ddt(ddt_t *ddt, enum ddt_type type, return; ASSERT(error == 0); - if ((count = ddt_object_count(ddt, type, class)) == 0) + error = ddt_object_count(ddt, type, class, &count); + ASSERT(error == 0); + if (count == 0) return; dspace = doi.doi_physical_blocks_512 << 9; Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c == --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c Sat Feb 9 01:38:43 2013(r246577) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c Sat Feb 9 01:41:21 2013(r246578) @@ -89,12 +89,13 @@ ddt_object_destroy(ddt_t *ddt, enum ddt_ spa_t *spa = ddt->ddt_spa; objset_t *os = ddt->ddt_os; uint64_t *objectp = &ddt->ddt_object[type][class]; + uint64_t count; char name[DDT_NAMELEN]; ddt_object_name(ddt, type, class, name); ASSERT(*objectp != 0); - ASSERT(ddt_object_count(ddt, type, class) == 0); + VERIFY(ddt_object_count(ddt, type, class, &count) == 0 && count == 0); ASSERT(ddt_histogram_empty(&ddt->ddt_histogram[type][class])); VERIFY(zap_remove(os, DMU_POOL_DIRECTORY_OBJECT, name, tx) == 0); VERIFY(zap_remove(os, spa->spa_ddt_stat_object, name, tx) == 0); @@ -109,6 +110,7 @@ ddt_object_load(ddt_t *ddt, enum ddt_typ { ddt_object_t *ddo = &ddt->ddt_object_stats[type][class]; dmu_object_info_t doi; + uint64_t count; char name[DDT_NAMELEN]; int error; @@ -129,7 +131,11 @@ ddt_object_load(ddt_t *ddt, enum ddt_typ */ VERIFY(ddt_object_info(ddt, type, class, &doi) == 0); - ddo->ddo_count = ddt_object_count(ddt, type, class); + error = ddt_object_count(ddt, type, class, &count); + if (error) + return error; + + ddo->ddo_count = count; ddo->ddo_dspace = doi.doi_physical_blocks_512 << 9; ddo->ddo_mspace = doi.doi_fill_count * doi.doi_data_block_size; @@ -143,6 +149,7 @@ ddt_object_sync(ddt_t *ddt, enum ddt_typ { ddt_object_t *ddo = &ddt->ddt_object_stats[type][class]; dmu_object_info_t doi; + uint64_t count; char name[DDT_NAMELEN]; ddt_object_name(ddt, type, class, name); @@ -155,8 +162,9 @@ ddt_object_sync(ddt_t *ddt, enum ddt_typ * Cache DDT statistics; this is the only time they'll change. */ VERIFY(ddt_object_info(ddt, type, class, &doi) == 0); + VERIFY(ddt_object_count(ddt, type, class, &count) == 0); - ddo->ddo_count = ddt_object_count(ddt, type, class); + ddo->ddo_count = count; ddo->ddo_dspace = doi.doi_physical_blocks_512 << 9; ddo->ddo_mspace = doi.doi_fill_count * doi.doi_data_block_size; } @@ -213,13 +221,13 @@ ddt_object_walk(ddt_t *ddt, enum ddt_typ ddt->ddt_object[type][class], dde, walk)); } -uint64_t -ddt_object_count(ddt_t *ddt, enum ddt_type type, enum ddt_class class) +int +ddt_object_count(ddt_t *ddt, enum ddt_type type, enum ddt_class class, uint64_t *count) { ASSERT(ddt_object_exists(ddt, type, class)); return (ddt_ops[type]->ddt_op_count(ddt->ddt_os, - ddt->ddt_object[type][class])); + ddt->ddt_object[type][class], co
svn commit: r246579 - head/sys/dev/ath/ath_hal/ar5416
Author: adrian Date: Sat Feb 9 02:42:01 2013 New Revision: 246579 URL: http://svnweb.freebsd.org/changeset/base/246579 Log: The encryption type field needs to be preserved for each descriptor making up a frame, in both a sub-frame and for all frames in an aggregate. Tested: * AR5416, STA mode Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c == --- head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c Sat Feb 9 01:41:21 2013(r246578) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c Sat Feb 9 02:42:01 2013(r246579) @@ -306,10 +306,14 @@ ar5416FillTxDesc(struct ath_hal *ah, str & AR_TxIntrReq; ads->ds_ctl2 = __bswap32(AR5416DESC_CONST(ds0)->ds_ctl2); ads->ds_ctl3 = __bswap32(AR5416DESC_CONST(ds0)->ds_ctl3); + /* ctl6 - we only need encrtype; the rest are blank */ + ads->ds_ctl6 = __bswap32(AR5416DESC_CONST(ds0)->ds_ctl6 & AR_EncrType); #else ads->ds_ctl0 = AR5416DESC_CONST(ds0)->ds_ctl0 & AR_TxIntrReq; ads->ds_ctl2 = AR5416DESC_CONST(ds0)->ds_ctl2; ads->ds_ctl3 = AR5416DESC_CONST(ds0)->ds_ctl3; + /* ctl6 - we only need encrtype; the rest are blank */ + ads->ds_ctl6 = AR5416DESC_CONST(ds0)->ds_ctl6 & AR_EncrType; #endif } else {/* !firstSeg && !lastSeg */ /* @@ -318,8 +322,10 @@ ar5416FillTxDesc(struct ath_hal *ah, str #ifdef AH_NEED_DESC_SWAP ads->ds_ctl0 = __bswap32(AR5416DESC_CONST(ds0)->ds_ctl0) & AR_TxIntrReq; + ads->ds_ctl6 = __bswap32(AR5416DESC_CONST(ds0)->ds_ctl6 & AR_EncrType); #else ads->ds_ctl0 = AR5416DESC_CONST(ds0)->ds_ctl0 & AR_TxIntrReq; + ads->ds_ctl6 = AR5416DESC_CONST(ds0)->ds_ctl6 & AR_EncrType; #endif ads->ds_ctl1 = segLen | AR_TxMore; ads->ds_ctl2 = 0; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r246580 - stable/9/usr.sbin/crunch/crunchide
Author: pfg Date: Sat Feb 9 02:57:37 2013 New Revision: 246580 URL: http://svnweb.freebsd.org/changeset/base/246580 Log: MFC r246278; crunch: some more NetBSD syncing. Obtained from:NetBSD Modified: stable/9/usr.sbin/crunch/crunchide/exec_elf32.c Directory Properties: stable/9/usr.sbin/crunch/ (props changed) Modified: stable/9/usr.sbin/crunch/crunchide/exec_elf32.c == --- stable/9/usr.sbin/crunch/crunchide/exec_elf32.c Sat Feb 9 02:42:01 2013(r246579) +++ stable/9/usr.sbin/crunch/crunchide/exec_elf32.c Sat Feb 9 02:57:37 2013(r246580) @@ -384,6 +384,8 @@ out: if (symtabp != NULL) free(symtabp); if (strtabp != NULL) + free(strtabp); + if (nstrtabp != NULL) free(nstrtabp); return (rv); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r246581 - head/sys/ofed/drivers/net/mlx4
Author: delphij Date: Sat Feb 9 04:13:45 2013 New Revision: 246581 URL: http://svnweb.freebsd.org/changeset/base/246581 Log: Fix LINT build on amd64. Modified: head/sys/ofed/drivers/net/mlx4/en_tx.c Modified: head/sys/ofed/drivers/net/mlx4/en_tx.c == --- head/sys/ofed/drivers/net/mlx4/en_tx.c Sat Feb 9 02:57:37 2013 (r246580) +++ head/sys/ofed/drivers/net/mlx4/en_tx.c Sat Feb 9 04:13:45 2013 (r246581) @@ -936,16 +936,16 @@ mlx4_en_transmit_locked(struct ifnet *de return (err); } /* Process the queue */ - while ((next = drbr_peek(ifp, ring->br)) != NULL) { + while ((next = drbr_peek(dev, ring->br)) != NULL) { if ((err = mlx4_en_xmit(dev, tx_ind, &next)) != 0) { if (next == NULL) { - drbr_advance(ifp, ring->br); + drbr_advance(dev, ring->br); } else { - drbr_putback(ifp, ring->br, next); + drbr_putback(dev, ring->br, next); } break; } - drbr_advance(ifp, ring->br); + drbr_advance(dev, ring->br); enqueued++; dev->if_obytes += next->m_pkthdr.len; if (next->m_flags & M_MCAST) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r246582 - in stable/9/sys/dev/virtio: . balloon block network pci scsi
Author: bryanv Date: Sat Feb 9 06:11:45 2013 New Revision: 246582 URL: http://svnweb.freebsd.org/changeset/base/246582 Log: MFC r238072,r238360,r240430,r241469,r241470,r241495,r244136,r244200 Sync VirtIO with HEAD. - r238072: Do not include in the local headers. - r238360: Various VirtIO improvements - r240430: No need to leak these into the includer's namespace. - r241469: virtqueue: Fix non-indirect virtqueues - r241470: Add Virtio SCSI driver - r241495: Fix build with PAE enabled - r244136: Remove duplicated lines - r244200: Start taskqueues threads after attach cannot fail Approved by: grehan (mentor) Added: stable/9/sys/dev/virtio/scsi/ - copied from r241470, head/sys/dev/virtio/scsi/ Modified: stable/9/sys/dev/virtio/balloon/virtio_balloon.c stable/9/sys/dev/virtio/balloon/virtio_balloon.h stable/9/sys/dev/virtio/block/virtio_blk.c stable/9/sys/dev/virtio/block/virtio_blk.h stable/9/sys/dev/virtio/network/if_vtnet.c stable/9/sys/dev/virtio/network/virtio_net.h stable/9/sys/dev/virtio/pci/virtio_pci.c stable/9/sys/dev/virtio/pci/virtio_pci.h stable/9/sys/dev/virtio/scsi/virtio_scsi.c stable/9/sys/dev/virtio/virtio.c stable/9/sys/dev/virtio/virtio.h stable/9/sys/dev/virtio/virtio_ring.h stable/9/sys/dev/virtio/virtqueue.c stable/9/sys/dev/virtio/virtqueue.h Modified: stable/9/sys/dev/virtio/balloon/virtio_balloon.c == --- stable/9/sys/dev/virtio/balloon/virtio_balloon.cSat Feb 9 04:13:45 2013(r246581) +++ stable/9/sys/dev/virtio/balloon/virtio_balloon.cSat Feb 9 06:11:45 2013(r246582) @@ -412,7 +412,6 @@ vtballoon_send_page_frames(struct vtball * interrupt handler will wake us up. */ VTBALLOON_LOCK(sc); - while ((c = virtqueue_dequeue(vq, NULL)) == NULL) msleep_spin(sc, VTBALLOON_MTX(sc), "vtbspf", 0); VTBALLOON_UNLOCK(sc); Modified: stable/9/sys/dev/virtio/balloon/virtio_balloon.h == --- stable/9/sys/dev/virtio/balloon/virtio_balloon.hSat Feb 9 04:13:45 2013(r246581) +++ stable/9/sys/dev/virtio/balloon/virtio_balloon.hSat Feb 9 06:11:45 2013(r246582) @@ -31,8 +31,6 @@ #ifndef _VIRTIO_BALLOON_H #define _VIRTIO_BALLOON_H -#include - /* Feature bits. */ #define VIRTIO_BALLOON_F_MUST_TELL_HOST0x1 /* Tell before reclaiming pages */ #define VIRTIO_BALLOON_F_STATS_VQ 0x2 /* Memory stats virtqueue */ Modified: stable/9/sys/dev/virtio/block/virtio_blk.c == --- stable/9/sys/dev/virtio/block/virtio_blk.c Sat Feb 9 04:13:45 2013 (r246581) +++ stable/9/sys/dev/virtio/block/virtio_blk.c Sat Feb 9 06:11:45 2013 (r246582) @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include @@ -119,7 +118,7 @@ static int vtblk_shutdown(device_t); static int vtblk_open(struct disk *); static int vtblk_close(struct disk *); static int vtblk_ioctl(struct disk *, u_long, void *, int, - struct thread *); + struct thread *); static int vtblk_dump(void *, void *, vm_offset_t, off_t, size_t); static voidvtblk_strategy(struct bio *); @@ -193,7 +192,7 @@ TUNABLE_INT("hw.vtblk.no_ident", &vtblk_ mtx_assert(VTBLK_MTX((_sc)), MA_NOTOWNED) #define VTBLK_DISK_NAME"vtbd" -#defineVTBLK_QUIESCE_TIMEOUT (30 * hz) +#define VTBLK_QUIESCE_TIMEOUT (30 * hz) /* * Each block request uses at least two segments - one for the header @@ -201,8 +200,6 @@ TUNABLE_INT("hw.vtblk.no_ident", &vtblk_ */ #define VTBLK_MIN_SEGMENTS 2 -static uma_zone_t vtblk_req_zone; - static device_method_t vtblk_methods[] = { /* Device methods. */ DEVMETHOD(device_probe, vtblk_probe), @@ -236,19 +233,8 @@ vtblk_modevent(module_t mod, int type, v switch (type) { case MOD_LOAD: - vtblk_req_zone = uma_zcreate("vtblk_request", - sizeof(struct vtblk_request), - NULL, NULL, NULL, NULL, 0, 0); - break; case MOD_QUIESCE: case MOD_UNLOAD: - if (uma_zone_get_cur(vtblk_req_zone) > 0) - error = EBUSY; - else if (type == MOD_UNLOAD) { - uma_zdestroy(vtblk_req_zone); - vtblk_req_zone = NULL; - } - break; case MOD_SHUTDOWN: break; default: @@ -316,7 +302,7 @@ vtblk_attach(device_t dev) } sc->vtblk_max_nsegs = vtblk_maximum_segments(sc, &blkcfg); -if (sc->vtblk_max_nsegs <= VTBLK_MIN_SEGMENTS) { + if (sc->vtblk_max_nsegs <= VTBLK_MIN_SEGMENTS) {
svn commit: r246583 - stable/9/share/man/man4
Author: bryanv Date: Sat Feb 9 06:29:15 2013 New Revision: 246583 URL: http://svnweb.freebsd.org/changeset/base/246583 Log: MFC r230461 Connect VirtIO-related manpages to the build. Approved by: grehan (mentor) Modified: stable/9/share/man/man4/Makefile Directory Properties: stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/Makefile == --- stable/9/share/man/man4/MakefileSat Feb 9 06:11:45 2013 (r246582) +++ stable/9/share/man/man4/MakefileSat Feb 9 06:29:15 2013 (r246583) @@ -509,11 +509,15 @@ MAN= aac.4 \ viapm.4 \ ${_viawd.4} \ vinum.4 \ + ${_virtio.4} \ + ${_virtio_balloon.4} \ + ${_virtio_blk.4} \ vkbd.4 \ vlan.4 \ vpo.4 \ vr.4 \ vte.4 \ + ${_vtnet.4} \ ${_vxge.4} \ watchdog.4 \ wb.4 \ @@ -676,6 +680,7 @@ MLINKS+=vlan.4 if_vlan.4 MLINKS+=vpo.4 imm.4 MLINKS+=vr.4 if_vr.4 MLINKS+=vte.4 if_vte.4 +MLINKS+=${_vtnet.4} ${_if_vtnet.4} MLINKS+=${_vxge.4} ${_if_vxge.4} MLINKS+=watchdog.4 SW_WATCHDOG.4 MLINKS+=wb.4 if_wb.4 @@ -722,6 +727,7 @@ _if_nfe.4= if_nfe.4 _if_nve.4= if_nve.4 _if_nxge.4=if_nxge.4 _if_urtw.4=if_urtw.4 +_if_vtnet.4= if_vtnet.4 _if_vxge.4=if_vxge.4 _if_wpi.4= if_wpi.4 _ipmi.4= ipmi.4 @@ -734,6 +740,10 @@ _nfsmb.4= nfsmb.4 _nve.4=nve.4 _nvram.4= nvram.4 _nxge.4= nxge.4 +_virtio.4= virtio.4 +_virtio_balloon.4=virtio_balloon.4 +_virtio_blk.4= virtio_blk.4 +_vtnet.4= vtnet.4 _vxge.4= vxge.4 _padlock.4=padlock.4 _rr232x.4= rr232x.4 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r246584 - stable/9/share/man/man4
Author: bryanv Date: Sat Feb 9 06:31:13 2013 New Revision: 246584 URL: http://svnweb.freebsd.org/changeset/base/246584 Log: MFC r241470 Add VirtIO SCSI driver man page Approved by: grehan (mentor) Added: stable/9/share/man/man4/virtio_scsi.4 - copied unchanged from r241470, head/share/man/man4/virtio_scsi.4 Modified: stable/9/share/man/man4/Makefile stable/9/share/man/man4/virtio.4 Directory Properties: stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/Makefile == --- stable/9/share/man/man4/MakefileSat Feb 9 06:29:15 2013 (r246583) +++ stable/9/share/man/man4/MakefileSat Feb 9 06:31:13 2013 (r246584) @@ -512,6 +512,7 @@ MAN=aac.4 \ ${_virtio.4} \ ${_virtio_balloon.4} \ ${_virtio_blk.4} \ + ${_virtio_scsi.4} \ vkbd.4 \ vlan.4 \ vpo.4 \ @@ -743,6 +744,7 @@ _nxge.4=nxge.4 _virtio.4= virtio.4 _virtio_balloon.4=virtio_balloon.4 _virtio_blk.4= virtio_blk.4 +_virtio_scsi.4= virtio_scsi.4 _vtnet.4= vtnet.4 _vxge.4= vxge.4 _padlock.4=padlock.4 Modified: stable/9/share/man/man4/virtio.4 == --- stable/9/share/man/man4/virtio.4Sat Feb 9 06:29:15 2013 (r246583) +++ stable/9/share/man/man4/virtio.4Sat Feb 9 06:31:13 2013 (r246584) @@ -72,6 +72,10 @@ device driver. An emulated disk controller is provided by the .Xr virtio_blk 4 device driver. +.It Nm SCSI +An emulated SCSI HBA is provided by the +.Xr virtio_scsi 4 +device driver. .It Nm Balloon A pseudo-device to allow the VM to release memory back to the hypervisor is provided by the @@ -81,6 +85,7 @@ device driver. .Sh SEE ALSO .Xr virtio_balloon 4 , .Xr virtio_blk 4 , +.Xr virtio_scsi 4 , .Xr vtnet 4 .Sh HISTORY Support for VirtIO first appeared in Copied: stable/9/share/man/man4/virtio_scsi.4 (from r241470, head/share/man/man4/virtio_scsi.4) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/share/man/man4/virtio_scsi.4 Sat Feb 9 06:31:13 2013 (r246584, copy of r241470, head/share/man/man4/virtio_scsi.4) @@ -0,0 +1,92 @@ +.\" Copyright (c) 2012 Bryan Venteicher +.\" All rights reserved. +.\" +.\" 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. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd June 24, 2012 +.Dt VIRTIO_SCSI 4 +.Os +.Sh NAME +.Nm virtio_scsi +.Nd VirtIO SCSI driver +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device virtio_scsi" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +virtio_scsi_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +device driver provides support for VirtIO SCSI devices. +.Sh LOADER TUNABLES +Tunables can be set at the +.Xr loader 8 +prompt before booting the kernel or stored in +.Xr loader.conf 5 . +.Bl -tag -width "xx" +.It Va hw.vtscsi.bus_reset_disable +In the initial QEMU release with VirtIO SCSI support, in-flight +operations were not aborted when stopping the device, rendering +bus reset ineffective. This tunable disables attempts to issue +reset bus commands. The default value is 1. +.El +.Sh DEBUGGING +To enable debugging prints from the +.Nm +driver, set the +.Bd -literal -offset indent +hw.vtscsi.X.debug_level +.Ed +.Pp +variable, where X is the adapter number, either in +.Xr loader.conf 5 +or via +.Xr
svn commit: r246585 - head/sys/modules/usb/smsc
Author: delphij Date: Sat Feb 9 06:31:22 2013 New Revision: 246585 URL: http://svnweb.freebsd.org/changeset/base/246585 Log: Fix LINT build for ARM. Modified: head/sys/modules/usb/smsc/Makefile Modified: head/sys/modules/usb/smsc/Makefile == --- head/sys/modules/usb/smsc/Makefile Sat Feb 9 06:31:13 2013 (r246584) +++ head/sys/modules/usb/smsc/Makefile Sat Feb 9 06:31:22 2013 (r246585) @@ -33,5 +33,6 @@ KMOD= if_smsc SRCS= opt_bus.h opt_usb.h device_if.h bus_if.h usb_if.h usbdevs.h \ miibus_if.h opt_inet.h opt_platform.h \ if_smsc.c +SRCS+= ofw_bus_if.h .include ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r246586 - in head: cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/cmd/zpool sys/cddl/boot/zfs sys/cddl/compat/opensolaris/sys sys/cddl/contrib/opensolaris/common/zfs sys/cddl...
Author: delphij Date: Sat Feb 9 06:39:28 2013 New Revision: 246586 URL: http://svnweb.freebsd.org/changeset/base/246586 Log: MFV r245512: * Illumos zfs issue #3035 [1] LZ4 compression support in ZFS. LZ4 is a new high-speed BSD-licensed compression algorithm created by Yann Collet that delivers very high compression and decompression performance compared to lzjb (>50% faster on compression, >80% faster on decompression and around 3x faster on compression of incompressible data), while giving better compression ratio [1]. This version of LZ4 corresponds to upstream's [2] revision 85. Please note that for obvious reasons this is not backward read compatible. This means once a pool have LZ4 compressed data, these data can no longer be read by older ZFS implementations. Local changes: - On-stack hash table disabled and using kernel slab allocator instead, at this time. This requires larger kernel thread stack for zio workers. This may change in the future should we adjusted the zio workers' thread stack size. - likely and unlikely will be undefined if they are already defined, this is required for i386 XEN build. - Removed De Bruijn sequence based __builtin_ctz family of builtins in favor of the latter. Both GCC and clang supports these builtins. - Changed the way the LZ4 code detects endianness. - Manual pages modifications to mention the feature based on Illumos counterpart. - Boot loader changes to make it support LZ4 decompression. [1] https://www.illumos.org/issues/3035 [2] http://code.google.com/p/lz4/source/list Obtained from:Illumos (13921:9d721847e469) Tested on:FreeBSD/amd64 MFC after:1 month Added: head/sys/cddl/boot/zfs/lz4.c (contents, props changed) head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4 - copied unchanged from r245512, vendor-sys/illumos/dist/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4.descrip - copied unchanged from r245512, vendor-sys/illumos/dist/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4.descrip head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c - copied, changed from r245512, vendor-sys/illumos/dist/uts/common/fs/zfs/lz4.c Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 head/sys/cddl/boot/zfs/README head/sys/cddl/boot/zfs/zfsimpl.h head/sys/cddl/boot/zfs/zfssubr.c head/sys/cddl/compat/opensolaris/sys/byteorder.h head/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c head/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h head/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c head/sys/cddl/contrib/opensolaris/uts/common/Makefile.files head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_compress.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_compress.c head/sys/conf/files Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 == --- head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Sat Feb 9 06:31:22 2013 (r246585) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Sat Feb 9 06:39:28 2013 (r246586) @@ -24,10 +24,11 @@ .\" Copyright (c) 2011, Pawel Jakub Dawidek .\" Copyright (c) 2012, Glen Barber .\" Copyright (c) 2012, Bryan Drewery +.\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved. .\" .\" $FreeBSD$ .\" -.Dd November 26, 2012 +.Dd February 8, 2012 .Dt ZFS 8 .Os .Sh NAME @@ -866,7 +867,7 @@ but this may change in future releases). disables integrity checking on user data. Disabling checksums is .Em NOT a recommended practice. -.It Sy compression Ns = Ns Cm on | off | lzjb | gzip | gzip- Ns Ar N | Cm zle +.It Sy compression Ns = Ns Cm on | off | lzjb | gzip | gzip- Ns Ar N | zle | Cm lz4 Controls the compression algorithm used for this dataset. The .Cm lzjb compression algorithm is optimized for performance while providing decent data @@ -894,6 +895,26 @@ The .Cm zle compression algorithm compresses runs of zeros. .Pp +The +.Sy lz4 +compression algorithm is a high-performance replacement +for the +.Sy lzjb +algorithm. It features significantly faster +compression and decompression, as well as a moderately higher +compression ratio than +.Sy lzjb , +but can only be used on pools with +the +.Sy lz4_compress +feature set to +.Sy enabled . +See +.Xr zpool-features 7 +for details on ZFS feature flags and the +.Sy lz4_compress +feature. +.Pp This property can also be referred to by its shortened column name .Cm compress . Changing this property affects only newly-written data. Modified: hea
svn commit: r246587 - in head: cddl/contrib/opensolaris/cmd/zpool lib/libc/stdio
Author: joel (doc committer) Date: Sat Feb 9 07:01:05 2013 New Revision: 246587 URL: http://svnweb.freebsd.org/changeset/base/246587 Log: mdoc: Remove EOL whitespace. Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 head/lib/libc/stdio/fopen.3 Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 == --- head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7Sat Feb 9 06:39:28 2013(r246586) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7Sat Feb 9 07:01:05 2013(r246587) @@ -199,7 +199,7 @@ features significantly faster compressio higher compression ratio than the older .Sy lzjb compression. -Typically, +Typically, .Sy lz4 compression is approximately 50% faster on compressible data and 200% faster on incompressible data than @@ -207,12 +207,12 @@ compressible data and 200% faster on inc It is also approximately 80% faster on decompression, while giving approximately 10% better compression ratio. .Pp -When the +When the .Sy lz4_compress feature is set to .Sy enabled , the -administrator can turn on +administrator can turn on .Sy lz4 compression on any dataset on the pool using the Modified: head/lib/libc/stdio/fopen.3 == --- head/lib/libc/stdio/fopen.3 Sat Feb 9 06:39:28 2013(r246586) +++ head/lib/libc/stdio/fopen.3 Sat Feb 9 07:01:05 2013(r246587) @@ -332,7 +332,7 @@ but is also supported by glibc. The .Fn fmemopen function -conforms to +conforms to .St -p1003.1-2008 . The ``b'' mode does not conform to any standard but is also supported by glibc. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"