Re: sleeping in block device driver

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

 



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/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux