Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp1197443imp; Thu, 21 Feb 2019 21:38:40 -0800 (PST) X-Google-Smtp-Source: AHgI3IZ6Bdqz044eqENUkWr8lEa4Jfl6xyzptjR2i1g6LUz1LmhHVTR1/OuTccqvQUQMW501OaJ1 X-Received: by 2002:a62:ac0a:: with SMTP id v10mr1680490pfe.200.1550813920003; Thu, 21 Feb 2019 21:38:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550813919; cv=none; d=google.com; s=arc-20160816; b=wuoXGiqFd4iZsjlWX4m87D2GibDZks+HLe2KCrP9Hqt2pqOoFF/vtKE8dlIXuf4P/h J+A/ws+GaklaoGHofQx0DI4zLYYDSEyBs2IYm6jbTPRGDKCS6GyF1k6+ZMW3Xs4tHJmn iT5XXtYYDUmlSPzL/AvNcBHtD/82z34Qud3k1mzLgw4R5yaAsaEAH5rElncQ0Rwl+woS obfXuzUoqbOCY35ypFMvJYSqU+gKFuL092bzK89m8iehIuwQvR9TcKvRreG3lDwUa2Ye qafoV7kJFguF4TuadAGVOtQ9Ujx1YM4vyU08Wwe2EAhyZVbYIsrqKxNdkjuUCCithI5j ubBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=FS+iAVnKOUuAsS6GDlAurm7gawMprGRMdeUDcdtD8RI=; b=mC9umgAJCgpaMQ0UXsJ2wRY7WP8QLb+MB4dhk5P7TnYrTw3mZptDCOMpdmF1qW2jFZ Ig69eq6hCvI3dVkjo8ssREADlWD7f+Ck0RlUXfveBlfsajYzmNDWvQbGTFeBM4ytsTZB 9pccw+wpvfakAHFsV0tGN9S7Kfrg+/rSxEai8Ie0rR7rTNi7z7Q3RakfMjIjp2rdveJ6 eUswy+4qGSGqDJCqlc1jMAAkYdv/qWwzuPAQ89HzA4JCEHCPMg1gEdshiyU1cP1dZUN0 JCCLrTpTuoCc3WZs9hiGrYE90wLwMt+ib11hB5L5uZxB9hq8evFrL8P3BOm0Nf7/R5oS DQGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=JVuYMlZG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q130si575670pfq.97.2019.02.21.21.38.25; Thu, 21 Feb 2019 21:38:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=JVuYMlZG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725882AbfBVFhr (ORCPT + 99 others); Fri, 22 Feb 2019 00:37:47 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:38591 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725792AbfBVFhr (ORCPT ); Fri, 22 Feb 2019 00:37:47 -0500 Received: by mail-wr1-f68.google.com with SMTP id v13so997889wrw.5; Thu, 21 Feb 2019 21:37:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=FS+iAVnKOUuAsS6GDlAurm7gawMprGRMdeUDcdtD8RI=; b=JVuYMlZGJKUyRY1AIaRwYdrtndY7jnwN3ZfC4PdOvih5GclFYpYnPulXNegy/rcl7k SKxBnbOpVnaDxLk2ulUQaLl9Xi4hWza4EP2+kgrsSA6ObtOYkm+2sTTvg9KzY8n9Si7R IfHv/2o6+m3iT6er76wR43uTpsaHQFD+aq99F1Y0iBJ2CS1XjUhCl/pEx7GdTy9KjSJs 4AnNKcYHerF6ofjmpXFqYtFK1mpoV5TM9+c6CR3tYews/mDoifGRdAluyFzR4Id5iOoQ tXODQpSBkOut6d01NIFFzAyf97vcLuzncnKVFsDnAo60+DBlWOf8y2sgf2tfUhNV1Gog Krvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=FS+iAVnKOUuAsS6GDlAurm7gawMprGRMdeUDcdtD8RI=; b=MWi4oGN/N0qxGAJ41/RKScUVsamTMrq7QGXUB4qCJZ4u1sVGpfr2PT7CiIvJnVl4pb 9aIO6GrkRYb4+Au7SkkbbHulH40trEYUp5r9QTlW7LEXgvveZJVjh6sqVUDa6b57nQFW LEGJ/Mb0escUFX3ZL41cyjOXcaAvici/+y+vLtpV79UA4izbdGJOyB413K1OCHYr2AaB jX8wbQW9MR+HPYoSdaPAHEbyIkdPdpCvShl6RKZcAh/zUSuHkwL1xzZz9g47/icn472N jbYSq7ojPDFPF+j1YBw6pG/LNe37E8hUyqINScI9z5+vWCmHDM/rLkqrJ7SSGwH3kTd0 KYLg== X-Gm-Message-State: AHQUAuZSU2Bs18PKzVklhD7+x28enkbp0RBn2CG1JFaPmR1oNRcc+ufm oLrfXPx9nEY5Qrc9hqT/h6hxEn0= X-Received: by 2002:a5d:5585:: with SMTP id i5mr1490351wrv.239.1550813865476; Thu, 21 Feb 2019 21:37:45 -0800 (PST) Received: from avx2 ([46.53.241.138]) by smtp.gmail.com with ESMTPSA id b197sm1273180wmd.23.2019.02.21.21.37.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Feb 2019 21:37:44 -0800 (PST) Date: Fri, 22 Feb 2019 08:37:42 +0300 From: Alexey Dobriyan To: Jeremy Cline , David Both Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] proc: update i_atime when reading files Message-ID: <20190222053742.GA4270@avx2> References: <20190221163714.22330-1-jcline@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190221163714.22330-1-jcline@redhat.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 21, 2019 at 11:37:14AM -0500, Jeremy Cline wrote: > Prior to commit 1da4d377f943 ("proc: revalidate misc dentries"), the > access, modify, and change times of files in /proc were just the current > time. Ehh, actually no. Doing $(which sleep) infinity Now the mtime and ctime values change mostly as a user would > expect, but the atime isn't updated when the file read. This patch > updates the access time of /proc files when they are read. > rv = read(file, buf, count, ppos); > + if (rv >= 0) > + inode->i_atime = current_time(inode); > + } Maybe it should be done given /proc is virtual so there are no concerns about scheduling writes noone cares about to the filesystem.