Re: lvm in 2.5.1

Jens Axboe (axboe@suse.de)
Thu, 27 Dec 2001 16:20:19 +0100


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

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/