How to open and write to a block driver within a character driver?

Yang Xiang pointyx at live.com
Thu Oct 6 18:43:08 EDT 2011


Hi Greg,

Let me rephrase my question then.

If I am in kernel space and in another device driver and I need to write a log entry of some sort to another block device, do I just perform an "open" and "write" as if I am in user space?

I am very new at this so bear with me on this.

Thanks in advance.
yx


> Date: Tue, 4 Oct 2011 11:04:09 -0700
> From: greg at kroah.com
> To: pointyx at live.com
> Subject: Re: How to open and write to a block driver within a character driver?
> CC: kernelnewbies at kernelnewbies.org
> 
> On Tue, Oct 04, 2011 at 10:52:33AM -0700, Yang Xiang wrote:
> > The design is not up to me and I am just developing the code and I need to
> > develop the filter layer to convert the character buf to bio vects. But I am
> > wondering if there is a easy way to do this.
> 
> Then I suggest you push back on the design, just because someone told
> you to do something incorrect, are you supposed to do it?
> 
> thanks,
> 
> greg k-h
> 
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20111006/58b97a65/attachment.html 


More information about the Kernelnewbies mailing list