[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: block io buffers (bio)
On 5/3/07, Bahadir Balban <bahadir.balban@xxxxxxxxx> wrote:
Hi,
In bio_endio() I want to access the buffer whose transfer has been
completed. How do I do safely do this?
Hi,
In fs/bio.c bio_endio() I have done:
/* Get buffer address */
void *buf = __bio_kmap_atomic(bio, bio->bi_idx, KM_USER0);
/* My action on the buffer */
flush_icache_range((unsigned long)buf, (unsigned long)(buf + bytes_done));
/* Give back buffer address */
__bio_kunmap_atomic(bio, KM_USER0);
in order to get access to the buffer. It seemed like
__bio_kmap_atomic() did what I want, but I am getting a kernel panic
with faulty virtual address 0xd0000000.
What am I missing? Would bio->bi_idx point me at the currently
completed buffer for example? Is it ok to do kmap_atomic in
bio_endio()?
Thanks,
Bahadir
--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ