diff options
author | Boaz Harrosh <bharrosh@panasas.com> | 2014-01-13 16:45:43 -0500 |
---|---|---|
committer | Boaz Harrosh <bharrosh@panasas.com> | 2014-01-23 11:54:11 -0500 |
commit | d83c7eb65d9bf0a57e7d5ed87a5bd8e5ea6b1fb6 (patch) | |
tree | c7a061f45272edcae2ecf0d486576a0f024aaa07 /fs/exofs | |
parent | 2deb76db092a91088494c00862bafc4fe7980adb (diff) |
exofs: Allow O_DIRECT open
With this minimal do nothing patch an application can open O_DIRECT
and then actually do buffered sync IO instead. But the aio API is
supported which is a good thing
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Diffstat (limited to 'fs/exofs')
-rw-r--r-- | fs/exofs/inode.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/exofs/inode.c b/fs/exofs/inode.c index a52a5d23c30b..7e7ba9ada405 100644 --- a/fs/exofs/inode.c +++ b/fs/exofs/inode.c | |||
@@ -961,6 +961,14 @@ static void exofs_invalidatepage(struct page *page, unsigned int offset, | |||
961 | WARN_ON(1); | 961 | WARN_ON(1); |
962 | } | 962 | } |
963 | 963 | ||
964 | |||
965 | /* TODO: Should be easy enough to do proprly */ | ||
966 | static ssize_t exofs_direct_IO(int rw, struct kiocb *iocb, | ||
967 | const struct iovec *iov, loff_t offset, unsigned long nr_segs) | ||
968 | { | ||
969 | return 0; | ||
970 | } | ||
971 | |||
964 | const struct address_space_operations exofs_aops = { | 972 | const struct address_space_operations exofs_aops = { |
965 | .readpage = exofs_readpage, | 973 | .readpage = exofs_readpage, |
966 | .readpages = exofs_readpages, | 974 | .readpages = exofs_readpages, |
@@ -974,7 +982,7 @@ const struct address_space_operations exofs_aops = { | |||
974 | 982 | ||
975 | /* Not implemented Yet */ | 983 | /* Not implemented Yet */ |
976 | .bmap = NULL, /* TODO: use osd's OSD_ACT_READ_MAP */ | 984 | .bmap = NULL, /* TODO: use osd's OSD_ACT_READ_MAP */ |
977 | .direct_IO = NULL, /* TODO: Should be trivial to do */ | 985 | .direct_IO = exofs_direct_IO, |
978 | 986 | ||
979 | /* With these NULL has special meaning or default is not exported */ | 987 | /* With these NULL has special meaning or default is not exported */ |
980 | .get_xip_mem = NULL, | 988 | .get_xip_mem = NULL, |