From patchwork Mon May 17 19:01:20 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 100176 Received: from lists.samba.org (fn.samba.org [216.83.154.106]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4HJ1S7d019279 for ; Mon, 17 May 2010 19:02:03 GMT Received: from fn.samba.org (localhost [127.0.0.1]) by lists.samba.org (Postfix) with ESMTP id 1FB6E465BD; Mon, 17 May 2010 13:01:29 -0600 (MDT) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on fn.samba.org X-Spam-Level: X-Spam-Status: No, score=-1.7 required=3.8 tests=AWL,BAYES_00,SPF_NEUTRAL autolearn=no version=3.2.5 X-Original-To: linux-cifs-client@lists.samba.org Delivered-To: linux-cifs-client@lists.samba.org Received: from cdptpa-omtalb.mail.rr.com (cdptpa-omtalb.mail.rr.com [75.180.132.121]) by lists.samba.org (Postfix) with ESMTP id CC58C465BB for ; Mon, 17 May 2010 13:01:23 -0600 (MDT) X-Authority-Analysis: v=1.1 cv=QScKf0zhPmZcRjivOyb7jDoODMGTUEf/LonvbVIdJao= c=1 sm=0 a=exQuycjPFgsA:10 a=UBIxAjGgU1YA:10 a=ld/erqUjW76FpBUqCqkKeA==:17 a=20KFwNOVAAAA:8 a=hGzw-44bAAAA:8 a=myF-prIXhCuUcztKKE4A:9 a=SyOvJ59uoj9rchNo48MA:7 a=DKr_DTlCJ73pOMuGtC5rK8EoyEkA:4 a=CjuIK1q_8ugA:10 a=jEp0ucaQiEUA:10 a=dowx1zmaLagA:10 a=Z5zmSrl7ETIcvW3L560A:9 a=e_pX8ZfRoOlmSkskb2UA:7 a=R3SsIwvlUPW7RRb93-ibPYF1D6MA:4 a=ld/erqUjW76FpBUqCqkKeA==:117 X-Cloudmark-Score: 0 X-Originating-IP: 71.70.153.3 Received: from [71.70.153.3] ([71.70.153.3:41676] helo=mail.poochiereds.net) by cdptpa-oedge04.mail.rr.com (envelope-from ) (ecelerity 2.2.2.39 r()) with ESMTP id C2/39-23695-18291FB4; Mon, 17 May 2010 19:01:21 +0000 Received: from tlielax.poochiereds.net (tlielax.poochiereds.net [192.168.1.3]) by mail.poochiereds.net (Postfix) with ESMTPS id 3AA14580AC; Mon, 17 May 2010 15:01:21 -0400 (EDT) Date: Mon, 17 May 2010 15:01:20 -0400 From: Jeff Layton To: Jeff Layton Message-ID: <20100517150120.3d3c9abc@tlielax.poochiereds.net> In-Reply-To: <1274095138-3386-2-git-send-email-jlayton@redhat.com> References: <1274095138-3386-1-git-send-email-jlayton@redhat.com> <1274095138-3386-2-git-send-email-jlayton@redhat.com> X-Mailer: Claws Mail 3.7.5 (GTK+ 2.20.1; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Cc: smfrench@gmail.com, linux-cifs-client@lists.samba.org Subject: Re: [linux-cifs-client] [PATCH 1/3] cifs: always revalidate hardlinked inodes X-BeenThere: linux-cifs-client@lists.samba.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: The Linux CIFS VFS client List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-cifs-client-bounces@lists.samba.org Errors-To: linux-cifs-client-bounces@lists.samba.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Mon, 17 May 2010 19:02:03 +0000 (UTC) From 3b4c8849e6126849cd6aea33ff52679403bc2f87 Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Mon, 17 May 2010 14:51:49 -0400 Subject: [PATCH] cifs: always revalidate hardlinked inodes when using noserverino The old cifs_revalidate logic always revalidated hardlinked inodes. This hack allowed CIFS to pass some connectathon tests when server inode numbers aren't used (basic test7, in particular). Signed-off-by: Jeff Layton --- fs/cifs/inode.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index 5b042fc..8e05e8a 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c @@ -1528,6 +1528,11 @@ cifs_inode_needs_reval(struct inode *inode) if (time_after_eq(jiffies, cifs_i->time + HZ)) return true; + /* hardlinked files w/ noserverino get "special" treatment */ + if (!(CIFS_SB(inode->i_sb)->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) && + S_ISREG(inode->i_mode) && inode->i_nlink != 1) + return true; + return false; } -- 1.6.6.1