On Mon, 7 Feb 2011 09:02:11 -0600, Eric Van Hensbergen <ericvh@xxxxxxxxx> wrote: > On Sat, Feb 5, 2011 at 11:46 AM, Aneesh Kumar K.V > <aneesh.kumar@xxxxxxxxxxxxxxxxxx> wrote: > > > Â/** > > Â* v9fs_file_open - open a file (or directory) > > Â* @inode: inode to be opened > > @@ -89,19 +86,12 @@ int v9fs_file_open(struct inode *inode, struct file *file) > > Â Â Â Â} > > > > Â Â Â Âfile->private_data = fid; > > +#ifdef CONFIG_9P_FSCACHE > > Â Â Â Âif ((fid->qid.version) && (v9ses->cache)) { > > Â Â Â Â Â Â Â ÂP9_DPRINTK(P9_DEBUG_VFS, "cached"); > > - Â Â Â Â Â Â Â /* enable cached file options */ > > - Â Â Â Â Â Â Â if(file->f_op == &v9fs_file_operations) > > - Â Â Â Â Â Â Â Â Â Â Â file->f_op = &v9fs_cached_file_operations; > > - Â Â Â Â Â Â Â else if (file->f_op == &v9fs_file_operations_dotl) > > - Â Â Â Â Â Â Â Â Â Â Â file->f_op = &v9fs_cached_file_operations_dotl; > > - > > -#ifdef CONFIG_9P_FSCACHE > > Â Â Â Â Â Â Â Âv9fs_cache_inode_set_cookie(inode, file); > > -#endif > > Â Â Â Â} > > - > > +#endif > > Â Â Â Âreturn 0; > > Â} > > Doesn't this conditionalize all cached operations on FSCACHE operation? > What if we want loose cache policy without FSCACHE? > we set file_operations is set in inode init now. The only remaining part is v9fs_cache_inode_set_cookie which is FSCACHE specific -aneesh -- 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