From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5ED78C10F0E for ; Thu, 18 Apr 2019 18:42:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2FDD9217D7 for ; Thu, 18 Apr 2019 18:42:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1555612968; bh=rQejxSBnacoQhbN3X00441i7dsUk/GM4VgR8xGRdEO8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=wzWW+gBoB3pC4cRzUxgfNZT1t+ZAnlETp4Miw73/CCxuuhhQgcFL6cdVgAl8eWAHo RmEw5KEQxJOYl2MICR4rL9vcKpu3RClEJnH3Z+tIOFKkfnYnrL99o2EV4FPqFpVIlk aYiKxCztj5/9lcmzoCK8NrbGCnxbifDU+ul3stCU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389902AbfDRSmr (ORCPT ); Thu, 18 Apr 2019 14:42:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:60606 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389890AbfDRSmr (ORCPT ); Thu, 18 Apr 2019 14:42:47 -0400 Received: from localhost.localdomain (unknown [24.213.116.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 72B57217D7; Thu, 18 Apr 2019 18:42:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1555612967; bh=rQejxSBnacoQhbN3X00441i7dsUk/GM4VgR8xGRdEO8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GrUB+1/yyhKzLx/5RB6y5HMnicDuK/qbvca95oAHnmQvuXMWxoWNtIAECu+OfU/Nm g/i6iHozxkwv+XaOqcjmC8/u1RrbWSOaozGENz4t8YnBYYudTRO0AIN5UO4KhkmzHb ovCFVY5IzbCRBIXP8Sy8VuxyrX0uN+4vrEhy2QO4= From: hubcap@kernel.org To: linux-fsdevel@vger.kernel.org, christoph@lameter.com Cc: Martin Brandenburg , Mike Marshall Subject: [PATCH 02/22] orangefs: do not invalidate attributes on inode create Date: Thu, 18 Apr 2019 14:40:54 -0400 Message-Id: <20190418184113.9152-3-hubcap@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190418184113.9152-1-hubcap@kernel.org> References: <20190418184113.9152-1-hubcap@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org 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 it'll be exactly the same, or it'll be something else and wrong. Signed-off-by: Martin Brandenburg Signed-off-by: Mike Marshall --- 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 b47765ea6870..a18205dbd27e 100644 --- a/fs/orangefs/inode.c +++ b/fs/orangefs/inode.c @@ -460,12 +460,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 c8676c996249..87584d79ca7a 100644 --- a/fs/orangefs/namei.c +++ b/fs/orangefs/namei.c @@ -76,8 +76,6 @@ static int orangefs_create(struct inode *dir, d_instantiate_new(dentry, 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", @@ -291,8 +289,6 @@ static int orangefs_symlink(struct inode *dir, d_instantiate_new(dentry, 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", @@ -360,8 +356,6 @@ static int orangefs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode d_instantiate_new(dentry, 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", -- 2.20.1