History log of /src/sys/kern/subr_disk_open.c |
Revision | | Date | Author | Comments |
1.15 |
| 29-Feb-2020 |
mlelstv | Make getdiskinfo() compatible with a DIOCGWEDGEINFO.
dkw_parent is defined to hold the disk name as used by disk_find(), not a partition (i.e. no partition letter appended).
|
1.14 |
| 20-Feb-2019 |
hannken | branches: 1.14.4; 1.14.6; Fix vnode locking for opendisk(), must lock for VOP_OPEN().
|
1.13 |
| 08-Dec-2015 |
christos | branches: 1.13.18; Replace DIOCGPART -> DIOCGPARTINFO which returns the data needed instead of pointers.
|
1.12 |
| 31-Dec-2014 |
christos | get the wedge info first if it exists, because this will support larger sizes.
|
1.11 |
| 27-Oct-2012 |
chs | branches: 1.11.14; split device_t/softc for all remaining drivers. replace "struct device *" with "device_t". use device_xname(), device_unit(), etc.
|
1.10 |
| 07-Jul-2012 |
tsutsui | branches: 1.10.2; unsigned -> unsigned int
|
1.9 |
| 07-Jul-2012 |
tsutsui | Check if secsize and numsec returned from ioctl's are sane values and add DIAGNOSTIC messages in getdisksize().
Discussed on source-changes-d@: http://mail-index.NetBSD.org/source-changes-d/2012/07/02/msg004989.html and patch is reviwed by christos@ and pgoyette@.
|
1.8 |
| 27-Apr-2012 |
drochner | minor mostly cosmetical fixes: use designated type for device major numbers, typo in comment, misuse of minor() (the latter one is not cosmetical, but would only affect systems with more than 256 disk wedges)
|
1.7 |
| 07-Apr-2012 |
christos | make this bitch less when we have wedges (EBUSY for the underlying disks)
|
1.6 |
| 27-Nov-2011 |
tsutsui | branches: 1.6.2; Revert "stopcap fix" for rump by christos, which causes build failure on most non-x86 ports and seems unnecessary. (caused by wrong rump_namei.h?)
|
1.5 |
| 25-Nov-2011 |
christos | stopgap fix for rump build
|
1.4 |
| 13-Nov-2011 |
christos | Add getdiskinfo() to centralize the DIOCGPART mess in one place.
|
1.3 |
| 30-Jul-2011 |
jmcneill | branches: 1.3.2; Add an FSILENT flag and use it to suppress "Medium Not Present" scsipi spam when trying to access offline drives at boot.
|
1.2 |
| 30-Jan-2010 |
mlelstv | Add helper function that determines the size and block size of a disk device. For now we query - the disk label - the wedge info and data from disk(9)
|
1.1 |
| 06-Sep-2009 |
pooka | branches: 1.1.2; Remove autoconf dependency on vfs and dk: opendisk() -> kern/subr_disk_open.c config_handle_wedges -> dev/dkwedge/dk.c
|
1.1.2.3 |
| 11-Mar-2010 |
yamt | sync with head
|
1.1.2.2 |
| 16-Sep-2009 |
yamt | sync with head
|
1.1.2.1 |
| 06-Sep-2009 |
yamt | file subr_disk_open.c was added on branch yamt-nfs-mp on 2009-09-16 13:38:01 +0000
|
1.3.2.3 |
| 30-Oct-2012 |
yamt | sync with head
|
1.3.2.2 |
| 23-May-2012 |
yamt | sync with head.
|
1.3.2.1 |
| 17-Apr-2012 |
yamt | sync with head
|
1.6.2.1 |
| 29-Apr-2012 |
mrg | sync to latest -current.
|
1.10.2.2 |
| 03-Dec-2017 |
jdolecek | update from HEAD
|
1.10.2.1 |
| 20-Nov-2012 |
tls | Resync to 2012-11-19 00:00:00 UTC
|
1.11.14.2 |
| 27-Dec-2015 |
skrll | Sync with HEAD (as of 26th Dec)
|
1.11.14.1 |
| 06-Apr-2015 |
skrll | Sync with HEAD
|
1.13.18.2 |
| 08-Apr-2020 |
martin | Merge changes from current as of 20200406
|
1.13.18.1 |
| 10-Jun-2019 |
christos | Sync with HEAD
|
1.14.6.1 |
| 29-Feb-2020 |
ad | Sync with head.
|
1.14.4.1 |
| 21-Mar-2020 |
martin | Pull up following revision(s) (requested by riastradh in ticket #788):
sys/sys/dkio.h: revision 1.26 sys/dev/dkwedge/dk.c: revision 1.100 sys/sys/disk.h: revision 1.75 external/cddl/osnet/dist/uts/common/fs/zfs/vdev_disk.c: revision 1.14 external/cddl/osnet/dist/uts/common/fs/zfs/vdev_disk.c: revision 1.15 sys/dev/cgd.c: revision 1.121 sys/dev/ata/wdvar.h: revision 1.50 sys/kern/subr_disk_open.c: revision 1.15 sys/dev/ata/wd.c: revision 1.459
New ioctl DIOCGSECTORALIGN returns sector alignment parameters.
struct disk_sectoralign { /* First aligned sector number. */ uint32_t dsa_firstaligned; /* Number of sectors per aligned unit. */ uint32_t dsa_alignment; };
- Teach wd(4) to get it from ATA. - Teach cgd(4) to pass it through from the underlying disk. - Teach dk(4) to pass it through with adjustments. - Teach zpool (zfs) to take advantage of it. => XXX zpool doesn't seem to understand when the vdev's starting sector is misaligned.
Missing: - ccd(4) and raidframe(4) support -- these should support _using_ DIOCGSECTORALIGN to decide where to start putting ccd or raid stripes on disk, and these should perhaps _implement_ DIOCGSECTORALIGN by reporting the stripe/interleave factor. - sd(4) support -- I don't know any obvious way to get it from SCSI, but if any SCSI wizards know better than I, please feel free to teach sd(4) about it! - any ld(4) attachments -- might be worth teaching the ld drivers for nvme and various raid controllers to get the aligned sector size
There's some duplicate logic here for now. I'm doing it this way, rather than gathering the logic into a new disklabel_sectoralign function or something, so that this change is limited to adding a new ioctl, without any new kernel symbols, in order to make it easy to pull up to netbsd-9 without worrying about the module ABI.
Make getdiskinfo() compatible with a DIOCGWEDGEINFO.
dkw_parent is defined to hold the disk name as used by disk_find(), not a partition (i.e. no partition letter appended).
Use utility functions to handle disk geometry.
|