Re: [PATCH 03/14] block: implement blk_rq_map_kern_prealloc()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 26 Mar 2009 10:05:57 +0200
Boaz Harrosh <bharrosh@xxxxxxxxxxx> wrote:

> On 03/26/2009 09:42 AM, Tejun Heo wrote:
> > Hello,
> > 
> > A few issues.
> > 
> > Tejun Heo wrote:
> >>> Perhaps you could reorder the code below a bit?
> >>>
> >>> My proposal is:
> >>> * blk_rq_map_kern_prealloc => is simplified to be
> >>>     int blk_rq_map_bio(struct request_queue *q, struct request *rq,
> >>> 		       struct bio *bio);
> > 
> > The thing is that the prealloc variant should be allowed to be called
> > from IRQ context and blk_queue_bounce() shouldn't be called.
> > Hmmm... well, the caller is supposed to know what it's doing and maybe
> > we can just add a comment that it shouldn't be called with buffers
> > which might get bounced from IRQ context.
> > 
> 
> Hmm that is a problem. I would suggest a flag or a check. My bios come
> from VFS they need bouncing.
> 
> Can you think of a solution?
> 
> We could just call blk_queue_bounce(). IRQ callers need to make sure their
> buffers don't need bouncing anyway, so there is no such bug right? If a programmer
> gets it wrong he will get a BUG check that tells him that.

If I understand the old IDE code, it's broken about the kernel buffer
bouncing.

Fixing this in the old ide needs a big surgery, I think. When I
converted the old ide code to use the block layer API to allocate a
request, I gave up the requests on the stack (used in IRQ).


--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux