[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sleeping in block device driver
On Thursday 07 September 2006 16:06, Fawad Lateef wrote:
> On 9/7/06, Bahadir Balban <bahadir.balban@xxxxxxxxx> wrote:
> > On 9/7/06, Fawad Lateef <fawadlateef@xxxxxxxxx> wrote:
> > > On 9/6/06, Bahadir Balban <bahadir.balban@xxxxxxxxx> wrote:
> > > > In linux device drivers 3, block drivers chapter, for block device io
> > > > tranfers, a function is defined:
> > > >
> > > > int sbull_transfer_bio(struct sbull_dev *dev, struct bio *bio)
> > > > {
> > > > ...
> > > > bio_for_each_segment(bvec, bio, i) {
> > > > ...
> > > > __bio_kmap_atomic(...);
> > > > sbull_transfer(...);
> > > > __bio_kunmap_atomic(...);
> > > > ...
> > > > }
> > > > }
> > > >
Just a note: while you can sleep in a request function, you can not sleep
during __bio_kmap_atomic() ... __bio_kunmap_atomic().
tavi
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/