Re: [V9fs-developer] [PATCH] [fs/9p] Add a Direct IO address_space_operation.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux