summaryrefslogtreecommitdiffstats
path: root/sys/geom
Commit message (Collapse)AuthorAgeFilesLines
* NO_GEOM cleanup:phk2003-03-021-14/+1
| | | | Remove cdevsw->d_psize() implementation, we don't need it any more.
* NO_GEOM cleanup:phk2003-02-281-54/+10
| | | | | Retire the "dev_t" centric version of the disk mini-layer. Remove now unneeded linkage field in dev_t and struct disk.
* Cleanup of the d_mmap_t interface.mux2003-02-251-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | - Get rid of the useless atop() / pmap_phys_address() detour. The device mmap handlers must now give back the physical address without atop()'ing it. - Don't borrow the physical address of the mapping in the returned int. Now we properly pass a vm_offset_t * and expect it to be filled by the mmap handler when the mapping was successful. The mmap handler must now return 0 when successful, any other value is considered as an error. Previously, returning -1 was the only way to fail. This change thus accidentally fixes some devices which were bogusly returning errno constants which would have been considered as addresses by the device pager. - Garbage collect the poorly named pmap_phys_address() now that it's no longer used. - Convert all the d_mmap_t consumers to the new API. I'm still not sure wheter we need a __FreeBSD_version bump for this, since and we didn't guarantee API/ABI stability until 5.1-RELEASE. Discussed with: alc, phk, jake Reviewed by: peter Compile-tested on: LINT (i386), GENERIC (alpha and sparc64) Runtime-tested on: i386
* Drop down Apple Partition Map code that has been in use by somegrehan2003-02-231-84/+168
| | | | | | ppc developers for a while. OK'd by: phk
* NO_GEOM cleanup: Convert CCD(4) to be use "struct disk*" instead of "dev_t"phk2003-02-211-5/+5
| | | | as "this" handle.
* NO_GEOM cleanup:phk2003-02-211-2/+2
| | | | | | | | | | | | | Retire the "d_dump_t" and use the "dumper_t" type instead. Dumper_t takes a void * as first arg which is more general than the dev_t taken by d_dump_t. (Remember: we could have net-dumpers if somebody wrote us one!) Define the convention for GEOM controlled disk devices to be that the first argument to the dumper function is the struct disk pointer. Change device drivers accordingly.
* NO_GEOM cleanup:phk2003-02-212-5/+3
| | | | | | | | Change the argument to disk_destroy() to be the same struct disk * as disk_create() takes. This enables drivers to ignore the (now) bogus dev_t which disk_create() returns.
* Add M_WAITOKphk2003-02-191-2/+2
|
* Back out M_* changes, per decision of the TRB.imp2003-02-1912-32/+33
| | | | Approved by: trb
* Correctly set bio_data in cloned children when cutting up large requests.tegge2003-02-121-1/+1
|
* Implement a handle for efficient implementation of perforations inphk2003-02-122-7/+13
| | | | | | | | | | | | | lower extremities. Setting bit 4 in debugflags (sysctl kern.geom.debugflags=16) will allow any open to succeed on rank#1 providers. This will generally correspond to the physical disk devices: ad0, da0, md0 etc. This fundamentally violates the mechanics of GEOMs autoconfiguration, and is only provided as a debugging facility, so obviously error reports on GEOM where this bit is or has been set will not be accepted.
* Implement a bio-taskqueue to reduce number of context switches inphk2003-02-112-21/+56
| | | | | | | | | | | | | | | | | | | | disk I/O processing. The intent is that the disk driver in its hardware interrupt routine will simply schedule the bio on the task queue with a routine to finish off whatever needs done. The g_up thread will then schedule this routine, the likely outcome of which is a biodone() which queues the bio on g_up's regular queue where it will be picked up and processed. Compared to the using the regular taskqueue, this saves one contextswitch. Change our scheduling of the g_up and g_down queues to be water-tight, at the cost of breaking the userland regression test-shims. Input and ideas from: scottl
* Announce our ability to do MAXPHYS transfers.phk2003-02-111-0/+1
|
* Advertise MAXPHYS upwards, we will split as necessary before we get to thephk2003-02-111-1/+1
| | | | bottom of things.
* Check disk->d_maxsize/dev->si_iosize_max at open time rather than in strategy.phk2003-02-111-10/+7
| | | | Printf a warning and use DFLTPHYS if the drive has not set a size.
* Make a mutex to stop the race coming into geom_disk's done routine.phk2003-02-111-25/+61
| | | | | | | | Cut up requests into smaller bits if they are longer than the drivers disk->d_maxsize or dev->si_iosize_max. Properly handle the race condition when using g_clone_bio() is used without having the single-threadedness of g_down/g_up secure locking.
* Don't divide by zero if there is no stripewidth specified.phk2003-02-111-2/+4
|
* Typo in last commit.phk2003-02-111-2/+2
|
* Better names for struct disk elements: d_maxsize, d_stripeoffsetphk2003-02-116-3/+43
| | | | | | | | | | | and d_stripesisze; Introduce si_stripesize and si_stripeoffset in struct cdev so we can make the visible to clustering code. Add stripesize and stripeoffset to providers. DTRT with stripesize and stripeoffset in various places in GEOM.
* Propagate DISKFLAG_CANDELETE from struct disk to G_PF_CANDELETE on thephk2003-02-111-8/+11
| | | | provider.
* Wrap a long line.phk2003-02-111-1/+2
|
* Don't short-circuit zero-length requests of they are BIO_[SG]ETATTR.phk2003-02-111-10/+18
|
* Use the SI_CANDELETE flag on the dev_t rather than the D_CANFREE flagphk2003-02-111-1/+3
| | | | on the cdevsw to determine ability to handle the BIO_DELETE request.
* Unconditionally make our provider with G_PF_CANDELETE.phk2003-02-111-0/+1
|
* Propagate G_PF_CANDELETE to our own providers from the provider we attach to.phk2003-02-111-0/+2
|
* Introduce flag field and G_PF_CANDELETE field on providers.phk2003-02-111-0/+2
|
* Remove another printf which does not say anything we didn't already know.phk2003-02-111-1/+0
|
* Turn the "updating" flag (back) into two sequence number fields atphk2003-02-112-8/+9
| | | | | either ends of the structure so we have a way to determine if a snapshot is consistent.
* Remove a debugging printf.phk2003-02-111-1/+0
|
* Update the statistics collection code to track busy time instead ofphk2003-02-094-47/+125
| | | | | | | | | | idle time. Statistics now default to "on" and can be turned off with sysctl kern.geom.collectstats=0 Performance impact of statistics collection is on the order of 800 nsec per consumer/provider set on a 700MHz Athlon.
* Put the name of the /dev entry in the .h file, userland will need it.phk2003-02-082-1/+3
|
* Move the g_stat struct to its own .h file, we will export it to other code.phk2003-02-0810-52/+243
| | | | | | | | | | | | | | | | | | Insted of embedding a struct g_stat in consumers and providers, merely include a pointer. Remove a couple of <sys/time.h> includes now unneeded. Add a special allocator for struct g_stat. This allocator will allocate entire pages and hand out g_stat functions from there. The "id" field indicates free/used status. Add "/dev/geom.stats" device driver whic exports the pages from the allocator to userland with mmap(2) in read-only mode. This mmap(2) interface should be considered a non-public interface and the functions in libgeom (not yet committed) should be used to access the statistics data.
* Move #defines of major/minor to internal header file so other bits canphk2003-02-082-5/+10
| | | | share and coordinate with geom_dev.
* Commit the correct copy of the g_stat structure.phk2003-02-078-36/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add debug.sizeof.g_stat sysctl. Set the id field of the g_stat when we create consumers and providers. Remove biocount from consumer, we will use the counters in the g_stat structure instead. Replace one field which will need to be atomically manipulated with two fields which will not (stat.nop and stat.nend). Change add companion field to bio_children: bio_inbed for the exact same reason. Don't output the biocount in the confdot output. Fix KASSERT in g_io_request(). Add sysctl kern.geom.collectstats defaulting to off. Collect the following raw statistics conditioned on this sysctl: for each consumer and provider { total number of operations started. total number of operations completed. time last operation completed. sum of idle-time. for each of BIO_READ, BIO_WRITE and BIO_DELETE { number of operations completed. number of bytes completed. number of ENOMEM errors. number of other errors. sum of transaction time. } } API for getting hold of these statistics data not included yet.
* Fix some sleep strings to make more sense.phk2003-02-071-3/+3
|
* Add the new statistics structure, put one in consumers and providers.phk2003-02-073-0/+28
| | | | include <sys/time.h> as necessary.
* Rename bio_linkage to the more obvious bio_parent.phk2003-02-073-3/+3
| | | | Add bio_t0 timestamp, and include <sys/time.h> where needed
* Add some comments about the deficiencies of this module. I had hoped to getgordon2003-02-071-0/+7
| | | | | around to addressing them some more, but Real Life (tm) has gotten in the way.
* Check return value of g_clone_bio().phk2003-02-061-0/+4
|
* Experimentally don't let go of Giant in geom_disk's done.phk2003-02-061-0/+5
| | | | | | | We may actually be increasing Giant contention doing so because the actual stuff we do is very cheap. Also I am not convinced there is not a tiny window for a race here.
* Put the checks we perform on a bio before calling ::start in theirphk2003-02-061-69/+59
| | | | | own function, handle all validation and truncation at the time we process the bio instead of when it gets scheduled.
* Implement the new "struct disk" centered API for device drivers.phk2003-02-051-12/+23
| | | | | This commit should not change anything as no device drivers use the new API yet.
* Pave the road to removing the fixed size limit on device nodes:phk2003-02-041-0/+2
| | | | | | | | | | Change the si_name of dev_t's to be a char * and put a private buffer for holding the name at then end of the struct. Initialize si_name to point to the private buffer. Put a KASSERT in geom_disk to prevent overrun on the fake dev_t we still have to generate for the disk_drivers.
* Correct a comment. GEOM modules do not create /dev entries. They creategordon2003-02-031-2/+2
| | | | | | providers. Pointed out by: phk
* Add the GEOM module that makes volume labels useful. A kernel compiled withgordon2003-02-031-0/+146
| | | | | | | this will cause volume labels to be exposed in /dev/vol/<volname>. Currently, there is no conflict resolution if more than one FS has the same volume name. Reviewed by: phk
* Add a bio_disk pointer for use between geom_disk and the device drivers.phk2003-02-021-2/+2
|
* Eliminate the sc_openmask, ccdopen() and ccdclose() functions, wephk2003-02-011-46/+6
| | | | | | | can use the flag maintained by geom_disk.c Having only a strategy method to intialize, don't waste space using a cdevsw structure to do so.
* Move configuration of geom/providers into its own function in preparationphk2003-02-011-36/+65
| | | | for adding on-the-fly config interface.
* Remove commented out g_enc_dos_partition(). We won't be needing it.phk2003-01-311-18/+0
|
* Add a rudimentary class for slicing Apple partitioned disks.phk2003-01-311-0/+198
| | | | | | More work is needed on this, stakeholders please contact me. Not quite asked for by: rwatson
OpenPOWER on IntegriCloud