From patchwork Tue Dec 12 18:34:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Brandenburg X-Patchwork-Id: 10108115 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 20169602B3 for ; Tue, 12 Dec 2017 18:39:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1683926E4A for ; Tue, 12 Dec 2017 18:39:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0AE19292CC; Tue, 12 Dec 2017 18:39:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9C1AC26E4A for ; Tue, 12 Dec 2017 18:39:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752366AbdLLSep (ORCPT ); Tue, 12 Dec 2017 13:34:45 -0500 Received: from mail-yb0-f195.google.com ([209.85.213.195]:36109 "EHLO mail-yb0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752258AbdLLSek (ORCPT ); Tue, 12 Dec 2017 13:34:40 -0500 Received: by mail-yb0-f195.google.com with SMTP id j7so9219523ybl.3 for ; Tue, 12 Dec 2017 10:34:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=omnibond-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=llMZOQvv/V3m9q+pDjoS1+AUTXrqTBLXWZQrp2ceDqQ=; b=Wb++stbfoBfC4ocXcO6xTEqUAIrk/nNzAMBmBtRStwRu4buOshf9f24qlR0OIoDl4i mOUevnRVx/7ak8ubIrG95QIs8tiOBFqmsHVMoUmuoR5wn+sDkptnNVItQx64WnhRza9C kM1/eZfwZDRcbd26vTli5+dKE8dqg/4LMWkQRv1zUJlDfYXtgCyyXU9Ff10ke61h3eFk +zJvm89qvxWgRi5bDiYoS5h+fvAc1EtTbIE30SyYQD7wTBllA2yMDBajlGwgz/04a/kt Brtt9qE8+ntypCf0qCfZAJuOSfv9GFOL8teV6VbpLBRtxIidtyOUSRMJJ1bCLbwVk6q0 u2TA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=llMZOQvv/V3m9q+pDjoS1+AUTXrqTBLXWZQrp2ceDqQ=; b=CG5eLZg0KEKv/LsyHqrQSb4U4zf5251RIhLVrLkcqky9Wq24SmiLCU+8sQUw9ge3Cs LHXhrOWNtmOtxb11sAIFNVcmyg4BHZurrIkFMaN/tK5DRuFPHNi4c9dGRh9YxvUcj8D6 jsiGpeOCO3/XowxZAYTymwlW9lDQfRRrHWmKSOA24WJY3DB5tMIHLi4SVmuBKPfoIXWU oH/fbeYR1YsAWdv/DfYOxherX+u0hjCKRchRkCL7s2pAToFvt50b5OLwRm4hO0R0TFgq lQ9tbfgW+q1E3JvJ+AgfSqKkItt6yXIhKgXJ8gO+/KUJTGkQa1OppzApEhgkJBYfz6Pc XU5w== X-Gm-Message-State: AKGB3mKjhjufxNoTQq+KL8u5DPF7orP60Rfa7Rd0bCUrLvjkSA2VZTuq 5mnY2QRvdSnj7M1jCzy9uIvXgQ== X-Google-Smtp-Source: ACJfBosYrJA/maQAwoZls/pMi4dCqYx31vGiMfGEJSbWCKOkq3BOiTr4720ndaRCh/2IM5FNwPQokw== X-Received: by 10.129.154.68 with SMTP id r65mr3454209ywg.244.1513103679970; Tue, 12 Dec 2017 10:34:39 -0800 (PST) Received: from omnifs1.omnibond.com ([24.31.12.185]) by smtp.gmail.com with ESMTPSA id i207sm7666353ywe.38.2017.12.12.10.34.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Dec 2017 10:34:38 -0800 (PST) From: Martin Brandenburg X-Google-Original-From: Martin Brandenburg To: hubcap@omnibond.com, devel@lists.orangefs.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Martin Brandenburg Subject: [PATCH 03/18] orangefs: do not invalidate attributes on inode create Date: Tue, 12 Dec 2017 13:34:09 -0500 Message-Id: <20171212183424.26406-4-martin@martinbrandenburg.com> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20171212183424.26406-1-martin@martinbrandenburg.com> References: <20171212183424.26406-1-martin@martinbrandenburg.com> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Martin Brandenburg When an inode is created, we fetch attributes from the server. There is no need to turn around and invalidate them. No need to initialize attributes after the getattr either. Either we'll do nothing or do something wrong. Signed-off-by: Martin Brandenburg --- fs/orangefs/inode.c | 6 ------ fs/orangefs/namei.c | 6 ------ 2 files changed, 12 deletions(-) diff --git a/fs/orangefs/inode.c b/fs/orangefs/inode.c index fe1d705ad91f..ff0c799f09e2 100644 --- a/fs/orangefs/inode.c +++ b/fs/orangefs/inode.c @@ -448,12 +448,6 @@ struct inode *orangefs_new_inode(struct super_block *sb, struct inode *dir, goto out_iput; orangefs_init_iops(inode); - - inode->i_mode = mode; - inode->i_uid = current_fsuid(); - inode->i_gid = current_fsgid(); - inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode); - inode->i_size = PAGE_SIZE; inode->i_rdev = dev; error = insert_inode_locked4(inode, hash, orangefs_test_inode, ref); diff --git a/fs/orangefs/namei.c b/fs/orangefs/namei.c index c98bba2dbc94..f79401b2486a 100644 --- a/fs/orangefs/namei.c +++ b/fs/orangefs/namei.c @@ -78,8 +78,6 @@ static int orangefs_create(struct inode *dir, d_instantiate(dentry, inode); unlock_new_inode(inode); orangefs_set_timeout(dentry); - ORANGEFS_I(inode)->getattr_time = jiffies - 1; - ORANGEFS_I(inode)->getattr_mask = STATX_BASIC_STATS; gossip_debug(GOSSIP_NAME_DEBUG, "%s: dentry instantiated for %pd\n", @@ -335,8 +333,6 @@ static int orangefs_symlink(struct inode *dir, d_instantiate(dentry, inode); unlock_new_inode(inode); orangefs_set_timeout(dentry); - ORANGEFS_I(inode)->getattr_time = jiffies - 1; - ORANGEFS_I(inode)->getattr_mask = STATX_BASIC_STATS; gossip_debug(GOSSIP_NAME_DEBUG, "Inode (Symlink) %pU -> %pd\n", @@ -405,8 +401,6 @@ static int orangefs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode d_instantiate(dentry, inode); unlock_new_inode(inode); orangefs_set_timeout(dentry); - ORANGEFS_I(inode)->getattr_time = jiffies - 1; - ORANGEFS_I(inode)->getattr_mask = STATX_BASIC_STATS; gossip_debug(GOSSIP_NAME_DEBUG, "Inode (Directory) %pU -> %pd\n",