Re: geom->access problem and workaround

2018-03-27 Thread Warner Losh
On Mar 27, 2018 7:09 AM, "Andriy Gapon" wrote: On 23/03/2018 15:31, Warner Losh wrote: > > > On Fri, Mar 23, 2018 at 4:38 AM, Andriy Gapon > wrote: > > On 12/03/2018 20:07, Poul-Henning Kamp wrote: > > If we want to have an architectural sound way to do slow oper

Re: geom->access problem and workaround

2018-03-27 Thread Andriy Gapon
On 23/03/2018 15:31, Warner Losh wrote: > > > On Fri, Mar 23, 2018 at 4:38 AM, Andriy Gapon > wrote: > > On 12/03/2018 20:07, Poul-Henning Kamp wrote: > > If we want to have an architectural sound way to do slow operations > > before any "user-I/O" is initia

Re: geom->access problem and workaround

2018-03-23 Thread Warner Losh
On Fri, Mar 23, 2018 at 4:38 AM, Andriy Gapon wrote: > On 12/03/2018 20:07, Poul-Henning Kamp wrote: > > If we want to have an architectural sound way to do slow operations > > before any "user-I/O" is initiated, the right way to do so is to > > define new BIO_OPEN and BIO_CLOSE operation, and i

Re: geom->access problem and workaround

2018-03-23 Thread Warner Losh
On Fri, Mar 23, 2018 at 3:30 AM, Poul-Henning Kamp wrote: > > In message <5e416eb6-0e79-1419-f09a-eb747215d...@freebsd.org>, Andriy > Gapon writes: > >On 12/03/2018 20:07, Poul-Henning Kamp wrote: > >> If we want to have an architectural sound way to do slow operations > >> before any "u

Re: geom->access problem and workaround

2018-03-23 Thread Poul-Henning Kamp
In message <5e416eb6-0e79-1419-f09a-eb747215d...@freebsd.org>, Andriy Gapon writes: >On 12/03/2018 20:07, Poul-Henning Kamp wrote: >> If we want to have an architectural sound way to do slow operations >> before any "user-I/O" is initiated, the right way to do so is to >> define new BIO_O

Re: geom->access problem and workaround

2018-03-23 Thread Andriy Gapon
On 12/03/2018 20:07, Poul-Henning Kamp wrote: > If we want to have an architectural sound way to do slow operations > before any "user-I/O" is initiated, the right way to do so is to > define new BIO_OPEN and BIO_CLOSE operation, and insist via asserts > than all BIO_{READ|WRITE|DELETE} are wrappe

Re: geom->access problem and workaround

2018-03-12 Thread Poul-Henning Kamp
In message , Warner Losh writ es: >The storage layer generally doesn't expect higher-level locks around calls >to it, and feels that it's free to sleep in the open routine for resources >to become available. This is true across most 'open' routines (eg, tty will >wait for the right sign

Re: geom->access problem and workaround

2018-03-12 Thread Warner Losh
On Mon, Mar 12, 2018 at 7:17 AM, Andriy Gapon wrote: > > According to Poul-Henning (phk@), the principal author of GEOM, a GEOM > class's > access method was intended to be a light-weight operation involving mostly > access counts. That is, it should be (have been) close in spirit to what > g_ac

geom->access problem and workaround

2018-03-12 Thread Andriy Gapon
According to Poul-Henning (phk@), the principal author of GEOM, a GEOM class's access method was intended to be a light-weight operation involving mostly access counts. That is, it should be (have been) close in spirit to what g_access() function does. The method is only called from g_access and