]> git.karo-electronics.de Git - karo-tx-linux.git/commit
dio: add bio_vec support to __blockdev_direct_IO()
authorDave Kleikamp <dave.kleikamp@oracle.com>
Fri, 14 Jun 2013 20:54:16 +0000 (15:54 -0500)
committerDave Kleikamp <dave.kleikamp@oracle.com>
Fri, 9 Aug 2013 21:43:34 +0000 (16:43 -0500)
commit8f2a7fbb9b10c591b3296c18647c93dd3dea281c
treef59f09f9c361c15ae294e3e689d21ad16e97d720
parentf817c27b6f2e0f6fb22d035f21e912c76c4dce0c
dio: add bio_vec support to __blockdev_direct_IO()

The trick here is to initialize the dio state so that do_direct_IO()
consumes the pages we provide and never tries to map user pages.  This
is done by making sure that final_block_in_request covers the page that
we set in the dio.  do_direct_IO() will return before running out of
pages.

The caller is responsible for dirtying these pages, if needed.  We add
an option to the dio struct that makes sure we only dirty pages when
we're operating on iovecs of user addresses.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Cc: Zach Brown <zab@zabbo.net>
fs/direct-io.c