goes into initialized state, not 'up'. This makes it easier to ensure
consistency in multi-plex volumes.
update_plex_state: redo transitions from empty and initialized
subdisks to up or reviving, depending on the number of plexes.
Reported-by: Bernd Walter <ticso@cicely.de>
Remy Nonnenmacher <remy@synx.com>
Introduce BUF_STRATEGY(struct buf *, int flag) macro, and use it throughout.
please see comment in sys/conf.h about the flag argument.
Remove strategy argument from all the diskslice/label/bad144
implementations, it should be found from the dev_t.
Remove bogus and unused strategy1 routines.
Remove open/close arguments from dssize(). Pick them up from dev_t.
Remove unused and unfinished setgeom support from diskslice/label/bad144 code.
Don't return "can't do it" when the user requests a state change to
the current state. This previously caused silly messages like "Can't
start <foo>: invalid argument", when in fact <foo> was already
started.
set_plex_state: don't set state for non-existent plexes.
update_plex_status: as long as we have initializing subdisks, we're
initializing.
Move the declaration of freerq() to request.h.
logrq: add support for lock events.
vinumstart: solve a problem where removing a plex from an active
volume could cause attempts to access non-existent plexes.
launch_requests: don't set a request group active until we're sure we
can launch it. This caused some hangs under unusual
circumstances.
bre: don't set XFR_BAD_SUBDISK if we're not going to use it.
build_read_request: correct recovery, which caused some hangs under
(other) unusual circumstances.
build_rq_buffer: don't set bp->b_dev if we don't have a dev.
sdio: clean up, remove obsolete code.
deallocrqg: unlock any locks the rqg may have.
bre5:
Shorten some lines.
Desired-by: bde
If we're reading from a short plex, return EOF indication.
Always lock the stripe before starting a transfer. Hopefully the
current version will solve some data integrity problems that have
been reported with degraded RAID-5 plexes.
Reported-by: Bernd Walter <ticso@cicely.de>
Remy Nonnenmacher <remy@synx.com>
solve some data integrity problems that have been reported with
degraded RAID-5 plexes.
Reported-by: Bernd Walter <ticso@cicely.de>
Remy Nonnenmacher <remy@synx.com>
Tidy other comments.
open_drive: don't call set_drive_state if we decide to take it down.
This could help avoid some race conditions with the daemon.
init_drive: don't set the drive down, we'll let close_locked_drive do
that.
close_locked_drive: set drive state to down without calling
set_drive_state. This could help avoid some race conditions with the
daemon.
driveio: remove the function, it wasn't being used.
get_volume_label: remove volume dependencies so that we can return a
label for plexes and subdisks as well. What a kludge.
Remove declarations for freerq and free_rqg.
Remove DEBUG_RESID code.
freerq: check whether the request is holding a lock, free if so.
free_rqg: remove. It wasn't being used any more.
Change the Debugger calls to panics.
checkdiskconfig(): remove. It didn't make any sense to complain about
kernel keywords in user config files; it just made it more difficult
to convert. Now we ignore kernel keywords if we're not in kernel
mode.
get_empty_sd: initialize sectors.
free_drive: don't close if we don't have a vp. Maybe this will help
fix the problem that peter had, but I wouldn't count on it.
config_plex: If the plex is RAID-5, give it a rangelock structure.
start_config: Reset current drive, plex and volume so that a new
'create' command doesn't get long-dead defaults.
struct rqelement, enum rqinfo_type, struct rqinfo, union rqinfou: add
lock requests.
Add declarations for freerq and unlockrange. Since they include
request structures, they can't go in vinumext.h
a module. Also modified the code to work on FreeBSD/alpha and added
device vr0 to the alpha GENERIC config.
While I was in the neighborhood, I noticed that I was still using
#define NFPX 1 in all of the Makefiles that I'd copied from the fxp
module. I don't really use #define Nfoo X so it didn't matter, but
I decided to customize this correctly anyway.
- %q -> %ll.
Fixed nearby errors not reported by gcc -Wformat on i386's:
- don't assume that the promotion of [u_]int64_t is [u_]quad_t.
- don't use signed formats for unsigned args.
Add Cybernet copyright.
OK'd-by: Chuck Jacobus <chuck@cybernet.com>
update_plex_state:
If any subdisk in the plex is initializing, set the plex to
initializing state. This gets rid of the ugly corrupt/degraded/up
transitions which previously occurred.
Desired-by: Steve Taylor <staylor@cybernet.com>
sddownstate:
Add new function, used by checksdstate.
checksdstate:
Let sddownstate decide what status to return.
Add Cybernet copyright.
OK'd-by: Chuck Jacobus <chuck@cybernet.com>
logrq: save device major and minor numbers to compensate for lost
dev_t.
launch_requests: Don't issue requests which are marked
XFR_BAD_SUBDISK. This may make things easier in bre().
bre:
Rearrange.
- Change some comments
- Recognize holes in plex structure. Formerly this could lead to
incorrect write to the plex. Return REQUEST_DEGRADED on a read
request, but carry on to the bitter end on a write request, and
mark the requests for the inaccessible subdisks with
XFR_BAD_SUBDISK.
- return REQUEST_EOF if the requested transfer goes beyond the end
of the plex. This is not an error, since other plexes may go
further into the volume address space.
build_read_request:
Handle REQUEST_DEGRADED returned from bre().
sdio:
Lock buffer before issuing the requests.