summaryrefslogtreecommitdiffstats
path: root/sys/geom
Commit message (Collapse)AuthorAgeFilesLines
* Handle MSDOS file systems properly. Before the change file systemspjd2006-08-122-34/+295
| | | | | | | | created on Windows XP (and others maybe) were not detected. We detected only those created with newfs_msdos(8). Submitted by: Tobias Reifenberger <treif@mayn.de> style(9)ified by: pjd
* Verify if a label doesn't point to the parent directory.pjd2006-08-121-0/+24
|
* Before using byte offset for IV creation, covert it to little endian.pjd2006-08-112-11/+21
| | | | | | | | | | This way one will be able to use provider encrypted on eg. i386 on eg. sparc64. This doesn't really buy us much today, because UFS isn't endian agnostic. We retain backward compatibility by setting G_ELI_FLAG_NATIVE_BYTE_ORDER flag on devices with version number less than 2 and not converting the offset.
* Forgot to bump version number after G_ELI_FLAG_READONLY flag addition.pjd2006-08-111-3/+5
|
* Strengthen the check for a PMBR:marcel2006-08-091-18/+35
| | | | | | | | | | | | | | | | | o PMBR partitions count to the number of partitions on the disk, which means that if a PMBR entry is invalid we will not treat the MBR as a PMBR by virtue of it not describing any partitions. Previously the checks were inconsistent in that an invalid PMBR entry would be harmless when no other partitions exist (we would treat the MBR as a PMBR by virtue of it being empty), but it would be fatal when there is at least one other partition. o The partition size of a PMBR partition is one less than the media size because the GPT starts at the second sector (LBA 1) and extends to the end of the media. For backward bug-compatibility we accept a size that's exactly the media size (FreeBSD bug). Also, when the partition size can not be represented in a 32-bit integral, the partition size in the MBR is to be set to 0xFFFFFFFF. Accept this as a valid size, even if the size can be represented.
* Allow geli to operate on read-only providers.pjd2006-08-093-24/+67
| | | | | Initial patch from: vd MFC after: 2 weeks
* Not only a request from us can be passed to g_{mirror,raid3}_worker()pjd2006-08-092-10/+23
| | | | | | | function, but also a request to us, in which case checking bio_cflags is wrong, because the class above us is controling it, not we. MFC after: 1 week
* Fix a phase-ordering bug: check the mediasize and sectorsize aftermarcel2006-08-081-20/+21
| | | | | | | | | | we obtained access. It is possible that GPT gets to taste a disk first, which means the disk has not been opened before and it will not get opened until after we checked the mediasize and sectorsize. However, since the mediasize and sectorsize are determined at open and that happens when access is optained, checking the mediasize and sectorsize before obtaining access may result in GPT rejecting the disk.
* Commit the results of the typo hunt by Darren Pilgrim.yar2006-08-043-3/+3
| | | | | | | | | | This change affects documentation and comments only, no real code involved. PR: misc/101245 Submitted by: Darren Pilgrim <darren pilgrim bitfreak org> Tested by: md5(1) MFC after: 1 week
* Don't use f-word in comments. We are gentlemans.pjd2006-08-012-2/+2
| | | | Pointed out by: Maciej Sobczak
* Fix what looks like a typo: MODULE_DEPEND() takes module names,yar2006-07-271-1/+1
| | | | | | | not KLD file names; and GELI module's name is g_eli, not geom_eli. Approved by: pjd (silence) MFC after: 5 days
* Don't forget to initialize crp_olen field, which is used to calculatepjd2006-07-221-0/+1
| | | | bio_completed value.
* Always allow to specify components with /dev/ prefix.pjd2006-07-132-2/+8
| | | | MFC after: 3 days
* Only check if we're freeing a valid object if we hold the topology lock.pjd2006-07-121-4/+7
| | | | This prevents panic under heavy load with DIAGNOSTIC compiled in.
* Use proper defines instead of magic values.pjd2006-07-102-4/+4
| | | | MFC after: 1 week
* When kern.geom.raid3.use_malloc tunnable is set to 1, malloc(9) instead ofpjd2006-07-091-43/+88
| | | | | | | | uma(9) will be used for memory allocation. In case of problems or tracking bugs, there are more useful tools for malloc(9) debugging than for uma(9) debugging, like memguard(9) and redzone(9). MFC after: 1 week
* Remove bogus assertion.pjd2006-07-071-1/+0
| | | | | Reported by: Bradley W. Dutton <brad-fbsd-stable@duttonbros.com> MFC after: 3 days
* Allow to close access even if device is already destroyed.pjd2006-07-032-6/+10
| | | | | | Reported by: Ulrich Spoerlein <uspoerlein@gmail.com> PR: kern/98093 MFC after: 1 week
* Improve check for protective MBR. Instead of assiming that protectivesobomax2006-06-261-5/+24
| | | | | | | | | | MBR should have only one entry of type 0xEE, consider protective MBR to be one, that has at least one entry of type 0xEE covering the whole unit. This makes GEOM_GPT compatible with disks partitioned by the Apple's BootCamp. Approved in principle by: marcel MFC After: 1 month
* In g_dev_strategy(), when failing an IO request with EINVAL due tosimon2006-06-181-0/+1
| | | | | | | | | | | | | | offset or request size which is not a multiple of the sector size, make sure that the bio is set to indicate that no data has actually been transferred. The result of this is that the file offset is no longer incremented for these requests. The fact that the file offset was incremented broke fdisk(8)'s probing of sector size for non-512 byte sector sizes. Reviewed by: phk, cperciva Submitted by: mdodd MFC after: 2 weeks
* Allow to use the old -a option to specify an encryption algorithm to usepjd2006-06-061-13/+31
| | | | | (for backward compatibility), but print a warning to inform about the change.
* - Unbreak the build when geli is compiled into the kernel (on as module),pjd2006-06-061-2/+2
| | | | | | by silencing unfounded compiler warning. Reported by:
* Implement data integrity verification (data authentication) for geli(8).pjd2006-06-056-275/+1101
| | | | Supported by: Wheel Sp. z o.o. (http://www.wheel.pl)
* Make kern.geom.eli.overwrites sysctl a tunable as well.pjd2006-06-051-0/+1
|
* Add g_duplicate_bio() function which does the same thing what g_clone_bio()pjd2006-06-052-0/+26
| | | | is doing, but g_duplicate_bio() allocates new bio with M_WAITOK flag.
* Fix unaligned memory accesses on Alpha and possible other platforms.marcel2006-06-041-3/+4
| | | | | | | | | | | | | | | | | By using a pointer to struct dos_partition, we implicitly tell the compiler that the pointer is 4-bytes aligned, even though we know that's not the case. The fact that we only dereference the pointer to access a byte-wide field (field dp_ptyp) is not a guarantee that the compiler will in fact use a byte-wide load. On some platforms it's more efficient to use long word or quad word loads and use bit-shifting and bit-masking to get the intended byte. On those platforms an misaligned load will be the result. The fix is to use byte-wide pointer arithmetic based on sizeof() and offsetof() to avoid invalid casts which avoids that the compiler makes invalid assumptions. Backtrace provided by: wilko@ MFC after: 1 week
* Remove the trailing half of a sentence which was clearly supercededceri2006-05-241-2/+0
| | | | by the preceding one some time during editing.
* Use G_RAID3_FOREACH_SAFE_BIO() macro instead of G_RAID3_FOREACH_BIO() inpjd2006-05-041-6/+4
| | | | | | | | | two places where g_io_request() is called. g_io_request() can free bio structure so we can't reference it after and G_RAID3_FOREACH_BIO() macro was doing this. Found by: Coverity Prevent analysis tool (with my new models) MFC after: 1 day
* We shouldn't lock the topology here - we will panic on assertion insidepjd2006-04-301-2/+0
| | | | | | | g_raid3_bump_syncid(). Reported by: Bradley W. Dutton <brad-fbsd-stable@duttonbros.com> MFC after: 1 day
* - Don't hold the device sx lock when going to sleep.pjd2006-04-281-6/+23
| | | | | | | | - Prevent possible live-lock in case of memory problems by freeing already completed requests first. Reported and tested by: markus, Bradley W. Dutton <brad-fbsd-stable@duttonbros.com> MFC after: 1 day
* - Remove dead code.pjd2006-04-282-17/+18
| | | | | | | - Comment possible event miss, which isn't critical, but probably can be fixed by replacing the event lock usage with the queue lock. MFC after: 2 weeks
* Be sure to not destroy device twice. This is not possible in theory, butpjd2006-04-281-2/+13
| | | | | | with this change there is even no theoretical race. MFC after: 2 weeks
* Be sure to not destroy device twice. This is not possible in theory, butpjd2006-04-281-2/+13
| | | | | | with this change there is even no theoretical race. MFC after: 2 weeks
* geli(8) provides keys on newsession time, so remove CRD_F_KEY_EXPLICIT flagpjd2006-04-202-3/+2
| | | | as HW crypto drivers don't support it.
* Fix storing offset of already synchronized data. Offset in entire array waspjd2006-04-181-3/+5
| | | | | | | | | | | | | stored in metadata instead of an offset in single disk. After reboot/crash synchronization process started from a wrong offset skipping (not synchronizing) part of the component which can lead to data corrutpion (when synchronization process was interrupted on initial synchronization) or other strange situations like 'graid3 status' showing value more than 100%. Reported, reviewed and tested by: ru Reported by: Dmitry Morozovsky <marck@rinet.ru> MFC after: 1 day
* Correct debug: we are sending child bio here, not parent bio.pjd2006-04-151-2/+2
| | | | MFC after: 1 week
* Make CCD be able to read and write Linux software raids.cracauer2006-04-131-2/+24
| | | | | | | | | | Supported for raid-0 with <n> disks, raid-1 with 2 disks. Manpages have examples, warnings etc. Test scripts on http://www.cons.org/cracauer/ccdconfig-linux/ Reviewed by: alfred
* Pass BIO_GETATTR requests down.pjd2006-04-121-5/+14
| | | | MFC after: 1 week
* Introduce and use delayed-destruction functionality from a pre-sync hook,pjd2006-04-106-111/+174
| | | | | | | | | | which means that devices will be destroyed on last close. This fixes destruction order problems when, eg. RAID3 array is build on top of RAID1 arrays. Requested, reviewed and tested by: ru MFC after: 2 weeks
* MFp4:marcel2006-04-101-20/+169
| | | | | | | | | | | | o Implement the remove verb to remove a partition entry. o Improve error reporting by first checking that the verb is valid. o Add an entry parameter to the add verb. this parameter can be both read-only as welll as read-write and specifies the entry number of the newly added partition. o Make sure that the provider is alive when passed to us. It may be withering away. o When adding a new partition entry, test for overlaps with existing partitions.
* Add g_wither_provider() to abstract the details of destroying amarcel2006-04-104-3/+15
| | | | | | particular provider. Use this function where g_orphan_provider() is being called so that the flags are updated correctly and g_orphan_provider() is called only when allowed.
* Change gctl_set_param() to return an error instead of setting anmarcel2006-04-074-17/+34
| | | | | | | | | | | error on the request. Add a wrapper, gctl_set_param_err(), that sets the error on the request from the error returned by gctl_set_param() and update current callers of gctl_set_param() to call gctl_set_param_err() instead. This makes gctl_set_param() much more usable in situations where the caller knows better what to do with certain (apparent) error conditions and setting an error on the request is not one of the things that need to be done.
* Typos.pjd2006-04-051-1/+1
|
* Revert previous change, as I fixed MD5(9).pjd2006-03-301-6/+2
|
* md_hash field in g_eli_metadata structure is not 4 byte aligned, whichpjd2006-03-301-2/+6
| | | | | | | | | | | | | | | case panic on sparc64. The problem is in MD5(9) implementation. The Encode() function takes 'unsigned char *output' as its first argument, which is then assigned to 'u_int32_t *op'. If the 'output' argument is not 4 byte aligned (and in geli(8) case it is not), sparc64 machine will panic. I don't know how to fix MD5(9) in a clean way, so I'm implementing a work-around in geli(8). Reported by: brueffer MFC after: 3 days
* Protect from creating striped and RAID5 plexes with unequally sizedle2006-03-305-68/+112
| | | | subdisks.
* - 'ndisks' variable is not boolean, so compare it with a value.pjd2006-03-301-1/+1
| | | | | | - Keep conditions order consistent with the comment above. MFC after: 3 days
* Preserve previous behaviour of kern.geom.raid3.n{64,16,4}k tunables were 0pjd2006-03-281-1/+1
| | | | | | | means unlimited. Reported by: ru MFC after: 3 days
* Increase debug level for "Thread exiting." message. It's not that importantpjd2006-03-251-1/+1
| | | | | | and is 0 by accident. MFC after: 3 days
* Fix whitespace.le2006-03-231-1/+1
|
OpenPOWER on IntegriCloud