lkml.org 
[lkml]   [1997]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Loop Encryption
Date
> >    What's the difference between BH_Locked and BH_Protected?
>
> BH_Locked prevents anybody from accessing the buffer (if they call
> wait_on_buffer, that is). BH_Protected just prevents reuse of the
> buffer, and IMHO is a broken feature --- if you want to pin a buffer
> against reuse, the correct way should really be to increment b_count
> around the critical code.
>
> > Using BH_Protected seems to work for the loop driver - buffers for the
> > requests it creates cannot be freed until the loop driver is finished
> > with them [or so I'm led to believe by the ramdisk driver].
>
> If that's all you want, then use b_count instead. It has the
> advantage that two concurrent processes trying to pin the buffer in
> memory won't conflict with each other.

Thanks for the suggestion, but using b_count doesn't work in this case.
There must be something else that BH_Protected does <shrug>

--
Andrew E. Mileski mailto:aem@netcom.ca
Linux Plug-and-Play Hardware Support http://www.redhat.com/linux-info/pnp/
XFree86 Matrox Team http://www.bf.rmit.edu.au/~ajv/xf86-matrox.html
Ottawa-Carleton Linux User's Group (OCLUG) http://www.storm.ca/~linux/

\
 
 \ /
  Last update: 2005-03-22 13:39    [W:0.069 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site