tmpfs: support aio
authorHugh Dickins <[email protected]>
Thu, 24 Jul 2008 04:27:35 +0000 (21:27 -0700)
committerLinus Torvalds <[email protected]>
Thu, 24 Jul 2008 17:47:16 +0000 (10:47 -0700)
commitbcd78e49613c41b5bed96fa288e983876f286a59
tree0ad2591ca2e0d46923d8ec489ef7378f1a3c0d8e
parent11fa977ecde652ab324dd79c179deb52e82a8df1
tmpfs: support aio

We have a request for tmpfs to support the AIO interface: easily done, no
more than replacing the old shmem_file_read by shmem_file_aio_read,
cribbed from generic_file_aio_read.  (In 2.6.25 its write side was already
changed to use generic_file_aio_write.)

Incorporate cleanups from Andrew Morton and Harvey Harrison.

Tests out fine with LTP's ltp-aiodio.sh, given hacks (not included) to
support O_DIRECT.  tmpfs cannot honestly support O_DIRECT: its
cache-avoiding-IO nature is at odds with direct IO-avoiding-cache.

Signed-off-by: Hugh Dickins <[email protected]>
Tested-by: Lawrence Greenfield <[email protected]>
Cc: Christoph Rohland <[email protected]>
Cc: Badari Pulavarty <[email protected]>
Cc: Zach Brown <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/shmem.c