Linux CIFS filesystem development
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
To: Pavel Shilovsky <piastryyy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] CIFS: New read cache mechanism
Date: Sat, 18 Sep 2010 11:51:29 -0400	[thread overview]
Message-ID: <20100918155129.GA21337@infradead.org> (raw)
In-Reply-To: <AANLkTinA+YpcYFF6YE-df7sg-thCg87_7Bn5qjC+LxYH-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

> +	struct cifsInodeInfo *cinode;
> +
> +	if (filp && filp->f_path.dentry && filp->f_path.dentry->d_inode)
> +		cinode = CIFS_I(filp->f_path.dentry->d_inode);
> +	else
> +		return -ENOENT;

Totally pointless check.  Could you guys please stop putting in all
these utterly pointless cargo cult checks in cifs?

> +
> +	if (cinode->clientCanCacheRead)
> +		read = do_sync_read(filp, buf, len, ppos);
> +	else
> +		read = cifs_user_read(filp, buf, len, ppos);
> +
> +	return read;

And how do you enforce your caching semantics for aio or vectored reads?

  parent reply	other threads:[~2010-09-18 15:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-18  6:32 [PATCH] CIFS: New read cache mechanism Pavel Shilovsky
     [not found] ` <AANLkTinA+YpcYFF6YE-df7sg-thCg87_7Bn5qjC+LxYH-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-09-18 11:32   ` Jeff Layton
     [not found]     ` <20100918073214.4104b01e-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org>
2010-09-19 16:53       ` Pavel Shilovsky
2010-09-18 15:51   ` Christoph Hellwig [this message]
2010-09-19 14:52   ` Steve French
     [not found]     ` <AANLkTikdQTo8y-zJZ625MCgY15rpYmERGgJKtq=oJ0Wd-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-09-19 22:16       ` Jeff Layton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100918155129.GA21337@infradead.org \
    --to=hch-wegcikhe2lqwvfeawa7xhq@public.gmane.org \
    --cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=piastryyy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox