summaryrefslogtreecommitdiffstats
path: root/lib/libkse
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2004-12-19 23:12:00 +0000
committerpjd <pjd@FreeBSD.org>2004-12-19 23:12:00 +0000
commit8c72a601a3bfebd36875647941a8cc673aa6e62d (patch)
tree4b33d8e0ebbb1cb22d588c56f78149b01a56f731 /lib/libkse
parentfccc23ca68e7836b885fced15aa1e228112d9e20 (diff)
downloadFreeBSD-src-8c72a601a3bfebd36875647941a8cc673aa6e62d.zip
FreeBSD-src-8c72a601a3bfebd36875647941a8cc673aa6e62d.tar.gz
Some major cleanups.
Keeping consumers open when device is closed is very hard. We need to open consumers sometimes to update metadata, etc. Many hacks was introduced in the past to made it possible. You cannot be sure that you can open consumer for writing always, even if you think it should be allowed. If one of the mirror components is for example da0 and you try to open it, you can get EPERM when da0s1 is opened for reading (because BSD class opens consumers (da0) with an extra 'e' bit set). Waiting for the events queue to be empty may do the trick, but it makes code much uglier (as you cannot always call g_waitidle()), it doesn't solve all edge cases and it can introduce deadlocks if there are events in the queue that wait for gmirror. I removed those hacks. Now all consumers are open r1w1e1 always, even if device is closed. Maybe it is less clean from GEOM perspective, but simpify code a lot and make it much more reliable. The only issue was retaste event which is sent when we close consumers opened for writing. I ignore retaste event by not detaching consumer immediately (so retaste event is not send to my class) and sending event right after it to detach and destroy consumer.
Diffstat (limited to 'lib/libkse')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud