search for: cur_page_fs_offset

Displaying 3 results from an estimated 3 matches for "cur_page_fs_offset".

2010 May 12
0
[PATCH 2/4] direct-io: add a hook for the fs to provide its own submit_bio function V3
...r_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 */ unsigned cur_page_len; /* Nr of bytes at cur_page_offset */ sector_t cur_page_block; /* Where it starts */ + loff_t cur_page_fs_offset; /* Offset in file */ /* BIO completion state */ spinlock_t bio_lock; /* protects BIO fields below */ @@ -300,6 +303,17 @@ static void dio_bio_end_io(struct bio *bio, int error) spin_unlock_irqrestore(&dio->bio_lock, flags); } +void dio_end_io(struct bio *bio, int error) +{ + str...
2010 Sep 02
3
[patch] O_DIRECT: fix the splitting up of contiguous I/O
...ted a > page at a time to the block layer. The problem is that the code > expected dio->block_in_file to correspond to the current page in the > dio. In fact, it corresponds to the previous page submitted via > submit_page_section. This was purely an oversight, as the > dio->cur_page_fs_offset field was introduced for just this purpose. > This patch simply uses the correct variable when calculating whether > there is a mismatch between contiguous logical blocks and contiguous > physical blocks (as described in the comments). > > I also switched the if conditional followin...
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