Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756882AbdLPQdu (ORCPT ); Sat, 16 Dec 2017 11:33:50 -0500 Received: from sequoia-grove.ad.secure-endpoints.com ([208.125.0.235]:57208 "EHLO smtp.secure-endpoints.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756679AbdLPQdq (ORCPT ); Sat, 16 Dec 2017 11:33:46 -0500 X-MDAV-Result: clean X-MDAV-Processed: smtp.secure-endpoints.com, Sat, 16 Dec 2017 11:19:00 -0500 X-Spam-Processed: smtp.secure-endpoints.com, Sat, 16 Dec 2017 11:18:59 -0500 X-Spam-Report: VBR-Info: md=auristor.com; mc=all; mv=vbr.emailcertification.org; X-MDRemoteIP: 2001:470:1f07:f77:b5c7:9c6f:8010:d760 X-MDHelo: [IPv6:2001:470:1f07:f77:b5c7:9c6f:8010:d760] X-MDArrival-Date: Sat, 16 Dec 2017 11:18:55 -0500 X-Authenticated-Sender: jaltman@secure-endpoints.com X-Return-Path: prvs=1523d988a3=jaltman@auristor.com X-Envelope-From: jaltman@auristor.com X-MDaemon-Deliver-To: linux-kernel@vger.kernel.org X-CAV-Result: clean Subject: Re: [PATCH v2 05/19] afs: convert to new i_version API To: Jeff Layton , linux-fsdevel@vger.kernel.org References: <20171216134656.15561-1-jlayton@kernel.org> <20171216134656.15561-6-jlayton@kernel.org> <1513432186.3428.6.camel@kernel.org> Cc: linux-kernel@vger.kernel.org, viro@zeniv.linux.org.uk, linux-nfs@vger.kernel.org, bfields@fieldses.org, neilb@suse.de, jack@suse.de, linux-ext4@vger.kernel.org, tytso@mit.edu, adilger.kernel@dilger.ca, linux-xfs@vger.kernel.org, darrick.wong@oracle.com, david@fromorbit.com, linux-btrfs@vger.kernel.org, clm@fb.com, jbacik@fb.com, dsterba@suse.com, linux-integrity@vger.kernel.org, zohar@linux.vnet.ibm.com, dmitry.kasatkin@gmail.com, linux-afs@lists.infradead.org, dhowells@redhat.com From: Jeffrey Altman Openpgp: url=https://pgp.mit.edu Organization: AuriStor, Inc. (formerly Your File System, Inc.) Message-ID: <82157aa3-ec0b-25e6-517b-704a3f81ec61@auristor.com> Date: Sat, 16 Dec 2017 11:18:41 -0500 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <1513432186.3428.6.camel@kernel.org> Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="------------ms030408000205080100010300" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 9744 Lines: 187 This is a cryptographically signed message in MIME format. --------------ms030408000205080100010300 Content-Type: multipart/mixed; boundary="------------C920308AD3530271D6778AFC" Content-Language: en-US This is a multi-part message in MIME format. --------------C920308AD3530271D6778AFC Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Jeff, A few thoughts on AFS usage below which might impact a future revision of the API. I hope they are useful. On 12/16/2017 8:49 AM, Jeff Layton wrote: > On Sat, 2017-12-16 at 08:46 -0500, Jeff Layton wrote: >> From: Jeff Layton >> >> For AFS, it's generally treated as an opaque value, so we use the >> *_raw variants of the API here. >> >> Note that AFS has quite a different definition for this counter. AFS >> only increments it on changes to the data, not for the metadata. We'll= >> need to reconcile that somehow if we ever want to present this to >> userspace via statx. >> =46rom the patch series notes: "The inode->i_version field is supposed to be a value that changes whenever there is any data or metadata change to the inode. Some filesystems use it internally to detect directory changes during readdir. knfsd will use it if the filesystem has MS_I_VERSION set. IMA will also use it to optimize away some remeasurement if it's available. NFS and AFS just use it to store an opaque change attribute from the server. "Only btrfs, ext4, and xfs increment it for data changes. Because of this, these filesystems must log the inode to disk whenever the i_version counter changes. That has a non-zero performance impact, especially on write-heavy workloads, because we end up dirtying the inode metadata on every write, not just when the times change. [1]" The AFS/AuriStorFS data version is an unsigned 64-bit value that is incremented by the file server as part of a data changing operation. For files, a StoreData and for directories entry manipulations such as create, rename, delete. This data version is used to tag the version of any subset of the data stream for caching and replication purposes. As Jeff notes, the AFS data version is not incremented for metadata changes. Metadata cannot be trusted by clients without acquiring a callback promise from a fileserver. The callback promise will either be satisfied by the issuing fileserver sending a CallBack notification that the metadata is no longer valid OR the callback promise will expire. Something else that is important to note that it is assumed that local data changes that occur under a valid callback promise is newer than the data on the fileserver. It might be useful if the new i_version API supported major and minor version numbers. AFS implementations would store the fileserver provided data version number as the major version and would increment the minor version when local changes have been made which have yet to be stored back to the fileserver. This functionality would be especially useful if disconnected operations were implemented for the AFS implementation. It might also be useful to separate metadata version and data version although some filesystems would set the same value to both. For AFS, the metadata major version would the timestamp at which the callback was issued. Jeffrey Altman --------------C920308AD3530271D6778AFC Content-Type: text/x-vcard; charset=utf-8; name="jaltman.vcf" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="jaltman.vcf" begin:vcard fn:Jeffrey Altman n:Altman;Jeffrey org:AuriStor, Inc. adr:Suite 6B;;255 West 94Th Street;New York;New York;10025-6985;United St= ates email;internet:jaltman@auristor.com title:Founder and CEO tel;work:+1-212-769-9018 note;quoted-printable:LinkedIn: https://www.linkedin.com/in/jeffreyaltman= =3D0D=3D0A=3D Skype: jeffrey.e.altman=3D0D=3D0A=3D =09 url:https://www.auristor.com/ version:2.1 end:vcard --------------C920308AD3530271D6778AFC-- --------------ms030408000205080100010300 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwEAAKCC DIIwggXpMIIE0aADAgECAhBAAV7gPRitcrlGsJTzkwjvMA0GCSqGSIb3DQEBCwUAMDoxCzAJ BgNVBAYTAlVTMRIwEAYDVQQKEwlJZGVuVHJ1c3QxFzAVBgNVBAMTDlRydXN0SUQgQ0EgQTEy MB4XDTE3MTAwMzAzMTczM1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