summaryrefslogtreecommitdiffstats
path: root/sys/geom
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove unneeded variables.trasz2010-01-252-4/+0
| | | | Found with: clang
* Remove pointless assignment.trasz2010-01-251-1/+0
| | | | Found with: clang
* Remove some pointless variable assignments.trasz2010-01-252-4/+1
| | | | Found with: clang
* Remove unused variable.trasz2010-01-251-2/+0
| | | | Found with: clang
* Expose stripe offset and stripe size through libgeom and geom(8) userlanddelphij2010-01-171-0/+4
| | | | | | utilities. Reviewed by: pjd, mav (earlier version)
* Add gmountver, disk mount verification GEOM class.trasz2010-01-162-0/+717
| | | | | | | | Note that due to e.g. write throttling ('wdrain'), it can stall all the disk I/O instead of just the device it's configured for. Using it for removable media is therefore not a good idea. Reviewed by: pjd (earlier version)
* Change the way in which zero stripesize is handled. Instead of reportingmav2010-01-063-13/+10
| | | | | | | | | zero stripeoffset in such case (as if device has no stripes), report offset from the beginning of the media (as if device has single infinite stripe). This gives partitioning tools information, required to guess better partition alignment, in case if hardware doesn't report it's stripe size. For example, it should give disklabel info about odd offset made by fdisk.
* Move wakeup() out of mutex to reduce contention.mav2010-01-051-3/+3
|
* Move wakeup() out of mutex to reduce contention.mav2010-01-051-4/+4
|
* Slightly optimize XOR calculation.mav2010-01-051-24/+31
|
* Properly return the UUID represented by the alias.marcel2010-01-021-1/+1
| | | | | | PR: 142174 Submitted by: Przemyslaw Laczynski <torindel@gmail.com> Pointy hat to: rpaulo
* Call wakeup() only for the first request on the queue.mav2009-12-301-2/+8
|
* (S)LIST_HEAD_INITIALIZER takes a (S)LIST_HEAD as an argument.antoine2009-12-281-1/+1
| | | | | | | | | Fix some wrong usages. Note: this does not affect generated binaries as this argument is not used. PR: 137213 Submitted by: Eygene Ryabinkin (initial version) MFC after: 1 month
* Add BIO_DELETE support to ada(4):mav2009-12-281-2/+2
| | | | | | | | | | | | | | | | | | | - For SSDs use TRIM feature of DATA SET MANAGEMENT command, as defined by ACS-2 specification working draft. - For CompactFlash use CFA ERASE command, same as ad(4) does. With this patch, `newfs -E /dev/ada1` was able to restore write speed of my heavily weared OCZ Vertex SSD (firmware 1.4) up to the initial level for the most part of it's capacity. Previous 1.3 firmware, even reportiong TRIM capabilty bit set, was not working, reporting ABORT error for every DSM command. I have no idea whether it is normal, but for some reason it takes 200ms to handle any TRIM command on this drive, that was making delete extremely slow. But TRIM command is able to accept long list of LBAs and the length of that list seems doesn't affect it's execution time. Implemented request clusting algorithm allowed me to rise delete rate up to reasonable numbers, when many parallel DELETE requests running.
* Make geom_concat to passthrough stripe parameters of the first component,mav2009-12-241-5/+8
| | | | hoping that rest will fit.
* As soon as geom_raid3 reports it's own stripe as sector size, report largestmav2009-12-241-0/+14
| | | | | underlying provider's stripe, multiplied by number of data disks in array, due to transformation done, as array stripe.
* As soon as mirror has no own stripes, report largest stripe of unrerlyingmav2009-12-241-0/+9
| | | | components, hoping others fit, if they are not equal.
* Add two disk ioctls, giving user-level tools information about disk/arraymav2009-12-241-1/+6
| | | | stripe (optimal access block) size and offset.
* Make geom_stripe report it's stripe size to upper layers.mav2009-12-241-0/+2
|
* Make graid3 fallback to malloc() when component request size is biggermav2009-12-212-9/+15
| | | | then maximal prepared UMA zone size. This fixes crash with MAXPHYS > 128K.
* Add Microsoft and NetBSD partition types handling.rpaulo2009-12-143-0/+41
|
* Simplify partition type parsing by using a data-oriented model.rpaulo2009-12-143-63/+68
| | | | While there add more Apple and Linux partition types.
* Change 'load' balancing mode algorithm:mav2009-12-032-30/+26
| | | | | | | | | | | | | - Instead of measuring last request execution time for each drive and choosing one with smallest time, use averaged number of requests, running on each drive. This information is more accurate and timely. It allows to distribute load between drives in more even and predictable way. - For each drive track offset of the last submitted request. If new request offset matches previous one or close for some drive, prefer that drive. It allows to significantly speedup simultaneous sequential reads. PR: kern/113885 Reviewed by: sobomax
* Provide a set of sysctls and tunables to disable device node creationtrasz2009-11-289-29/+68
| | | | | | | | | | for specific "kinds" of disk labels - for example, GPT UUIDs. Reason for this is that sometimes, other GEOM classes attach to these device nodes instead of the proper ones - e.g. they attach to /dev/gptid/XXX instead of /dev/ada0p2, which is annoying. Reviewed by: pjd (earlier version) MFC after: 1 month
* Add a missing check for Apple HFS partitions.rpaulo2009-11-121-0/+2
| | | | MFC after: 1 week
* We need to allocate space for the header in the create path also.rnoland2009-11-121-0/+3
| | | | | | | | | This fixes a null pointer dereference with "gpart create -s GPT" after the previous commit. Reported by: Yuri Pankov Pointyhat to: me MFC after: 1 week
* Fix handling of GPT headers when size is > 92 bytes.rnoland2009-11-071-68/+93
| | | | | | | | | | | | | | | | | It is valid for an on-disk GPT header to report a header size which is greater than 92 bytes. Previously, we would read in the sector and copy only the 92 bytes that we know how to deal with before calculating the checksum for comparison. This meant that when we did the checksum, we overshot the buffer and took in random memory, so the checksum would fail. We now determine the size of the header and allocate enough space to preserve the entire on-disk contents. This allows us to be correctly calculate the checksum and be able to modify and write the header back to the disk, while preserving data that we might not understand. Reported by: Kris Weston Approved by: marcel@ MFC after: 2 weeks
* Set the active flag in the PMBR when we install bootcode on a GPTrnoland2009-10-141-0/+3
| | | | | | | | partitioned disk. Some BIOS require this to be set before they will boot the device. Approved by: marcel MFC after: 2 weeks
* If provider is open for writing when we taste it, skip it for classes thatpjd2009-10-096-0/+25
| | | | | | | | | | | | | | | | | | | | depend on on-disk metadata. This was we won't attach to providers that are used by other classes. For example we don't want to configure partitions on da0 if it is part of gmirror, what we really want is partitions on mirror/foo. During regular work it works like this: if provider is open for writing a class receives the spoiled event from GEOM and detaches, once provider is closed the taste event is send again and class can rediscover its metadata if it is still there. This doesn't work that way when new class arrives, because GEOM gives all existing providers for it to taste, also those open for writing. Classes have to decided on their own if they want to deal with such providers (eg. geom_dev) or not (classes modified by this commit). Reported by: des, Oliver Lehmann <lehmann@ans-netz.de> Tested by: des, Oliver Lehmann <lehmann@ans-netz.de> Discussed with: phk, marcel Reviewed by: marcel MFC after: 3 days
* - Improve error message consistency and wording.lulf2009-10-056-21/+21
|
* The first 96 bytes may not be zeroes. It can contain trivial bootmarcel2009-09-281-5/+5
| | | | | | | | | | | | | code that merely emits an error and waits for a key press before rebooting. The error being that extended partitions are not bootable. The origin is presumed to be Windows 2000; Windows XP does not do this... For now, ignore the first 96 bytes when checking that the EBR is (for the most part) all zeroes. Tested by: Mario Lobo <mlobo@digiart.art.br> MFC after: 1 week
* Don't create more partitions than can fit in the table by checkingmarcel2009-09-241-0/+4
| | | | that the index is within bounds.
* Remove unused variable.trasz2009-09-081-2/+0
|
* Do not check proper request alignment here in geom_dev in production.mav2009-09-081-2/+2
| | | | | | | It will be checked any way later by g_io_check() in g_io_schedule_down(). It is only needed here to not trigger panic from additional check, when INVARIANTS enabled. So cover it with #ifdef INVARIANTS. It saves two 64bit divisions per request.
* MFp4:mav2009-09-061-2/+2
| | | | | | Remove msleep() timeout from g_io_schedule_up/down(). It works fine without it, saving few percents of CPU on high request rates without need to rearm callout twice per request.
* Add support for changing providers priority.pjd2009-09-061-9/+62
| | | | Submitted by: Mel Flynn
* Remove artificial MAX_IO_SIZE constant, equal to DFLTPHYS * 2. Use MAXPHYSmav2009-09-041-7/+6
| | | | | instead. It is NULL change for GENERIC kernel, but allows 'fast' mode to work on systems with increased MAXPHYS.
* Simplify g_disk_ident_adjust() function and allow any printable characterpjd2009-09-041-28/+15
| | | | | | | in serial number. Discussed with: trasz Obtained from: Wheel Sp. z o.o. (http://www.wheel.pl)
* There's no need for checking result of M_WAITOK allocation.pjd2009-08-271-4/+0
|
* Fix an obvious topology lock leak.pjd2009-08-271-0/+1
| | | | MFC after: 3 days
* The start of the EFI GPT partition in the PMBR can always be representedmarcel2009-08-171-3/+3
| | | | | | | | | | by CHS addressing. Don't define these fields as 0xff, but rather define them correctly. This prevents boot problems on PCs where GPT is being used. PR: 115406 Submitted by: Kent Hauser <kent@khauser.net> Approved by: re (kib)
* - Fix the issue with read access count modification on RAID-5 plexes properly.lulf2009-07-181-4/+6
| | | | | | | | | If the access counts were not increased and decreased in equal numbers by gvinum consumers, the read access count would be inconsistent with the write access count. Instead, modify the read access count with the write access count directly to prevent any inconsistencies. Approved by: re (kib)
* Revert revisions 188839 and 188868. Use of the ioctl in geom_dev.cmarcel2009-07-083-49/+0
| | | | | | | | | | | | is invalid because the ioctl happens without prior open. The ioctl got introduced to provide backward compatibility for extended partitions, but it ended up not being used because it didn't work as expected. Since there are no consumers of the ioctl and the implementation is broken, the best fix is to remove the code entirely. Spotted by: phk Approved by: re (kensmith)
* Fix a panic which (reportedly) can happen when unmounting a filesystemtrasz2009-07-012-1/+3
| | | | | | | | | with I/O requests in flight on kernels compiled with "options INVARIANTS". Also, make it obvious it's not right to call g_valid_obj() (and macros using it, e.g. G_VALID_CONSUMER()) without topology lock held. Approved by: re (kib) Reported by: pho
* Make gjournal work with kernel compiled with "options DIAGNOSTIC".trasz2009-06-303-8/+17
| | | | | | | Previously, it would panic immediately. Reviewed by: pjd Approved by: re (kib)
* - Apply the same naming rules of LVM names as done in the LVM code itself.lulf2009-06-241-16/+27
| | | | PR: kern/135874
* Do not stop the loop when an empty or deleted directory entry is found.jhay2009-06-241-1/+3
| | | | Rather just skip over it.
* Fix tabs, slightly improve comments.ivoras2009-06-181-9/+9
| | | | | Approved by: gnn (mentor) (original) Noticed by: stas
* Add support for labels derived from GPT metadata.ivoras2009-06-133-0/+168
| | | | | | | Approved by: gnn (mentor) Reviewed by: pjd PR: 128398 Submitted by: Marius Nuennerich < marius at nuenneri.ch >
* As discussed in the devsummit, introduce two fields in theluigi2009-06-112-0/+88
| | | | | | | struct bio to store classification information, and a hook for classifier functions that can be called by g_io_request(). This code is from Fabio Checconi as part of his GSOC work.
OpenPOWER on IntegriCloud