Re: lvm in 2.5.1

Jens Axboe
2001-12-27T15:20:50Z

On Thu, Dec 27 2001, andersg@0x63.nu wrote:
> - int rw = bio_data_dir(bh);
> + int rw = bio_data_dir(bi);
>
>
> down_read(&lv->lv_lock);
> @@ -1151,7 +1154,7 @@
>
> P_MAP("%s - lvm_map minor: %d *rdev: %s *rsector: %lu size:%lu\n",
> lvm_name, minor,
> - kdevname(bh->bi_dev),
> + kdevname(bi->bi_dev),
> rsector_org, size);
>
> if (rsector_org + size > lv->lv_size) {
> @@ -1205,7 +1208,7 @@
> * we need to queue this request, because this is in the fast path.
> */
> if (rw == WRITE || rw == WRITEA) {
> - if(_defer_extent(bh, rw, rdev_map,
> + if(_defer_extent(bi, rw, rdev_map,
> rsector_map, vg_this->pe_size)) {

You are tossing out read-ahead info here, you want to use bio_rw and not
bio_data_dir. The former will pass back xA bits too, while bio_data_dir
is strictly the data direction (strangely :-)

--
Jens Axboe