linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Suresh Jayaraman <sjayaraman@suse.de>
To: Steve French <smfrench@gmail.com>
Cc: linux-fsdevel@vger.kernel.org, linux-cifs@vger.kernel.org,
	linux-cachefs@redhat.com
Subject: [PATCH 00/09] cifs: local caching support using FS-Cache
Date: Mon,  5 Jul 2010 18:11:03 +0530	[thread overview]
Message-ID: <1278333663-30464-1-git-send-email-sjayaraman@suse.de> (raw)
In-Reply-To: <Yes>

This patchset is a second try at adding persistent, local caching facility for
CIFS using the FS-Cache interface.

The cache index hierarchy which is mainly used to locate a file object or
discard a certain subset of the files cached, currently has three levels:
	- Server
	- Share 
	- File

The server index object is keyed by IPaddress of the server, socket family
and the port. The superblock index object is keyed by the sharename and the
inode object is keyed by the UniqueId. The cache coherency is ensured by
checking the LastWriteTime, LastChangeTime and end of file (eof) reported by
the server.

Changes since last post:
-------------------------
   - fix a bug during registration with FS-Cache
   - fix a bug while storing pages to the cache. The earlier set needed an rsize
     of 4096 to make caching working properly due to this bug.
   - server index key uses {IPaddress,family,port} tuple instead of servername
   - root dir of the share is validated by UniqueId/IndexNumber. Almost all
     servers seem to provide one of them and it's unique.
   - we now check LastWriteTime, LastChangeTime and eof of server for data
     coherency. CreateTime could be considered once some of related development
     effort advances
   - dropped the patch to guard cifsglob.h against multiple inclusion as it
     has been included in Jeff Layton's tree
   - some cleanups

To try these patches:

   - apply this patchset in order
   - mount the share, for e.g. mount -t cifs //server/share -o user=guest
   - try copying a huge file (say few hundred MBs) from mount point to local
     filesystem (during the first time, the cache will be initialized)
   - when you copy the second time, it should be read from the local cache (you
     could unmount and remount to reduce the page cache impact).


Known issues
--------------
   - when the 'noserverino' mount option is used, the client generates
     UniqueId itself rather than using the UniqueId from the server. As
     we use UniqueId to ensure that the root directory did not change
     under the hood, we won't be able to benefit from the cache.
   - the cache coherency check may not be reliable always as some
     CIFS servers are known not to update mtime until the filehandle is closed.

Suresh Jayaraman (09):
  cifs: add kernel config option for CIFS Client caching support
  cifs: register CIFS for caching
  cifs: define server-level cache index objects and register them with FS-Cache
  cifs: define superblock-level cache index objects and register them
  cifs: define inode-level cache object and register them
  cifs: FS-Cache page management
  cifs: store pages into local cache
  cifs: read pages from FS-Cache
  cifs: add mount option to enable local caching


 Kconfig      |    9 +
 Makefile     |    2 
 cache.c      |  331 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 cifs_fs_sb.h |    1 
 cifsfs.c     |   15 ++
 cifsglob.h   |   10 +
 connect.c    |   16 ++
 file.c       |   50 ++++++++
 fscache.c    |  236 ++++++++++++++++++++++++++++++++++++++++++
 fscache.h    |  136 ++++++++++++++++++++++++
 inode.c      |    7 +
 11 files changed, 813 insertions(+)

       reply	other threads:[~2010-07-05 12:41 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Yes>
2010-07-05 12:41 ` Suresh Jayaraman [this message]
     [not found]   ` <1278333663-30464-1-git-send-email-sjayaraman-l3A5Bk7waGM@public.gmane.org>
2010-07-14 17:41     ` [PATCH 00/09] cifs: local caching support using FS-Cache Scott Lovenberg
     [not found]       ` <4C3DF6BF.3070001-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-07-14 18:09         ` Steve French
     [not found]           ` <AANLkTin2tKtkWTflrrzBMYBEd6SFr35uYUl1SmfYlj9W-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-07-15 16:23             ` Suresh Jayaraman
     [not found]               ` <4C3F35F7.8060408-l3A5Bk7waGM@public.gmane.org>
2010-07-22  9:28                 ` Suresh Jayaraman
     [not found]               ` <4C480F51.8070204-l3A5Bk7waGM@public.gmane.org>
2010-07-22 17:40                 ` David Howells
     [not found]                   ` <1892.1279820400-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-07-22 19:12                     ` Jeff Layton
2010-07-22 22:49                     ` Andreas Dilger
2010-07-23  8:35                       ` Stef Bon
     [not found]                         ` <AANLkTikF5Oz5pobaPUJebUg+yPuoVy_B5PBz+nuUTSii-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-07-23 16:16                           ` Suresh Jayaraman
2010-07-24  5:40                             ` Stef Bon
2010-07-23 11:57                     ` Suresh Jayaraman
     [not found]                       ` <4C4983B0.5080804-l3A5Bk7waGM@public.gmane.org>
2010-07-23 15:03                         ` Steve French
2010-07-30 23:08                 ` Scott Lovenberg
2010-07-05 12:41 ` [PATCH 01/09] cifs: add kernel config option for CIFS Client caching support Suresh Jayaraman
2010-07-05 12:41 ` [PATCH 02/09] cifs: register CIFS for caching Suresh Jayaraman
2010-07-05 12:42 ` [PATCH 03/09] cifs: define server-level cache index objects and register them Suresh Jayaraman
2010-07-05 12:42 ` [PATCH 04/09] cifs: define superblock-level " Suresh Jayaraman
2010-07-20 12:53   ` Jeff Layton
     [not found]     ` <20100720085327.4d1bf9d7-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2010-07-20 13:37       ` Jeff Layton
     [not found]         ` <20100720093722.4f734f03-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2010-07-21 14:06           ` Suresh Jayaraman
2010-07-05 12:42 ` [PATCH 05/09] cifs: define inode-level cache object " Suresh Jayaraman
2010-07-05 12:43 ` [PATCH 06/09] cifs: FS-Cache page management Suresh Jayaraman
2010-07-05 12:43 ` [PATCH 07/09] cifs: store pages into local cache Suresh Jayaraman
2010-07-05 12:43 ` [PATCH 08/09] cifs: read pages from FS-Cache Suresh Jayaraman
2010-07-05 12:43 ` [PATCH 09/09] cifs: add mount option to enable local caching Suresh Jayaraman

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=1278333663-30464-1-git-send-email-sjayaraman@suse.de \
    --to=sjayaraman@suse.de \
    --cc=linux-cachefs@redhat.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=smfrench@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).