]> git.notmuchmail.org Git - notmuch/blob - test/corpora/lkml/cur/1382298587.001970:2,
Import notmuch_0.28.2.orig.tar.gz
[notmuch] / test / corpora / lkml / cur / 1382298587.001970:2,
1 From: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
2 Subject: Re: [RFC][PATCH 04/10] cifs: define server-level cache index objects
3  and register them with FS-Cache
4 Date: Wed, 23 Jun 2010 11:04:39 +0530
5 Lines: 61
6 Message-ID: <4C219CEF.5000003@suse.de>
7 References: <yes>       <1277220198-3522-1-git-send-email-sjayaraman@suse.de> <20100622175214.4c56234f@corrin.poochiereds.net>
8 Mime-Version: 1.0
9 Content-Type: text/plain; charset=UTF-8
10 Content-Transfer-Encoding: 7bit
11 Cc: Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>, linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
12         linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
13         David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
14 To: Jeff Layton <jlayton-vpEMnDpepFuMZCB2o+C8xQ@public.gmane.org>
15 X-From: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Wed Jun 23 07:34:50 2010
16 Return-path: <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
17 Envelope-to: glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
18 Received: from vger.kernel.org ([209.132.180.67])
19         by lo.gmane.org with esmtp (Exim 4.69)
20         (envelope-from <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
21         id 1ORIbp-0002v4-3W
22         for glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Wed, 23 Jun 2010 07:34:49 +0200
23 Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
24         id S1750954Ab0FWFes (ORCPT <rfc822;glkc-linux-cifs@m.gmane.org>);
25         Wed, 23 Jun 2010 01:34:48 -0400
26 Received: from cantor2.suse.de ([195.135.220.15]:58263 "EHLO mx2.suse.de"
27         rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
28         id S1750809Ab0FWFes (ORCPT <rfc822;linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>);
29         Wed, 23 Jun 2010 01:34:48 -0400
30 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.221.2])
31         by mx2.suse.de (Postfix) with ESMTP id 8C18386A2E;
32         Wed, 23 Jun 2010 07:34:46 +0200 (CEST)
33 User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091130 SUSE/3.0.0-1.1.1 Thunderbird/3.0
34 In-Reply-To: <20100622175214.4c56234f-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org>
35 Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
36 Precedence: bulk
37 List-ID: <linux-cifs.vger.kernel.org>
38 X-Mailing-List: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
39 Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1001998>
40
41 On 06/23/2010 03:22 AM, Jeff Layton wrote:
42 > On Tue, 22 Jun 2010 20:53:18 +0530
43 > Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org> wrote:
44
45 >> Define server-level cache index objects (as managed by TCP_ServerInfo structs).
46 >> Each server object is created in the CIFS top-level index object and is itself
47 >> an index into which superblock-level objects are inserted.
48 >>
49 >> Currently, the server objects are keyed by hostname.
50 >>
51 >> Signed-off-by: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
52 >> ---
53 >>  fs/cifs/Makefile   |    2 +-
54 >>  fs/cifs/cache.c    |   25 +++++++++++++++++++++++++
55 >>  fs/cifs/cifsglob.h |    3 +++
56 >>  fs/cifs/connect.c  |    4 ++++
57 >>  fs/cifs/fscache.c  |   47 +++++++++++++++++++++++++++++++++++++++++++++++
58 >>  fs/cifs/fscache.h  |   12 ++++++++++++
59 >>  6 files changed, 92 insertions(+), 1 deletion(-)
60 >>  create mode 100644 fs/cifs/fscache.c
61 >>
62 >> Index: cifs-2.6/fs/cifs/Makefile
63 >> ===================================================================
64 >> --- cifs-2.6.orig/fs/cifs/Makefile
65 >> +++ cifs-2.6/fs/cifs/Makefile
66 >> @@ -12,4 +12,4 @@ cifs-$(CONFIG_CIFS_UPCALL) += cifs_spneg
67 >>  
68 >>  cifs-$(CONFIG_CIFS_DFS_UPCALL) += dns_resolve.o cifs_dfs_ref.o
69 >>  
70 >> -cifs-$(CONFIG_CIFS_FSCACHE) += cache.o
71 >> +cifs-$(CONFIG_CIFS_FSCACHE) += fscache.o cache.o
72 >> Index: cifs-2.6/fs/cifs/cache.c
73 >> ===================================================================
74 >> --- cifs-2.6.orig/fs/cifs/cache.c
75 >> +++ cifs-2.6/fs/cifs/cache.c
76 >> @@ -51,3 +51,28 @@ void cifs_fscache_unregister(void)
77 >>      fscache_unregister_netfs(&cifs_fscache_netfs);
78 >>  }
79 >>  
80 >> +/*
81 >> + * Server object currently keyed by hostname
82 >> + */
83 >> +static uint16_t cifs_server_get_key(const void *cookie_netfs_data,
84 >> +                               void *buffer, uint16_t maxbuf)
85 >> +{
86 >> +    const struct TCP_Server_Info *server = cookie_netfs_data;
87 >> +    uint16_t len = strnlen(server->hostname, sizeof(server->hostname));
88 >> +
89
90 > Would a tuple of address/family/port be a better choice here? Imagine I
91 > mount "foo" and then later mount "foor.bar.baz". If they are the same
92 > address and only the UNC differs, then you won't get the benefit of
93 > the cache, right?
94
95
96 Good point. I'll fix it up when I do a respin.
97
98 Thanks,
99
100 -- 
101 Suresh Jayaraman
102
103