X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=test%2Fcorpora%2Flkml%2Fcur%2F1382298770.001724%3A2%2C;fp=test%2Fcorpora%2Flkml%2Fcur%2F1382298770.001724%3A2%2C;h=69c794c7f65b48077902911df7fa13c30ac7869d;hb=e08f5f76e406de2c6bdcf85952aaeb66ec0d37de;hp=0000000000000000000000000000000000000000;hpb=ce8c88824ab91882ea50c761b930390953cf2c34;p=notmuch diff --git a/test/corpora/lkml/cur/1382298770.001724:2, b/test/corpora/lkml/cur/1382298770.001724:2, new file mode 100644 index 00000000..69c794c7 --- /dev/null +++ b/test/corpora/lkml/cur/1382298770.001724:2, @@ -0,0 +1,104 @@ +From: Suresh Jayaraman +Subject: [RFC][PATCH 10/10] cifs: add mount option to enable local caching +Date: Tue, 22 Jun 2010 20:55:09 +0530 +Lines: 66 +Message-ID: <1277220309-3757-1-git-send-email-sjayaraman@suse.de> +References: +Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, + linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, David Howells +To: Steve French +X-From: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Tue Jun 22 17:25:29 2010 +Return-path: +Envelope-to: glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org +Received: from vger.kernel.org ([209.132.180.67]) + by lo.gmane.org with esmtp (Exim 4.69) + (envelope-from ) + id 1OR5Ls-0004PS-BM + for glkc-linux-cifs-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Tue, 22 Jun 2010 17:25:28 +0200 +Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand + id S1755015Ab0FVPZ1 (ORCPT ); + Tue, 22 Jun 2010 11:25:27 -0400 +Received: from victor.provo.novell.com ([137.65.250.26]:48639 "EHLO + victor.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org + with ESMTP id S1754070Ab0FVPZ1 (ORCPT + ); + Tue, 22 Jun 2010 11:25:27 -0400 +X-Greylist: delayed 316 seconds by postgrey-1.27 at vger.kernel.org; Tue, 22 Jun 2010 11:25:26 EDT +Received: from localhost (prv-ext-foundry1int.gns.novell.com [137.65.251.240]) + by victor.provo.novell.com with ESMTP; Tue, 22 Jun 2010 09:25:11 -0600 +X-Mailer: git-send-email 1.6.4.2 +In-Reply-To: +Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org +Precedence: bulk +List-ID: +X-Mailing-List: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org +Archived-At: + +Add a mount option 'fsc' to enable local caching on CIFS. + +As the cifs-utils (userspace) changes are not done yet, this patch enables +'fsc' by default to assist testing. + +Signed-off-by: Suresh Jayaraman +--- + fs/cifs/cifs_fs_sb.h | 1 + + fs/cifs/connect.c | 8 ++++++++ + 2 files changed, 9 insertions(+), 0 deletions(-) + +diff --git a/fs/cifs/cifs_fs_sb.h b/fs/cifs/cifs_fs_sb.h +index 246a167..9e77145 100644 +--- a/fs/cifs/cifs_fs_sb.h ++++ b/fs/cifs/cifs_fs_sb.h +@@ -35,6 +35,7 @@ + #define CIFS_MOUNT_DYNPERM 0x1000 /* allow in-memory only mode setting */ + #define CIFS_MOUNT_NOPOSIXBRL 0x2000 /* mandatory not posix byte range lock */ + #define CIFS_MOUNT_NOSSYNC 0x4000 /* don't do slow SMBflush on every sync*/ ++#define CIFS_MOUNT_FSCACHE 0x8000 /* local caching enabled */ + + struct cifs_sb_info { + struct cifsTconInfo *tcon; /* primary mount */ +diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c +index 4844dbd..6c6ff3c 100644 +--- a/fs/cifs/connect.c ++++ b/fs/cifs/connect.c +@@ -98,6 +98,7 @@ struct smb_vol { + bool noblocksnd:1; + bool noautotune:1; + bool nostrictsync:1; /* do not force expensive SMBflush on every sync */ ++ bool fsc:1; /* enable fscache */ + unsigned int rsize; + unsigned int wsize; + bool sockopt_tcp_nodelay:1; +@@ -843,6 +844,9 @@ cifs_parse_mount_options(char *options, const char *devname, + /* default to using server inode numbers where available */ + vol->server_ino = 1; + ++ /* XXX: default to fsc for testing until mount.cifs pieces are done */ ++ vol->fsc = 1; ++ + if (!options) + return 1; + +@@ -1332,6 +1336,8 @@ cifs_parse_mount_options(char *options, const char *devname, + printk(KERN_WARNING "CIFS: Mount option noac not " + "supported. Instead set " + "/proc/fs/cifs/LookupCacheEnabled to 0\n"); ++ } else if (strnicmp(data, "fsc", 3) == 0) { ++ vol->fsc = true; + } else + printk(KERN_WARNING "CIFS: Unknown mount option %s\n", + data); +@@ -2405,6 +2411,8 @@ static void setup_cifs_sb(struct smb_vol *pvolume_info, + cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_OVERR_GID; + if (pvolume_info->dynperm) + cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_DYNPERM; ++ if (pvolume_info->fsc) ++ cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_FSCACHE; + if (pvolume_info->direct_io) { + cFYI(1, "mounting share using direct i/o"); + cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_DIRECT_IO; +-- +1.6.4.2 + + +