Displaying 3 results from an estimated 3 matches for "logical_offset_in_bio".
2010 May 12
0
[PATCH 2/4] direct-io: add a hook for the fs to provide its own submit_bio function V3
...100644
--- a/fs/direct-io.c
+++ b/fs/direct-io.c
@@ -82,6 +82,8 @@ struct dio {
int reap_counter; /* rate limit reaping */
get_block_t *get_block; /* block mapping function */
dio_iodone_t *end_io; /* IO completion function */
+ dio_submit_t *submit_io; /* IO submition function */
+ loff_t logical_offset_in_bio; /* current first logical block in bio */
sector_t final_block_in_bio; /* current final block in bio + 1 */
sector_t next_block_for_io; /* next block to be put under IO,
in dio_blocks units */
@@ -96,6 +98,7 @@ struct dio {
unsigned cur_page_offset; /* Offset into it, in bytes */
u...
2010 Sep 02
3
[patch] O_DIRECT: fix the splitting up of contiguous I/O
....c
> @@ -632,7 +632,7 @@ static int dio_send_cur_page(struct dio *dio)
> int ret = 0;
>
> if (dio->bio) {
> - loff_t cur_offset = dio->block_in_file << dio->blkbits;
> + loff_t cur_offset = dio->cur_page_fs_offset;
> loff_t bio_next_offset = dio->logical_offset_in_bio +
> dio->bio->bi_size;
>
> @@ -657,7 +657,7 @@ static int dio_send_cur_page(struct dio *dio)
> * Submit now if the underlying fs is about to perform a
> * metadata read
> */
> - if (dio->boundary)
> + else if (dio->boundary)
> dio_bio_s...
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