Received: by 2002:ab2:69cc:0:b0:1fd:c486:4f03 with SMTP id n12csp295815lqp; Tue, 11 Jun 2024 05:07:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVEdxbSVdDK03kkXA6UeOmlZnWU0HHOSwL2uHF6KuBSQcfc1KAgJ3G6GUweB+ylG5xrV4CuPA8wAFPwxf0FCNngj3Y+v2iEIao1O86xVg== X-Google-Smtp-Source: AGHT+IHd5Gw+Mwih+3BHgTjALqWZvCZEZoRgtBzNFgeAJjz5yLGhZgCtk/sGEoNlF2x4a12bh8PV X-Received: by 2002:a17:906:358c:b0:a6d:f339:f8 with SMTP id a640c23a62f3a-a6df3390556mr703585866b.31.1718107629886; Tue, 11 Jun 2024 05:07:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718107629; cv=pass; d=google.com; s=arc-20160816; b=L5Z+h28SeimEOhNXBIwhGZmK+oGur85OpRdY3M7ysVaYnZnLS8dUhajGfruVjQCTj3 bllgsG4K8PDhWp/vudMFOte3IW7xqYYgoLqs2PkcLM6/BZJJnFaz+E6THPAAUs/suiVz 1Vn7C+bC/rjqcsjdxMr7X65omupPZMZNT9eus9D5mx+1kJFaI+TTqHjypIQAAj0CmGBt 7o2kdVX40+D0pbhN5OfdOpzzFE0kN9Kv3b7rpOYaQWgjF+8gLbsnylS+EqjmGAl4AaFC bk3gq1t8NuKrOgU6NA01miF1DFmvjy2l8dN8GPE6XRBLdkSw7ug1akZufkrh+ZVjCMGI nu2A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=QOwdG0ynICYzTSCN8/wPrqg53mKV02DaJh6W/3l/9RE=; fh=4fkkHMrkk8Kj0ptnn0xamjYNWVm/cWk8wwS8iZf+Slw=; b=wcTISsUAdTDfeoHxOkwhDitiWuuz1Hx7/EDaCDzpqmui2JGDmfrs70Zln+lIG2szyc NDRQOYGd5jHyo11qrIpFGGOVgKy27VwmIUqSc+fA529jGMRSk8uN2/XnFdcMPzrO88Pi bkmMAuW18ZQw0RW7fM2+hgNGsmiR3AsCxU7dCVHjh92HgmHmYaBoZW/TZJl6Yco8+Gt/ u/R8cToOo3mlbpTwVqpaHgTQpYj3XQ+tZeMQ9g0PonzbFlfFGM4GpQU9kJb7iGYd55/5 yVwEETYOQLjUbTy4EwPCni51ZQzUcbr6xcZw1gQyRyvh5PlFSgMupZEix9XrDnW+0/U3 HbJw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=fKS3xns+; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-209828-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-209828-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a6f0ffcbc94si304618466b.790.2024.06.11.05.07.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 05:07:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-209828-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=fKS3xns+; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-209828-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-209828-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 517B31F24AD2 for ; Tue, 11 Jun 2024 12:07:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AA3BC17C220; Tue, 11 Jun 2024 12:06:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fKS3xns+" Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5F2C517BB23; Tue, 11 Jun 2024 12:06:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718107600; cv=none; b=YKXT+BaA6PMCdjwlGuw4C8zZ5oUO0Q42aVQI0ZDAqJ6A3i+c5NtIQzejcZOW6bQ7nbz19I993cW+33LBwTKEXCwHd38bWd6MQGf3x4MSECg7MFChM3gJ7uCaG4JRcsPF/kRVq5GVg/km1zogYrYT9egZZPuAog75xxfj7oZsZEM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718107600; c=relaxed/simple; bh=vT3LFzEeldwiztQNO1Y8xDg0UBLAPd+cr7YztvybvcY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pud7H4CEvrvAdVdkWIgEs8eWbGPeEYf5Yo3/ko+Kb0z/UMrOHI2vlPkuEy4xUSCmKEYap6vaL+QHgbRghoW0lXyAxyzwTdZWA/uY5msKk+k4cii9rcbrTeAi6SUNBS7dhVQaeRN/i3rFueemzDXEryth053u/MoNhreJQ1BeQlk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=fKS3xns+; arc=none smtp.client-ip=209.85.128.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-4217990f997so27001465e9.2; Tue, 11 Jun 2024 05:06:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718107598; x=1718712398; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QOwdG0ynICYzTSCN8/wPrqg53mKV02DaJh6W/3l/9RE=; b=fKS3xns+N/7rjL0pWjscGPoM7WlUOJ5lfNrEZOGIOXQ0GWPr6/chR7G3F9aRzIWYtk pRcVmkSQm0OR9wmo0Pme84d2myiQp3lCY223+t1Qg2aFS/eC6ksYq0LM8TCT5jCATBfs rtSmOhEOrVOb5g3VUxJAboPlUH9dXCDCEmTVdtFzSbebvzRRie61zcIBtgOjLaKdnycB g4KbRe9DWUTIWzk/KN6fYM4iUVFzfVrYPFcKyEVEsg43oNn70oYmUr5hM0pu4yerFQxb E5DwMnvdg0Zj+nltm+DH5sM6bbmikS2Sl18YpJb5/pWfCVfNhXjHEcWa40CM4wY6DasI jlcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718107598; x=1718712398; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QOwdG0ynICYzTSCN8/wPrqg53mKV02DaJh6W/3l/9RE=; b=sVCI7pJAppPGFiOor9oifgaHQU+EjbSmLVeF8q4ypNM1ZjzLJLA1xxWNkd9TOiYfrR YCkiudKYYBpzwMHuiQVSPloWn6aGhec75jFmoN7QxbPj00kyKi/IagEzqJOxSG/dOGIc TIalXhyBj1qJsThQ1n8csTwdsHWFUxiD5pfbj8b3Tl5wtuGSIuLr7YjiWriICdJtcmv6 igbT7XJMfjR6U0S51jZ8LSHvdUjBfYL+ut+CinPxjDXv/rhJkCt1qwSbluNoJdTfWw8C tYN66in/Hi3paJwvOvPSd0ZvGZvzz2t4vdJ7zMkyE/jvFL8z29s/pLtMrtTu1tSU2Jzf jinA== X-Forwarded-Encrypted: i=1; AJvYcCV2jCyznfcRal9vfGebZMab1o+Olewjp1GA8BQsYmosku9UVhKdES3gknP0rCN4T6lPOZoyUlwiBrGD9gyGKjFquMgqigl6VUtBM282PC5gt+PwBDuROrJKymh4XKtCj4Lpdfcv92xvRal/Aw309M6JIgZ2hC5pJ8vzhPXGcnkmhLpKoAe2x/pRPnV/rIs5hes/lryLMBhQR/bN5zKfRyKXzwCzr9uH X-Gm-Message-State: AOJu0Yy3K4D+S4sPtmRWn0vNiBMbkZP62FmXUDgtSEdbBwGOb3i9htj0 B79MLeI7cGPSnwetSiUArJ5KvDbRNjcQ1mbWMBJgv9a9i9nR8SzWsj90RZ2O X-Received: by 2002:a05:600c:a4c:b0:421:2711:cde9 with SMTP id 5b1f17b1804b1-42164a0714fmr104981655e9.22.1718107597450; Tue, 11 Jun 2024 05:06:37 -0700 (PDT) Received: from f.. (cst-prg-65-249.cust.vodafone.cz. [46.135.65.249]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4215814f141sm209315785e9.42.2024.06.11.05.06.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 05:06:36 -0700 (PDT) From: Mateusz Guzik To: brauner@kernel.org Cc: viro@zeniv.linux.org.uk, jack@suse.cz, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-bcachefs@vger.kernel.org, kent.overstreet@linux.dev, linux-xfs@vger.kernel.org, david@fromorbit.com, Mateusz Guzik Subject: [PATCH v2 1/4] xfs: preserve i_state around inode_init_always in xfs_reinit_inode Date: Tue, 11 Jun 2024 14:06:23 +0200 Message-ID: <20240611120626.513952-2-mjguzik@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240611120626.513952-1-mjguzik@gmail.com> References: <20240611120626.513952-1-mjguzik@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This is in preparation for the routine starting to zero the field. De facto coded by Dave Chinner, see: https://lore.kernel.org/linux-fsdevel/ZmgtaGglOL33Wkzr@dread.disaster.area/ Signed-off-by: Mateusz Guzik --- fs/xfs/xfs_icache.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/xfs/xfs_icache.c b/fs/xfs/xfs_icache.c index 0953163a2d84..d31a2c1ac00a 100644 --- a/fs/xfs/xfs_icache.c +++ b/fs/xfs/xfs_icache.c @@ -314,6 +314,7 @@ xfs_reinit_inode( dev_t dev = inode->i_rdev; kuid_t uid = inode->i_uid; kgid_t gid = inode->i_gid; + unsigned long state = inode->i_state; error = inode_init_always(mp->m_super, inode); @@ -324,6 +325,7 @@ xfs_reinit_inode( inode->i_rdev = dev; inode->i_uid = uid; inode->i_gid = gid; + inode->i_state = state; mapping_set_large_folios(inode->i_mapping); return error; } -- 2.43.0