]> 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>
Tue, 15 Oct 2013 18:44:34 +0000 (13:44 -0500)
committerDave Kleikamp <dave.kleikamp@oracle.com>
Tue, 15 Oct 2013 18:44:34 +0000 (13:44 -0500)
commitb009eabefe9042636099b4c80bc0de380e7d7c84
tree002a8517c468f445c2072a0ea86f926861485c98
parent921057174f1cc4226c5fc83c60d01fb4107f450e
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>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Cc: Zach Brown <zab@zabbo.net>
fs/direct-io.c