On Mon, Aug 23, 2010 at 7:19 PM, Venkateswararao Jujjuri (JV) <jvrao@xxxxxxxxxxxxxxxxxx> wrote: > > Eric Van Hensbergen wrote: > > Is this just adding dead-code then? (I know I'm conflicting with my no > > silent errors motto -- but I'm keen to keep our line-count down) > > Not really a dead code. if the O_DIRECT flag is set, __dentry_open() checks for > f->f_mapping->a_ops->direct_IO before proceeding with open. > In the absense of this routine, open with O_DIRECT flag fails. > > > By what path would we normally end up in this function? If caches were enabled? > > If cache is enabled we use generic_file_aio_read() as aio_read() operation. > This ends up calling this new routine and fails with the error. So, until we > actually > implement a directio handle in the cached mode, there won't be a direct_IO support > in the cached mode. > > generic_file_aio_read() > { > ... > if (filp->f_flags & O_DIRECT) { > ... > ... > retval = mapping->a_ops->direct_IO(READ, iocb, > iov, pos, nr_segs); > > <<<The new routine returns error here >>> > } > } > > Will that be OK to move forwarded with directio support only for non-cached mode, > and deal with cached mode later? > > Thanks, > JV > Yup - seems reasonable enough - lets just make sure we remember it when we get the cached modes in place. I guess this won't be a regression even for existing cache modes because DirectIO would have failed without the presence of this function anyways. -eric -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html