]> git.notmuchmail.org Git - notmuch/blob - test/corpora/lkml/cur/1382298587.001724:2,
Import notmuch_0.28.2.orig.tar.gz
[notmuch] / test / corpora / lkml / cur / 1382298587.001724:2,
1 From: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
2 Subject: [RFC][PATCH 10/10] cifs: add mount option to enable local caching
3 Date: Tue, 22 Jun 2010 20:55:09 +0530
4 Lines: 66
5 Message-ID: <1277220309-3757-1-git-send-email-sjayaraman@suse.de>
6 References: <yes>
7 Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
8         linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
9 To: Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
10 X-From: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Tue Jun 22 17:25:29 2010
11 Return-path: <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
12 Envelope-to: glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
13 Received: from vger.kernel.org ([209.132.180.67])
14         by lo.gmane.org with esmtp (Exim 4.69)
15         (envelope-from <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
16         id 1OR5Ls-0004PS-BM
17         for glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Tue, 22 Jun 2010 17:25:28 +0200
18 Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
19         id S1755015Ab0FVPZ1 (ORCPT <rfc822;glkc-linux-cifs@m.gmane.org>);
20         Tue, 22 Jun 2010 11:25:27 -0400
21 Received: from victor.provo.novell.com ([137.65.250.26]:48639 "EHLO
22         victor.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
23         with ESMTP id S1754070Ab0FVPZ1 (ORCPT
24         <rfc822;groupwise-SJayaraman-Et1tbQHTxzrQT0dZR+AlfA@public.gmane.org:0:0>);
25         Tue, 22 Jun 2010 11:25:27 -0400
26 X-Greylist: delayed 316 seconds by postgrey-1.27 at vger.kernel.org; Tue, 22 Jun 2010 11:25:26 EDT
27 Received: from localhost (prv-ext-foundry1int.gns.novell.com [137.65.251.240])
28         by victor.provo.novell.com with ESMTP; Tue, 22 Jun 2010 09:25:11 -0600
29 X-Mailer: git-send-email 1.6.4.2
30 In-Reply-To: <yes>
31 Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
32 Precedence: bulk
33 List-ID: <linux-cifs.vger.kernel.org>
34 X-Mailing-List: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
35 Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1001750>
36
37 Add a mount option 'fsc' to enable local caching on CIFS.
38
39 As the cifs-utils (userspace) changes are not done yet, this patch enables
40 'fsc' by default to assist testing.
41
42 Signed-off-by: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
43 ---
44  fs/cifs/cifs_fs_sb.h |    1 +
45  fs/cifs/connect.c    |    8 ++++++++
46  2 files changed, 9 insertions(+), 0 deletions(-)
47
48 diff --git a/fs/cifs/cifs_fs_sb.h b/fs/cifs/cifs_fs_sb.h
49 index 246a167..9e77145 100644
50 --- a/fs/cifs/cifs_fs_sb.h
51 +++ b/fs/cifs/cifs_fs_sb.h
52 @@ -35,6 +35,7 @@
53  #define CIFS_MOUNT_DYNPERM      0x1000 /* allow in-memory only mode setting   */
54  #define CIFS_MOUNT_NOPOSIXBRL   0x2000 /* mandatory not posix byte range lock */
55  #define CIFS_MOUNT_NOSSYNC      0x4000 /* don't do slow SMBflush on every sync*/
56 +#define CIFS_MOUNT_FSCACHE     0x8000 /* local caching enabled */
57  
58  struct cifs_sb_info {
59         struct cifsTconInfo *tcon;      /* primary mount */
60 diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
61 index 4844dbd..6c6ff3c 100644
62 --- a/fs/cifs/connect.c
63 +++ b/fs/cifs/connect.c
64 @@ -98,6 +98,7 @@ struct smb_vol {
65         bool noblocksnd:1;
66         bool noautotune:1;
67         bool nostrictsync:1; /* do not force expensive SMBflush on every sync */
68 +       bool fsc:1;     /* enable fscache */
69         unsigned int rsize;
70         unsigned int wsize;
71         bool sockopt_tcp_nodelay:1;
72 @@ -843,6 +844,9 @@ cifs_parse_mount_options(char *options, const char *devname,
73         /* default to using server inode numbers where available */
74         vol->server_ino = 1;
75  
76 +       /* XXX: default to fsc for testing until mount.cifs pieces are done */
77 +       vol->fsc = 1;
78 +
79         if (!options)
80                 return 1;
81  
82 @@ -1332,6 +1336,8 @@ cifs_parse_mount_options(char *options, const char *devname,
83                         printk(KERN_WARNING "CIFS: Mount option noac not "
84                                 "supported. Instead set "
85                                 "/proc/fs/cifs/LookupCacheEnabled to 0\n");
86 +               } else if (strnicmp(data, "fsc", 3) == 0) {
87 +                       vol->fsc = true;
88                 } else
89                         printk(KERN_WARNING "CIFS: Unknown mount option %s\n",
90                                                 data);
91 @@ -2405,6 +2411,8 @@ static void setup_cifs_sb(struct smb_vol *pvolume_info,
92                 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_OVERR_GID;
93         if (pvolume_info->dynperm)
94                 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_DYNPERM;
95 +       if (pvolume_info->fsc)
96 +               cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_FSCACHE;
97         if (pvolume_info->direct_io) {
98                 cFYI(1, "mounting share using direct i/o");
99                 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_DIRECT_IO;
100 -- 
101 1.6.4.2
102
103
104