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(...);
> ...
> }
> }
>
>
> Here, the transfer is not done in process context, and
> sbull_transfer() cannot sleep. How could I implement a sleeping
> transfer?
>
The request function of block devices are called in process context
and they can sleep (but end_io is called in interrupt context).
I hope this helps.
--
Fawad Lateef