Function report |
Source Code:fs\block_dev.c |
Create Date:2022-07-28 20:14:44 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:__blkdev_direct_IO_simple
Proto:static ssize_t __blkdev_direct_IO_simple(struct kiocb *iocb, struct iov_iter *iter, int nr_pages)
Type:ssize_t
Parameter:
Type | Parameter | Name |
---|---|---|
struct kiocb * | iocb | |
struct iov_iter * | iter | |
int | nr_pages |
206 | bdev = I_BDEV(bdev_file_inode(file)) |
209 | bool should_dirty = false |
214 | If (pos | iov_iter_alignment(iter)) & bdev_logical_block_size(bdev) - 1 Then Return -EINVAL |
218 | If nr_pages <= DIO_INLINE_BIO_VECS Then vecs = inline_vecs |
220 | Else |
228 | bio_set_dev( & bio, bdev) |
229 | device address in 512 byte sectors = pos >> 9 |
230 | bi_write_hint = ki_hint |
231 | bi_private = current process |
233 | bi_ioprio = See linux/ioprio.h |
235 | ret = bio_iov_iter_get_pages( & bio, iter) |
236 | If Value for the false possibility is greater at compile time(ret) Then Go to out |
238 | ret = residual I/O count |
240 | If iov_iter_rw(iter) == generic data direction definitions Then |
242 | If iter_is_iovec(iter) Then should_dirty = true |
244 | Else |
246 | task_io_account_write(ret) |
251 | qc = submit_bio( & bio) |
252 | cycle |
254 | If Not READ_ONCE(bi_private) Then Break |
256 | If Not (ki_flags & IOCB_HIPRI) || Not blk_poll(bdev_get_queue(bdev), qc, true) Then io_schedule() |
262 | bio_release_pages( & bio, should_dirty) |
263 | If Value for the false possibility is greater at compile time(bi_status) Then ret = blk_status_to_errno(bi_status) |
266 | out : |
267 | If vecs != inline_vecs Then kfree(vecs) |
270 | bio_uninit( & bio) |
272 | Return ret |
Name | Describe |
---|---|
blkdev_direct_IO |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |