| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
proceed while g_unload_class() blocks the event thread. Fix this by not
running g_unload_class() as a GEOM event and dropping the topology lock
when withering needs to proceed.
PR: kern/139847
Silence on: freebsd-geom
|
|
|
|
|
|
|
| |
assert that the topology lock is held when g_valid_obj() is called from
debugger.
MFC after: 1 week
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
|
|
|
| |
- Use db_printf instead of printf. While here, apply this to other ddb commands
as well.
Pointed out by: pjd
|
|
|
|
| |
MFC after: 3 weeks
|
|
|
|
|
|
|
| |
The geom and CAM changes for root_hold are the wrong solution for USB design
quirks.
Requested by: scottl
|
|
|
|
|
|
|
| |
provider tasting. This is needed for disk attachments that happen after threads
are running in the boot process.
Tested by: rnoland
|
|
|
|
|
| |
where len is 0. Otherwise g_getattr() will never succeed
when it is handled by g_handleattr_str().
|
|
|
|
| |
This allows passing string constants to g_handleattr_str().
|
| |
|
|
|
|
|
|
|
| |
completely dynamic sbuf.
Obtained from: Varnish
MFC after: 2 weeks
|
|
|
|
|
| |
G_PF_WITHER flag set.
- Fix typo in assertion condition (sorry, but I forgot who report that).
|
|
|
|
| |
Educated by: jhb's BSDCan presentation
|
|
|
|
|
|
|
|
|
|
|
| |
allows the class to create a different GEOM for the same provider
as well as avoid that we end up with multiple GEOMs of the same
class with the same name.
For example, when a disk contains a PC98 partition table but
only MBR is supported, then the partition table can be treated
as a MBR. If support for PC98 is later loaded as a module, the
MBR scheme is pre-empted for the PC98 scheme as expected.
|
|
|
|
|
|
|
|
|
|
| |
to it for tasting. This is useful when the class, through means outside
the scope of GEOM, can claim providers previously unclaimed.
The g_retaste() function posts an event which is handled by the
g_retaste_event().
Event suggested by: phk
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|