svn commit: r254408 - in projects/camlock/sys: cam/ata cam/scsi dev/md geom

Konstantin Belousov kostikbel at gmail.com
Fri Aug 16 13:05:13 UTC 2013


On Fri, Aug 16, 2013 at 12:25:03PM +0000, Alexander Motin wrote:
> Author: mav
> Date: Fri Aug 16 12:25:02 2013
> New Revision: 254408
> URL: http://svnweb.freebsd.org/changeset/base/254408
> 
> Log:
>   Make first steps toward direct BIO dispatch in GEOM:
>    - Define flags, declaring that specific consumer/provider is capable of
>   sending requests/replies (respectively) directly, i,e. doesn't hold any locks
>   and so reenterable, and/or able to directly receive replies/requests, i.e.
>   doesn't depend on GEOM up/down threads semantics.  As result, GEOM will make
>   direct calls only if both caller and callee are cpable of it in each case.
>    - Define disk(9) flag to declare that disk is capable of direct request
>   completion, and use it for da(4) and ada(4) drivers.  Make GEOM DISK to pass
>   that flag to its provider and also assume that any disk is capable of
>   receiveing requests directly.
>    - Mark GEOM DEV as capable of both direct send and receive.
>    - Make md(4) declare both direct send and receive after adding mutex to
>   serialize its statistics update on request path.

I do not think it is safe to allow the mdstart_malloc() to execute in
parallel with itself.  It certainly causes data corruption for the new
block allocations on write, and possibly random kernel memory corruption.

It seems that vnode and swap backends are safe, though.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-src-projects/attachments/20130816/fd5c79c8/attachment.sig>


More information about the svn-src-projects mailing list