Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src



Module Name:    src
Committed By:   riastradh
Date:           Mon Mar  2 16:01:57 UTC 2020

Modified Files:
        src/external/cddl/osnet/dist/uts/common/fs/zfs: vdev_disk.c
        src/sys/dev: cgd.c
        src/sys/dev/ata: wd.c wdvar.h
        src/sys/dev/dkwedge: dk.c
        src/sys/sys: disk.h dkio.h

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 \
    src/external/cddl/osnet/dist/uts/common/fs/zfs/vdev_disk.c
cvs rdiff -u -r1.120 -r1.121 src/sys/dev/cgd.c
cvs rdiff -u -r1.458 -r1.459 src/sys/dev/ata/wd.c
cvs rdiff -u -r1.49 -r1.50 src/sys/dev/ata/wdvar.h
cvs rdiff -u -r1.99 -r1.100 src/sys/dev/dkwedge/dk.c
cvs rdiff -u -r1.74 -r1.75 src/sys/sys/disk.h
cvs rdiff -u -r1.25 -r1.26 src/sys/sys/dkio.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index