Skip to content

Commit

Permalink
exofs: Allow O_DIRECT open
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Boaz Harrosh committed Jan 23, 2014
1 parent 2deb76d commit d83c7eb
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion fs/exofs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -961,6 +961,14 @@ static void exofs_invalidatepage(struct page *page, unsigned int offset,
WARN_ON(1);
}


/* TODO: Should be easy enough to do proprly */
static ssize_t exofs_direct_IO(int rw, struct kiocb *iocb,
const struct iovec *iov, loff_t offset, unsigned long nr_segs)
{
return 0;
}

const struct address_space_operations exofs_aops = {
.readpage = exofs_readpage,
.readpages = exofs_readpages,
Expand All @@ -974,7 +982,7 @@ const struct address_space_operations exofs_aops = {

/* Not implemented Yet */
.bmap = NULL, /* TODO: use osd's OSD_ACT_READ_MAP */
.direct_IO = NULL, /* TODO: Should be trivial to do */
.direct_IO = exofs_direct_IO,

/* With these NULL has special meaning or default is not exported */
.get_xip_mem = NULL,
Expand Down

0 comments on commit d83c7eb

Please sign in to comment.