search for: bio_rw

Displaying 4 results from an estimated 4 matches for "bio_rw".

Did you mean: io_rw
2010 Jan 04
0
[RFC 03/12 RESEND PATCH] Btrfs: Reorder __btrfs_map_block to make code more efficient.
...e, int rw, u64 offset; u64 stripe_offset; u64 stripe_nr; - int stripes_allocated = 8; - int stripes_required = 1; int stripe_index; int i; int num_stripes; - int max_errors = 0; + int max_errors; struct btrfs_multi_bio *multi = NULL; - if (multi_ret && !(rw & (1 << BIO_RW))) - stripes_allocated = 1; -again: - if (multi_ret) { - multi = kzalloc(btrfs_multi_bio_size(stripes_allocated), - GFP_NOFS); - if (!multi) - return -ENOMEM; - - atomic_set(&multi->error, 0); - } - read_lock(&em_tree->lock); em = lookup_extent_mapping(em_tree, logical, *...
2009 Aug 05
3
RAID[56] with arbitrary numbers of "parity" stripes.
...mp; BTRFS_BLOCK_GROUP_RAID56) + ret = nr_parity_stripes(map); else ret = 1; free_extent_map(em); @@ -2734,8 +2716,8 @@ again: max_errors = 1; } } - if (map->type & (BTRFS_BLOCK_GROUP_RAID5 | BTRFS_BLOCK_GROUP_RAID6) - && multi_ret && (rw & (1 << BIO_RW) || mirror_num > 1) && raid_map_ret) { + if (map->type & BTRFS_BLOCK_GROUP_RAID56 && multi_ret && + (rw & (1 << BIO_RW) || mirror_num > 1) && raid_map_ret) { /* RAID[56] write or recovery. Return all stripes */ stripes_require...
2010 May 07
6
[PATCH 1/5] fs: allow short direct-io reads to be completed via buffered IO V2
V1->V2: Check to see if our current ppos is >= i_size after a short DIO read, just in case it was actually a short read and we need to just return. This is similar to what already happens in the write case. If we have a short read while doing O_DIRECT, instead of just returning, fallthrough and try to read the rest via buffered IO. BTRFS needs this because if we encounter a compressed or
2007 Jan 02
0
[PATCH 1/4] add scsi-target and IO_CMD_EPOLL_WAIT patches
...= bio_uncopy_user(bio); +- } ++ mapped_bio = bio; + ++ __blk_rq_unmap_user(mapped_bio); ++ rq->bio = bio->bi_next; ++ bio_put(bio); ++ } + return 0; + } + +@@ -2419,11 +2507,8 @@ int blk_rq_map_kern(request_queue_t *q, + if (rq_data_dir(rq) == WRITE) + bio->bi_rw |= (1 << BIO_RW); + +- rq->bio = rq->biotail = bio; + blk_rq_bio_prep(q, rq, bio); +- + rq->buffer = rq->data = NULL; +- rq->data_len = len; + return 0; + } + +@@ -3429,6 +3514,7 @@ void blk_rq_bio_prep(request_queue_t *q, + rq->hard_cur_sectors = rq->current_nr_sectors; + rq->hard_n...