Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3246122imm; Fri, 19 Oct 2018 07:33:49 -0700 (PDT) X-Google-Smtp-Source: ACcGV60rLB2cXKeNj5hAL/On4iWPc/Cimpk2+MfnJEPjlxPGAeYqQb7algEy+bJALRhrOpYGULUg X-Received: by 2002:a62:8891:: with SMTP id l139-v6mr34788835pfd.198.1539959629358; Fri, 19 Oct 2018 07:33:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539959629; cv=none; d=google.com; s=arc-20160816; b=fZ/yPaDYBVAkQr7n2b07khXzcySO9sgFOCgJ5NdnNmNoKdt2UYTeVpROeHyds8mGUo 95jbgcWCveTG3yZmiRbznLfezQVykY4f6B75EZZlfal+OujQI6+YOTvapCY/jvlfAzn9 hEmF/LnJyf8wvRuNq0IdQ3ReEBxR5NIr+FHtZ/3jwrSEfLmUVt3yv9dsTReT3+WGPLu+ 6v6mPIzSMkweHaRpRT84Nd71OwVd+IQkK/vLJxwygp6qz6lhmbP1XuRHqiKczld8WbYg wQMgLMyuTqGk2u34CR15xPQ4ck03R501ak47DSRYt+Np9j+g6SEGh6x8PXTBC6sukxpc a3nQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:to:cc:in-reply-to:date:subject :mime-version:message-id:from:dkim-signature; bh=Sq3xcTJ8myRCehDLeNkS5suGO7bJSCGevfOgzKCtjqs=; b=mkZ7b+Km0B2k6VnS6nUxam8mhtSWafjsWsiJNvu/B0Z3bpN+ToIzWUEPIVQpl0j/BA M8oW0VD/rmxxkAJQX542QyPUxQqO4OJPZj4fTiwEwRRlbtmFf/JwqVi08zPCrqYGAMA1 j/JXNT8qI1D3yn3CUmoOIeMLL+7y+NpQzKVc2tykwXCodNpt3JNHRmgs0kPqM5R7cuTm kxvCL/5N3AVxOMfRgQLZNi4ab5pBp4T9OU5XsoReM9k+GNCDnY+eBseUJzZwtw9LNYT6 mVXhcl+aeF+vydc0VnZDUbFxZ+rdQ53A0ZYaPbe7f/BKjIHRU9/+rTg8M6a1FpU18U16 1m8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dilger-ca.20150623.gappssmtp.com header.s=20150623 header.b=YUaddg60; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o12-v6si25995573pfd.102.2018.10.19.07.33.33; Fri, 19 Oct 2018 07:33:49 -0700 (PDT) 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=@dilger-ca.20150623.gappssmtp.com header.s=20150623 header.b=YUaddg60; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727532AbeJSWj2 (ORCPT + 99 others); Fri, 19 Oct 2018 18:39:28 -0400 Received: from mail-it1-f193.google.com ([209.85.166.193]:36009 "EHLO mail-it1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726977AbeJSWj2 (ORCPT ); Fri, 19 Oct 2018 18:39:28 -0400 Received: by mail-it1-f193.google.com with SMTP id c85-v6so4706697itd.1 for ; Fri, 19 Oct 2018 07:33:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dilger-ca.20150623.gappssmtp.com; s=20150623; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=Sq3xcTJ8myRCehDLeNkS5suGO7bJSCGevfOgzKCtjqs=; b=YUaddg60V2IWBr0i7x5vp9YTkVO5dRIYPOTRGIJHA7nCRVv08CBDbnRLHlMmPTjFeA t3cnC9g0ORG0HKHBTUgN5YMtw1MIYPLwEu/peRCOYigFYE6NuNw+zFlUdb6sOtCUsbty DKc78E3rhr3IteN7gcr2jQOxJo0OfW3saR0V3zLwFrYvXu0Zy3RSdMIJdyZeRL6pj+Se Hmou8NZXRmSnFB97S3dcdS26iu8eHlal3nmdrm2bWkUCvFVXrjgf4F8IsgXu2puEdssM MfdG+8cA8eV/qQmg/OOn20reufFiEOxXXqjiUlFyn8xBXMnq+Jb9KX7U+VAl/1RVq/5U 3X6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=Sq3xcTJ8myRCehDLeNkS5suGO7bJSCGevfOgzKCtjqs=; b=jBiSUZ8KInPBaiP1Wkeps3yLwM/J9tL2CSrFQKmkGS+Hzcvci2rz4/36/2NQLqwtVz pFrbQoejmy36nmVOU0yzAMY67p9izFK/jHqR1G9qBUPD4XQQhedHOh5XTbuM6LI80U+u yOhZ/4Uyg9+deVVja95VD3jypgE0I4ofvh5Nh8dbbihlaJ2spUJk2BsPEGmuCnvLDlJl 1sZrC6xOSj2WmwU0+UpOP+AEXV1Yrvm6ahe7UkFfZgUQexc7NktrTG5mvjjcvsoHWhmo M82nP254/UWR+znadLphRDfjzdQzTx7xPqRmIaCpvDVuhTm9A7WnzKnSDUT9cNTnwF9/ Hstw== X-Gm-Message-State: ABuFfojmghj8rdOjYQUjNfZvhrmT0ipG4434i6mMRdR9iqGPHyk8gN/o uyp++08xN6Q6gWP29ROLsxZ2V6NucnE= X-Received: by 2002:a24:d388:: with SMTP id n130-v6mr3212357itg.28.1539959584328; Fri, 19 Oct 2018 07:33:04 -0700 (PDT) Received: from cabot-wlan.adilger.int (S0106a84e3fe4b223.cg.shawcable.net. [70.77.216.213]) by smtp.gmail.com with ESMTPSA id h123-v6sm1354977ith.21.2018.10.19.07.32.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Oct 2018 07:33:02 -0700 (PDT) From: Andreas Dilger Message-Id: <9D62CF17-A2F8-43A2-A054-AF281FD96C13@dilger.ca> Content-Type: multipart/signed; boundary="Apple-Mail=_88902FA3-F33A-4B04-8242-4DAE6FB12E7B"; protocol="application/pgp-signature"; micalg=pgp-sha256 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: [PATCH v2 1/5] orangefs: fix request_mask misuse Date: Fri, 19 Oct 2018 08:27:05 -0600 In-Reply-To: <20181019122049.27121-1-mszeredi@redhat.com> Cc: Linux FS-devel Mailing List , Linux Kernel Mailing List , linux-api@vger.kernel.org, David Howells , Michael Kerrisk , Florian Weimer , Amir Goldstein , Mike Marshall To: Miklos Szeredi References: <20181019122049.27121-1-mszeredi@redhat.com> X-Mailer: Apple Mail (2.3273) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Apple-Mail=_88902FA3-F33A-4B04-8242-4DAE6FB12E7B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On Oct 19, 2018, at 6:20 AM, Miklos Szeredi wrote: >=20 > Orangefs only handles STATX_BASIC_STATS in its getattr implementation, = so > mask off all other flags. Not doing so results in statx(2) forcing a > refresh of cached attributes on any other requested flag (i.e. = STATX_BTIME > currently) due to the following test in orangefs_inode_getattr(): >=20 > (request_mask & orangefs_inode->getattr_mask) =3D=3D request_mask >=20 > Also clean up gratuitous uses of STATX_ALL. >=20 > Signed-off-by: Miklos Szeredi > Reviewed-by: Martin Brandenburg > Cc: Mike Marshall > --- > fs/orangefs/inode.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) >=20 > diff --git a/fs/orangefs/inode.c b/fs/orangefs/inode.c > index 31932879b716..bd7f15a831dc 100644 > --- a/fs/orangefs/inode.c > +++ b/fs/orangefs/inode.c > @@ -256,7 +256,8 @@ int orangefs_getattr(const struct path *path, = struct kstat *stat, > "orangefs_getattr: called on %pd\n", > path->dentry); >=20 > - ret =3D orangefs_inode_getattr(inode, 0, 0, request_mask); > + ret =3D orangefs_inode_getattr(inode, 0, 0, > + request_mask & STATX_BASIC_STATS); Does it make sense to mask this off at the caller, rather than within orangefs_inode_getattr()? Otherwise, orangefs_inode_getattr() will never see additional stats passed in, even if it is enhanced to return other values. Cheers, Andreas --Apple-Mail=_88902FA3-F33A-4B04-8242-4DAE6FB12E7B Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org iQIzBAEBCAAdFiEEDb73u6ZejP5ZMprvcqXauRfMH+AFAlvJ6boACgkQcqXauRfM H+BRUA/+KhZhIkycQtUFCDFyXS4zsczmZn2BdFLg687vdfLzgFrQSMAbsJVLYgbe 8pRDYrgDn305iymYbOx323GuEtAqjRUaKOV7viS8ugFFGwgIuB5xTDttcWfW60Ib VVNhXo+jDvcOjDplUaEI3yEMCohcgTIQiJ0HD7WS8JtbjYc5FWPrJ05Au86I+rtW pq8Z0rEzF7rzowimnlLPzu6dvMuMisYo3sNI6Ypp1qRwX6m5imzmr6J5dEziVigi LNrSDiEwR37eXKbQEaMJj0185o6j9Pdh2D3d5I1ha6HG2RGNUy666xXklvBn8uAn xEKvt54jj4uWgUG+7ASC+C1GrVTUIeHryGYP3PvhRXXwOOC+VxHqVcmZVZbaSVYz 7nlR7VnCqa/pqMeAboB1YpG5CasiqcSj7Id7DFhXOLKuAT9SeaeyWl1hEcr/C+pM sHJWlB/ByY2E0cTOf9tSITmWkYptq7XKiJ7NygZgalqtxaG4nM7NQX7Pbv8HD8Sr bro5pm2cPrOARAXP5mrSL/sPg+HPzo0ONH2i0YL/holVk0tiUSlkMQnGcEFFNX+R uBvybTYKauR75pmn5tvB/LZ30v3RSCAgjfMuFIyopjv5xn0kkQ/X6fhvHmXRqgIl nPaSS/Urqzin6DUB7G3fdgLOuiy6kcbvm4WQ669YU4gc4Va8chw= =p4EX -----END PGP SIGNATURE----- --Apple-Mail=_88902FA3-F33A-4B04-8242-4DAE6FB12E7B--