summaryrefslogtreecommitdiffstats
path: root/sys/geom
Commit message (Collapse)AuthorAgeFilesLines
* Add some spare fields to the g_class and g_geom structures needed to implementpjd2011-07-171-0/+5
| | | | direct I/O handling and provider's property changes handling.
* Remove include of sys/sbuf.h from geom/geom.h.ae2011-07-111-1/+0
| | | | | | | sbuf support is not always required for geom/geom.h users, and no need to depend from it. PR: kern/158398
* Include sys/sbuf.h directly.ae2011-07-1125-0/+27
| | | | Reviewed by: pjd
* Allow disk partitions associated with UFS read-only mountedmckusick2011-07-101-1/+1
| | | | | | | | | filesystems to be opened for writing. This functionality used to be special-cased for just the root filesystem, but with this change is now available for all UFS filesystems. This change is needed for journaled soft updates recovery. Discussed with: Jeff Roberson
* Initialize elements of state array when creating the GPT table.ae2011-06-291-34/+33
| | | | | | | | | This fixes the problem, when the secondary GPT header is not erased when partition table destroyed. Move equal operations from g_part_gpt_create and g_part_gpt_recover to the separate function g_gpt_set_defaults. Reported by: dwhite MFC after: 1 week
* EBR could contain an early stage of boot code. But we do not support it.ae2011-06-271-16/+20
| | | | | | | | | | | | | Remove message about non empty bootcode, we can not break something while GEOM_PART_EBR_COMPAT is defined. But without GEOM_PART_EBR_COMPAT any changes in EBR are allowed and we can accidentally wipe the boot code. To do not break anything save the first EBR chunk and keep it untouched each time when we are changing EBR. Note that we are still not support boot code for EBR. PR: kern/141235 MFC after: 1 month
* MS Windows NT+ uses 4 bytes at offset 0x1b8 in the MBR to identifyae2011-06-271-6/+8
| | | | | | | | | | | disk drive. The boot0cfg(8) utility preserves these 4 bytes when is writing bootcode to keep a multiboot ability. Change gpart's bootcode method to keep DSN if it is not zero. Also do not allow writing bootcode with size not equal to MBRSIZE. PR: kern/157819 Tested by: Eir Nym MFC after: 1 month
* Change the way how we update bootcode for BSD scheme.ae2011-06-201-13/+12
| | | | | | | | | Since the only parameter that we check is size of bootcode, then allow only two sizes: size of boot1 and size of /boot/boot. This partially protects users from losing ability to boot if incorrect bootcode is specified. Requested by: ru
* Plumb device physical path reporting from CAM devices, through GEOM andgibbs2011-06-146-1/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DEVFS, and make it accessible via the diskinfo utility. Extend GEOM's generic attribute query mechanism into generic disk consumers. sys/geom/geom_disk.c: sys/geom/geom_disk.h: sys/cam/scsi/scsi_da.c: sys/cam/ata/ata_da.c: - Allow disk providers to implement a new method which can override the default BIO_GETATTR response, d_getattr(struct bio *). This function returns -1 if not handled, otherwise it returns 0 or an errno to be passed to g_io_deliver(). sys/cam/scsi/scsi_da.c: sys/cam/ata/ata_da.c: - Don't copy the serial number to dp->d_ident anymore, as the CAM XPT is now responsible for returning this information via d_getattr()->(a)dagetattr()->xpt_getatr(). sys/geom/geom_dev.c: - Implement a new ioctl, DIOCGPHYSPATH, which returns the GEOM attribute "GEOM::physpath", if possible. If the attribute request returns a zero-length string, ENOENT is returned. usr.sbin/diskinfo/diskinfo.c: - If the DIOCGPHYSPATH ioctl is successful, report physical path data when diskinfo is executed with the '-v' option. Submitted by: will Reviewed by: gibbs Sponsored by: Spectra Logic Corporation Add generic attribute change notification support to GEOM. sys/sys/geom/geom.h: Add a new attrchanged method field to both g_class and g_geom. sys/sys/geom/geom.h: sys/geom/geom_event.c: - Provide the g_attr_changed() function that providers can use to advertise attribute changes. - Perform delivery of attribute change notifications from a thread context via the standard GEOM event mechanism. sys/geom/geom_subr.c: Inherit the attrchanged method from class to geom (class instance). sys/geom/geom_disk.c: Provide disk_attr_changed() to provide g_attr_changed() access to consumers of the disk API. sys/cam/scsi/scsi_pass.c: sys/cam/scsi/scsi_da.c: sys/geom/geom_dev.c: sys/geom/geom_disk.c: Use attribute changed events to track updates to physical path information. sys/cam/scsi/scsi_da.c: Add AC_ADVINFO_CHANGED to the registered asynchronous CAM events for this driver. When this event occurs, and the updated buffer type references our physical path attribute, emit a GEOM attribute changed event via the disk_attr_changed() API. sys/cam/scsi/scsi_pass.c: Add AC_ADVINFO_CHANGED to the registered asynchronous CAM events for this driver. When this event occurs, update the physical patch devfs alias for this pass instance. Submitted by: gibbs Sponsored by: Spectra Logic Corporation
* MFCattilio2011-06-032-1/+22
|\
| * Update disk's stripesize and stripeoffset parameters on provider open.mav2011-06-031-0/+6
| | | | | | | | | | | | | | | | | | They are media-dependent and may change in run-time, same as sectorsize and/or mediasize. SCSI devices return physical sector size and offset via READ CAPACITY(16) command and so can not report it until media inserted or at least until probe sequence completed. UNMAP support is also reported there.
| * Add diagnostic message about not aligned partitions.ae2011-06-031-1/+16
| | | | | | | | Idea from: ivoras
* | MFCattilio2011-06-021-4/+2
|\ \ | |/
| * Do not hide stripeoffset from libgeom(3), it may be useful even whenae2011-06-021-4/+2
| | | | | | | | | | | | stripesize is zero. MFC after: 1 week
* | MFCattilio2011-05-271-2/+7
|\ \ | |/
| * Some partitioning tools may have a different opinion about diskae2011-05-271-2/+7
| | | | | | | | | | | | geometry and partitions may start from withing the first track. If we found such partitions, then do not reserve space of the first track, only first sector.
* | MFCattilio2011-05-265-19/+17
|\ \ | |/
| * Prevent non-aligned reading from provider while tasting. Rejectae2011-05-252-0/+10
| | | | | | | | | | | | | | providers with unsupported sectorsize. Reported by: Joerg Wunsch MFC after: 1 week
| * Do not truncate available disk space to the closest track boundary.ae2011-05-251-7/+3
| |
| * Do not truncate available disk space to the closest track boundary.ae2011-05-251-2/+1
| |
| * Do not truncate available disk space to the closest track boundary.ae2011-05-251-4/+3
| |
| * Remove unused variable.ae2011-05-241-3/+0
| | | | | | | | MFC after: 1 week
| * Remove unused variable.ae2011-05-241-3/+0
| | | | | | | | MFC after: 1 week
| * Recognize BIO_FLUSH requests and pass them to userland.pjd2011-05-231-0/+3
| | | | | | | | MFC after: 1 week
| * Make diagnostic messages more specific. With bootverbose print outae2011-05-161-42/+83
| | | | | | | | | | | | | | all inconsistencies of integrity in the partition table, not first found only. Requested by: kib
| * Add diagnostic messages for integrity checks.ae2011-05-161-0/+20
| |
| * Add a sysctl kern.geom.part.check_integrity for those who has corruptae2011-05-151-3/+14
| | | | | | | | | | | | partition tables and lost an ability to boot after r221788. Also unhide an error message from bootverbose, this would help to easier determine the problem.
* | MFCattilio2011-05-231-0/+3
| |
* | MFCattilio2011-05-161-19/+91
| |
* | MFCattilio2011-05-151-0/+1
|\ \ | |/
| * Fix a memory leak possible in g_eli_key_allocate() if the key with thetrociny2011-05-151-0/+1
| | | | | | | | | | | | | | same keyno is added while we aren't holding the lock. Approved by: pjd (mentor) MFC after: 1 week
* | MFCattilio2011-05-122-47/+73
|\ \ | |/
| * Move the three geom kprocs as threads under a single pid.thompsa2011-05-111-46/+25
| | | | | | | | Reviewed by: julian
| * Add basic metadata integrity check. In case when partition table wasae2011-05-111-1/+48
| | | | | | | | | | | | | | | | probed and read successfull, but it contains invalid values (e.g. overlapped partitions, offset or size is out of bounds), then table will be rejected. MFC after: 1 month
* | MFCattilio2011-05-0811-31/+73
|\ \ | |/
| * Limit number of sectors that can be addressed.ae2011-05-081-5/+2
| | | | | | | | MFC after: 1 week
| * Limit number of sectors that can be addressed.ae2011-05-081-2/+2
| | | | | | | | MFC after: 1 week
| * Limit number of sectors that can be addressed.ae2011-05-081-2/+5
| | | | | | | | Reject table if blkcount from metadata is greater than provider.
| * Limit number of sectors that can be addressed.ae2011-05-081-2/+2
| | | | | | | | MFC after: 1 week
| * Replace UINT_MAX to UINT32_MAX.ae2011-05-082-4/+4
| | | | | | | | | | Pointed out by: kib MFC after: 1 week
| * Limit number of sectors that can be addressed.ae2011-05-081-2/+2
| | | | | | | | MFC after: 1 week
| * Limit number of sectors that can be addressed.ae2011-05-081-2/+2
| | | | | | | | MFC after: 1 week
| * Export GELI class version via sysctl kern.geom.eli.version.pjd2011-05-081-0/+3
| | | | | | | | MFC after: 1 week
| * Version 6 is compatible with version 5 when it comes to control commands.pjd2011-05-081-1/+6
| | | | | | | | MFC after: 1 week
| * Detect and handle metadata of version 6.pjd2011-05-081-8/+9
| | | | | | | | MFC after: 1 week
| * When support for multiple encryption keys was committed, GELI integrity modepjd2011-05-083-3/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | was not updated to pass CRD_F_KEY_EXPLICIT flag to opencrypto. This resulted in always using first key. We need to support providers created with this bug, so set special G_ELI_FLAG_FIRST_KEY flag for GELI provider in integrity mode with version smaller than 6 and pass the CRD_F_KEY_EXPLICIT flag to opencrypto only if G_ELI_FLAG_FIRST_KEY doesn't exist. Reported by: Anton Yuzhaninov <citrin@citrin.ru> MFC after: 1 week
| * Remove prototype for a function that no longer exist.pjd2011-05-081-2/+0
| | | | | | | | MFC after: 1 week
| * Drop proper key.pjd2011-05-081-1/+1
| | | | | | | | MFC after: 1 week
| * Add magic field to the g_eli_key structure to detect if we are reallypjd2011-05-081-1/+13
| | | | | | | | | | | | operating on proper structures. MFC after: 1 week
| * Updates to geom_map from the author.adrian2011-05-051-209/+246
| | | | | | | | | | | | | | The major update here is to support 64 bit size/offsets. There's also style related changes. Submitted by: ray@dlink.ua
OpenPOWER on IntegriCloud