| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
handling.
- Extend g_handleattr() to treat attribute as string when len=0.
OK'ed by: phk
|
|
|
|
|
|
|
| |
no additional argument is given or details about the given GEOM object
(class, geom, provider or consumer).
Approved by: phk
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the underlying drive had been hot-unplugged from the system. Here
is a specific example. Filesystem code had opened /dev/da1s1e.
Subsequently, the drive was hot-unplugged. This (correctly) caused
all of the associated /dev/da1* entries to be deleted. When the
filesystem later realized that the drive was gone it closed the
device, reducing the write-access counts to 0 on the geom providers
for da1s1e, da1s1, and da1. This caused geom to re-taste the
providers, resulting in the devices being created again. When the
drive was hot-plugged back in, it resulted in duplicate /dev entries
for da1s1e, da1s1, and da1.
This fix adds a new disk_gone() function which is called by CAM when a
drive goes away. It orphans all of the providers associated with the
drive, setting an error condition of ENXIO in each one. In addition,
we prevent a re-taste on last close for writing if an error condition
has been set in the provider.
Sponsored by: Isilon Systems
Reviewed by: phk
MFC after: 1 week
|
|
|
|
|
|
| |
experience.
Found by: Coverity (id #540 #541)
|
| |
|
| |
|
|
|
|
|
|
|
| |
This removes a panic that will occur if you build with GENERIC and
attempt to kldload a GEOM module that is already in the kernel.
Reviewed by: phk
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
by the time that kldload(8) returns. Satisfy that by making the GEOM
module load event -- only when the kernel is !cold -- wait until the
GEOM module init function has finished instead of returning immediately.
This is the other half of fixing md(8) (actually, "mfs" in fstab(5))
that is similar to r1.128 of src/sys/dev/md/md.c. This bug would be
why RAM disks would often fail on boot and the first call to mdconfig(8)
would probably fail.
pjd has ideas for not requiring kldload(8) to work synchronously for
control devices that could make this obsolete.
Silence on: -arch
|
|
|
|
|
|
|
|
| |
sectorsize in order to avoid a lot of checks around various divisions etc.
Enforce the sectorsize being > 0 with a KASSERT on successful open.
Fix scsi_cd.c to return 2k sectors when no media inserted.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
understood. This makes room for additional binary compatibility in the
future.
Put fields in the class for the geom's methods and initialize the methods
of a new geom from these fields. This saves some code in all classes.
|
|
|
|
| |
Pointed out by: pjd
|
|
|
|
|
|
|
|
|
| |
When we orphan/wither a provider, an attached geom+consumer could
end up being withered as a result and it may be in front of us in
the normal object scanning order so we need to do multi-pass. On
the other hand, there may be withering stuff we can't get rid off
(yet), so we need to keep track of both the existence of withering
stuff and if there is more we can do at this time.
|
| |
|
|
|
|
|
|
|
| |
because if consumer is not attached, its provider never will be valid,
so we never reach this check.
Approved by: phk
|
|
|
|
|
|
|
|
| |
but it will do (better) for now.
KASSERT that to have providers a class must have an access method.
Tag the new_provider event with the geom as well.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Retire g_sanity() and corresponding debugflag (0x8)
Retire g_{stall,release}_events().
Under #ifdef DIAGNOSTIC:
Make g_valid_obj() an official function and have it return an an
non-zero integer which indicates the kind of object when found.
Implement G_VALID_{CLASS,GEOM,CONSUMER,PROVIDER}() macros based
on g_valid_obj().
Sprinkle calls to these macros liberally over the infrastructure.
Always check that we do not free a live object.
|
| |
|
|
|
|
| |
call.
|
|
|
|
|
|
|
|
|
|
|
|
| |
shown that it is not useful.
Rename the relative count g_access_rel() function to g_access(), only
the name has changed.
Change all g_access_rel() calls in our CVS tree to call g_access() instead.
Add an #ifndef BURN_BRIDGES #define of g_access_rel() for source
code compatibility.
|
|
|
|
|
|
| |
get rid of them.
Prodded by: pjd
|
|
|
|
|
|
| |
- Typos.
Approved by: phk, scottl (mentor)
|
|
|
|
| |
Submitted by: Pawel Jakub Dawidek <nick@garage.freebsd.pl>
|
|
|
|
| |
Submitted by: Pawel Jakub Dawidek <nick@garage.freebsd.pl>
|
|
|
|
| |
Submitted by: Pawel Jakub Dawidek <nick@garage.freebsd.pl>
|
|
|
|
| |
Submitted by: Pawel Jakub Dawidek <nick@garage.freebsd.pl>
|
|
|
|
|
|
|
|
|
|
|
| |
rather than right before and right after. This allows these routines
to manipulate the mesh.
KASSERT that nobody creates a geom on an alien class.
Assert topology in g_valid_obj().
Approved by: re@
|
|
|
|
|
| |
while being tasted. I can moderately easy trigger this with atapi-cd, but
I do not fully understand the circumstances.
|
| |
|
| |
|
|
|
|
| |
Approved by: phk
|
| |
|
|
|
|
| |
Noticed by: tmm
|
| |
|
|
|
|
|
|
| |
twice.
Enforce that classes should have different names while we are here.
|
| |
|
|
|
|
|
|
|
|
|
| |
Use ->init() and ->fini() to handle the mutex in geom_disk.c
Remove the g_add_class() function and replace it with a standardized
g_modevent() function.
This adds the basic infrastructure for loading/unloading GEOM classes
|
| |
|
|
|
|
| |
Remember to free the buffer we got from g_read_data().
|
|
|
|
| |
Introduce g_wither_geom() to do the work in one single place.
|
| |
|
| |
|
|
|
|
| |
argument to determine if we can M_WAITOK in malloc.
|
| |
|
| |
|
| |
|
|
|
|
| |
Remove KASSERTS which checked that they were unused.
|
|
|
|
|
|
|
| |
test is built to test GEOM as running in the kernel.
This commit is basically "unifdef -D_KERNEL" to remove the mainly #include
related code to support the userland-harness.
|