head 1.1; access; symbols bouyer-sunxi-drm:1.1.0.138 bouyer-sunxi-drm-base:1.1 cjep_sun2x:1.1.0.136 cjep_sun2x-base:1.1 cjep_staticlib_x-base1:1.1 cjep_staticlib_x:1.1.0.134 cjep_staticlib_x-base:1.1 thorpej-futex-base:1.1 bouyer-xenpvh-base2:1.1 phil-wifi-20200421:1.1 bouyer-xenpvh-base1:1.1 phil-wifi-20200411:1.1 bouyer-xenpvh:1.1.0.132 bouyer-xenpvh-base:1.1 phil-wifi-20200406:1.1 ad-namecache-base3:1.1 ad-namecache-base2:1.1 ad-namecache-base1:1.1 ad-namecache:1.1.0.130 ad-namecache-base:1.1 isaki-audio2:1.1.0.128 isaki-audio2-base:1.1 pgoyette-compat-merge-20190127:1.1 pgoyette-compat-20190127:1.1 pgoyette-compat-20190118:1.1 pgoyette-compat-1226:1.1 pgoyette-compat-1126:1.1 pgoyette-compat-1020:1.1 pgoyette-compat-0930:1.1 pgoyette-compat-0906:1.1 pgoyette-compat-0728:1.1 pgoyette-compat-0625:1.1 pgoyette-compat-0521:1.1 pgoyette-compat-0502:1.1 pgoyette-compat-0422:1.1 pgoyette-compat-0415:1.1 pgoyette-compat-0407:1.1 pgoyette-compat-0330:1.1 pgoyette-compat-0322:1.1 pgoyette-compat-0315:1.1 pgoyette-compat:1.1.0.10 pgoyette-compat-base:1.1 perseant-stdc-iso10646:1.1.0.126 perseant-stdc-iso10646-base:1.1 prg-localcount2-base3:1.1 prg-localcount2-base2:1.1 prg-localcount2-base1:1.1 prg-localcount2:1.1.0.124 prg-localcount2-base:1.1 pgoyette-localcount-20170426:1.1 bouyer-socketcan-base1:1.1 pgoyette-localcount-20170320:1.1 bouyer-socketcan:1.1.0.122 bouyer-socketcan-base:1.1 pgoyette-localcount-20170107:1.1 pgoyette-localcount-20161104:1.1 localcount-20160914:1.1 pgoyette-localcount-20160806:1.1 pgoyette-localcount-20160726:1.1 pgoyette-localcount:1.1.0.120 pgoyette-localcount-base:1.1 netbsd-5-2-3-RELEASE:1.1 netbsd-5-1-5-RELEASE:1.1 yamt-pagecache-base9:1.1 yamt-pagecache-tag8:1.1 tls-earlyentropy:1.1.0.118 tls-earlyentropy-base:1.1 riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.1 riastradh-drm2-base3:1.1 netbsd-5-2-2-RELEASE:1.1 netbsd-5-1-4-RELEASE:1.1 netbsd-5-2-1-RELEASE:1.1 netbsd-5-1-3-RELEASE:1.1 rmind-smpnet-nbase:1.1 rmind-smpnet:1.1.0.114 rmind-smpnet-base:1.1 agc-symver:1.1.0.116 agc-symver-base:1.1 tls-maxphys-base:1.1 yamt-pagecache-base8:1.1 netbsd-5-2:1.1.0.112 yamt-pagecache-base7:1.1 netbsd-5-2-RELEASE:1.1 netbsd-5-2-RC1:1.1 yamt-pagecache-base6:1.1 yamt-pagecache-base5:1.1 yamt-pagecache-base4:1.1 netbsd-5-1-2-RELEASE:1.1 netbsd-5-1-1-RELEASE:1.1 jmcneill-usbmp:1.1.0.110 jmcneill-usbmp-base:1.1 jmcneill-audiomp3:1.1.0.108 jmcneill-audiomp3-base:1.1 yamt-pagecache-base3:1.1 yamt-pagecache-base2:1.1 yamt-pagecache:1.1.0.106 yamt-pagecache-base:1.1 rmind-uvmplock-nbase:1.1 bouyer-quota2-nbase:1.1 bouyer-quota2:1.1.0.104 bouyer-quota2-base:1.1 jruoho-x86intr:1.1.0.102 jruoho-x86intr-base:1.1 matt-nb5-pq3:1.1.0.100 matt-nb5-pq3-base:1.1 netbsd-5-1:1.1.0.98 netbsd-5-1-RELEASE:1.1 yamt-nfs-mp-base11:1.1 netbsd-5-1-RC4:1.1 uebayasi-xip-base2:1.1 yamt-nfs-mp-base10:1.1 netbsd-5-1-RC3:1.1 netbsd-5-1-RC2:1.1 netbsd-5-1-RC1:1.1 rmind-uvmplock:1.1.0.96 rmind-uvmplock-base:1.1 yamt-nfs-mp-base9:1.1 uebayasi-xip:1.1.0.94 uebayasi-xip-base:1.1 netbsd-5-0-2-RELEASE:1.1 yamt-nfs-mp-base8:1.1 yamt-nfs-mp-base7:1.1 netbsd-5-0-1-RELEASE:1.1 jymxensuspend-base:1.1 yamt-nfs-mp-base6:1.1 yamt-nfs-mp-base5:1.1 yamt-nfs-mp-base4:1.1 jym-xensuspend-nbase:1.1 yamt-nfs-mp-base3:1.1 netbsd-5-0:1.1.0.92 netbsd-5-0-RELEASE:1.1 netbsd-5-0-RC4:1.1 netbsd-5-0-RC3:1.1 netbsd-5-0-RC2:1.1 jym-xensuspend:1.1.0.90 jym-xensuspend-base:1.1 netbsd-5-0-RC1:1.1 haad-dm-base2:1.1 haad-nbase2:1.1 ad-audiomp2:1.1.0.88 ad-audiomp2-base:1.1 netbsd-5:1.1.0.86 netbsd-5-base:1.1 haad-dm-base1:1.1 haad-dm:1.1.0.84 haad-dm-base:1.1 simonb-wapbl-nbase:1.1 yamt-pf42-base4:1.1 simonb-wapbl:1.1.0.82 simonb-wapbl-base:1.1 yamt-pf42-base3:1.1 hpcarm-cleanup-nbase:1.1 yamt-pf42-base2:1.1 yamt-nfs-mp-base2:1.1 yamt-nfs-mp:1.1.0.80 yamt-nfs-mp-base:1.1 yamt-pf42:1.1.0.78 yamt-pf42-base:1.1 ad-socklock-base1:1.1 yamt-lazymbuf-base15:1.1 yamt-lazymbuf-base14:1.1 keiichi-mipv6-nbase:1.1 mjf-devfs2:1.1.0.76 mjf-devfs2-base:1.1 keiichi-mipv6:1.1.0.74 keiichi-mipv6-base:1.1 ad-audiomp-base-1:1.1 bouyer-xeni386-merge1:1.1 vmlocking2-base3:1.1 bouyer-xeni386-nbase:1.1 yamt-kmem-base3:1.1 cube-autoconf:1.1.0.72 cube-autoconf-base:1.1 yamt-kmem-base2:1.1 bouyer-xeni386:1.1.0.70 bouyer-xeni386-base:1.1 yamt-kmem:1.1.0.68 yamt-kmem-base:1.1 vmlocking2-base2:1.1 reinoud-bufcleanup-nbase:1.1 vmlocking2:1.1.0.66 vmlocking2-base1:1.1 jmcneill-base:1.1 mjf-devfs:1.1.0.64 mjf-devfs-base:1.1 bouyer-xenamd64-base2:1.1 vmlocking-nbase:1.1 yamt-x86pmap-base4:1.1 bouyer-xenamd64:1.1.0.62 bouyer-xenamd64-base:1.1 yamt-x86pmap-base3:1.1 yamt-x86pmap-base2:1.1 yamt-x86pmap:1.1.0.60 yamt-x86pmap-base:1.1 jmcneill-pm:1.1.0.58 jmcneill-pm-base:1.1 hpcarm-cleanup:1.1.0.56 hpcarm-cleanup-base:1.1 mjf-ufs-trans-base:1.1 yamt-idlelwp-base8:1.1 reinoud-bufcleanup-base:1.1 vmlocking:1.1.0.54 vmlocking-base:1.1 ad-audiomp:1.1.0.52 ad-audiomp-base:1.1 yamt-idlelwp:1.1.0.50 post-newlock2-merge:1.1 newlock2-nbase:1.1 yamt-splraiseipl-base5:1.1 yamt-splraiseipl-base4:1.1 yamt-splraiseipl-base3:1.1 yamt-splraiseipl-base2:1.1 yamt-splraiseipl:1.1.0.48 yamt-splraiseipl-base:1.1 newlock2:1.1.0.46 newlock2-base:1.1 yamt-pdpolicy-base8:1.1 yamt-pdpolicy-base7:1.1 yamt-pdpolicy-base6:1.1 gdamore-uart:1.1.0.44 gdamore-uart-base:1.1 simonb-timcounters-final:1.1 yamt-pdpolicy-base5:1.1 elad-kernelauth-nbase:1.1 yamt-pdpolicy-base4:1.1 yamt-pdpolicy-base3:1.1 yamt-pdpolicy-base2:1.1 yamt-pdpolicy:1.1.0.42 yamt-pdpolicy-base:1.1 yamt-uio_vmspace-base5:1.1 simonb-timecounters:1.1.0.40 simonb-timecounters-base:1.1 rpaulo-netinet-merge-pcb:1.1.0.38 rpaulo-netinet-merge-pcb-base:1.1 yamt-uio_vmspace:1.1.0.36 yamt-readahead-base3:1.1 yamt-readahead-base2:1.1 yamt-readahead:1.1.0.34 yamt-readahead-base:1.1 yamt-vop-base3:1.1 yamt-vop-base2:1.1 thorpej-vnode-attr:1.1.0.32 thorpej-vnode-attr-base:1.1 yamt-vop:1.1.0.30 yamt-vop-base:1.1 yamt-lazymbuf:1.1.0.28 yamt-km-base4:1.1 yamt-km-base3:1.1 yamt-km-base2:1.1 yamt-km:1.1.0.26 yamt-km-base:1.1 kent-audio2:1.1.0.24 kent-audio2-base:1.1 ktrace-lwp:1.1.0.22 ktrace-lwp-base:1.1 nathanw_sa_before_merge:1.1 gmcgarry_ctxsw:1.1.0.20 gmcgarry_ctxsw_base:1.1 gmcgarry_ucred:1.1.0.18 gmcgarry_ucred_base:1.1 nathanw_sa_base:1.1 gehenna-devsw:1.1.0.16 gehenna-devsw-base:1.1 eeh-devprop:1.1.0.14 eeh-devprop-base:1.1 newlock:1.1.0.12 newlock-base:1.1 ifpoll-base:1.1 thorpej-mips-cache:1.1.0.8 thorpej-mips-cache-base:1.1 thorpej-devvp:1.1.0.6 thorpej-devvp-base:1.1 kqueue:1.1.0.4 kqueue-base:1.1 thorpej_scsipi_beforemerge:1.1 thorpej_scsipi_nbase:1.1 thorpej_scsipi_base:1.1 chs-ubc2-newbase:1.1 wrstuden-devbsize:1.1.0.2; locks; strict; comment @# @; 1.1 date 99.12.21.23.19.50; author wrstuden; state dead; branches 1.1.2.1; next ; 1.1.2.1 date 99.12.21.23.19.50; author wrstuden; state Exp; branches; next ; desc @@ 1.1 log @file DEV_BSIZE_gone.log was initially added on branch wrstuden-devbsize. @ text @@ 1.1.2.1 log @Initial commit of recent changes to make DEV_BSIZE go away. Runs on i386, needs work on other arch's. Main kernel routines should be fine, but a number of the stand programs need help. cd, fd, ccd, wd, and sd have been updated. sd has been tested with non-512 byte block devices. vnd, raidframe, and lfs need work. Non 2**n block support is automatic for LKM's and conditional for kernels on "options NON_PO2_BLOCKS". @ text @a0 88 Changes towards the removal of DEV_BSIZE: Started with diffs from Leo which were a recent version of Koji's third solution. Deleted the definition of DEV_BSIZE from i386/include/param.h, and added DEF_BSIZE, which is the default for things not using physical blocks. Modified btodb and dbtob macros to acept a shift and a size. If the shift is 0, then the macro uses multiplication & division. For non-zero shift values, the macros use bit shifting. Added d_bsize routines to block devices, which will return shift and size values for a given partition on a unit. Added sdbsize routine which interrogates current drive parameters. wdbsize assumes DEF_BSIZE disks. checkalias will call a new routines, getbdevshift(), to get the shift and size values for new device nodes. They will be stored in si_bshift & si_bsize, new fields in struct specdev. Added mnt_bshift and mnt_bsize values to struct mount. For filesystems on block nodes, they are initialized to the values from the mounted-on device. Block numbers in the buffer cache are cataloged in these units. Added b_bshift and b_bsize values to struct buf, to indicate the units for block numbers in this struct buf. Noted that ufs (and ffs and lfs) maintain block allocation information in terms of DEF_BSIZE blocks. :-( 99/9/29 changed ufs & friends to use UFS_BSHIFT and UFS_BSIZE for quotas & block allocation counts. Note: unsure of correctness of code, especially lfs, if UFS_BSIZE != S_BLKSIZE, the block size used in stat reporting. bgetvp() will initialize the b_bshift and b_bsize fields when the vnode is assosciated with the buffer. If the node is a VCHR or a VBLK, si_bshift & si_bsize will be used, otherwise mnt_bs{ift,ize} will be. geteblk() now also takes a dev_t. The returned buffer's b_bs{hift,ize} will be initialized from the corresponding block device. 99/9/30 Investigated all uses of DIOCGPART. Most were in mount operations, and so I made the mount call just look in the mounted-on device's si_ fields. Added cdev entrypoint to obtain shift and size values for a device. Because I used the same name (bshift) for both, devices which have both character and block interfaces will have just one entry point, which will be called for both. Discovered that a number of files depend on DIRBLKSIZE, which is defined in ufs/ufs/dir.h - even kern/vfs_getcwd.c and nfs/nfs_serv.c! Bashed on wd, cd, and i386/fd drivers. They now do a better job of supporting variable-sized blocks. 99/12/20 finsihed some more clean up, and created a branch. As per discussions on tech-kern, the device entry points were removed, and now an ioctl call, DIOCGBSHIFT, will return the shift value for the device. As such, si_bshift is only valid after a device has been opened. spec_open() will initialize si_bshift at the end of a successful device open. si_bsize has been dropped. An i386 kernel with these changes runs well. ccd has been updated to require all components be of the same size. raidframe needs work. vnd is still being worked on. To do: userland, stand, and other ports. Also, the non-2**n block size support has been defopt'd. The canonical way for a dirver to determine if it's in a 2**n-supported or not environment when calculating a shift from a size is something like: if (powerof2(new_size)) { shift = intlog2(new_size); } else if (blocksize(-1) == 1) { shift = -new_size; } else { deal with the error } Note: LKM's will always be compiled with non-2**n support by default. @