From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.43 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795125091; b=cv/gyZKPF4R0s+8/aUpLjqBMWjlYPAXk7KjTiH+QSJPThpt7+7qKSAKyGNbmhjtVlNN3 uBGE28xlAKond+VVk+N0u2M+3ch7JtNMuQGhOWOZjiv7rC5yOAsLqrqG/m4v5WV7ALX70 vB25Y7ybg3H1Z26PmOwwudR6aNw3ok8xRYzLtmZjSE26OnF6ES23t/F7+O/kvrB6bn5Id izjqddvWwQSKnPIjdx6fVPCr5VvipSFoD1NFlR7lNuUxjED+qbAL5rsaFv2ryBnFa3agm DgBa54mksZcK7OEOBYv55cER+YRXHFyMubtsS6vgElTF2yIgjn3+RrHnieHOKCg5n5w== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795125091; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Mime-Version:Content-Type:Date:Message-Id:Cc:Subject:From:To:X-Mailer: References:In-Reply-To; bh=Ny3Sl9Bn6sHIvah8OWFokkLcjHbV6BwIAehQvpJWiOM=; b=BiZwmnpsn1blbIo9c5oev/DG0gcXAkl9mLReBpSQERXuTIt+JJyr4sd/ax4vZWA1odMp sPgOGA1zopw9AIuVk9CUiVHlXV7zX56ee1P51SFQCwkLL8/4qESWbT99Hv1f33daPuaZ7 rqZYd4LI0WE6VTnkVMVAgHS/RBV63d3peWuj2f6OT+lWjIG0ZH1TWIU/0U/zNQkOuKQIW KBlYiAiaVdGK9KzdJuJ3BJk4Fgfy00zfFBI8bpLrrTq2GuD53tOZ6kTb3+cj45RQqcGDG XfMPud08AwvWIXBcxhxhWB4+Shp/9cx3Bh7OZmElOjeMbzyf6/AZhlT6A/5u69gNcwg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=IlZfXAdV; arc=none smtp.remote-ip=209.85.128.43 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 07C80606A330 for ; Thu, 19 Nov 2026 21:51:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 07C80606A330 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=IlZfXAdV Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-4b467581b98so2359675e9.0 for ; Thu, 19 Nov 2026 13:51:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1795125089; x=1795729889; darn=vger.kernel.org; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-type:mime-version:from:to:cc:subject:date:message-id :reply-to:content-type; bh=Ny3Sl9Bn6sHIvah8OWFokkLcjHbV6BwIAehQvpJWiOM=; b=IlZfXAdVqjbuXw7jCUzgBXdPvunc6N0Mgo0wFLsi18PRIXDg8h5ImWiXqqG9r5Z3nz mMCiHUUIjL1nanBAy+gmMMgf3P/DYPfNI/EhxL6VmuCltURwD+QgSpN5wH9Ap5okdiWa y1/JXPn/JLNw5xRoGTUzFUnMvRCF7c7CMfNmwx5ikxXdmn96ekaYhxXTtb8MRXhNYeaS 5grEbe59oWK77G5W0OdmQ9pOUNCM7ixvwCJgXOuUiJiLHN4zyLRjXQj9XiUl5nqIEgCk mpXfVFfEyeVkldYSBLUdPMoMK3O4rNrOnb4CWeh8R4q5zrhhEuhtuEtenWRCvjHT14FL k9gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795125089; x=1795729889; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-type:mime-version:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to:content-type; bh=Ny3Sl9Bn6sHIvah8OWFokkLcjHbV6BwIAehQvpJWiOM=; b=WbWVuncNCN6AOEsEicdwfkBZAtFKZIwDO5Ysz38mV1eVE1kAIRDFO3xmHW5h3EQIQ/ Q+AxW8ZGMULbXF3JNGXXRMoT/Vl6HNte3tYqYMvvKX7w0nN04Z93kHSacH3Y+ZLzKrnx XqMOzgWc7ItLeV+0CRTCIujwrhqS5ZJDFxsTpMmHmJ1sLvaVWFcBWvPTCWh5a5gUlAps JDgGwCPNIeCbxHsSkUEgYUMMH4efpRB+gcFF+6StMh2v/fImtSzojNDpL24EHuapC0n7 9OA6yyjn5+jWUxfBZ+KpmpOHOzj1Gv9koJpE6vPJtoUf6bPLwp3UzZjx24+vJg4p3IiV hceg== X-Forwarded-Encrypted: i=1; AL+hErE/n6PXI804OFbxYgO8kenF+jcj57glxLZ1nnzkX4mk8Mzm0fFFAmLfcOnwHHij3Hp/3xakK8/6gx2j9+M=@vger.kernel.org X-Gm-Message-State: APuU4Z+hN+/ngG/W8kmQrVGzKzmVpr3LkPZTscNu3vnk+KezEshxk/Kh SGCLbeu4WVETpBImgq6LsAAJBkTNAy9qy5Sje9N3vHIfB5p6zI6U+um+ X-Gm-Gg: AYBFou3gT6km0MD8dYrRfOrREwUcAulb47pvnht55Klv18OeCu59pKHo8Xl8g53gJZG mtUrI2LA3ftVB2x6bzm4iMh1tjQSAtQdQiSZ5ijOUlG9mm+MrRsmyS4QWVa879K4OTpL34UETR6 jH5MGfLKK1WSLtSSrUhxzyA3gn9YYWrjMdQHqtNH4yAYmtXe6pa89ZkbmUEOvFdodp6EJU9BXrm 8UAyw2yZ0SJjOpJ4NWsRzL5qJ1+cTDs1lHRma88P2Fh6at5hhgfa18gRpldoepsDm/K/iagBfxs sEwoGko22RSsKYedOtjL3JmMKAHdSFDAnE2YrszlOz+ZqEn+ZWT6Q2cNC8gznMXXirQuv9QsBSn iH1g+CQtMvsrMlDPmOs39A72w9NvlKmpBRzAtypA5bVa0JmzGNUaoce0Pen5Y+tuHBr3wqIYQWX fiLebOjKFf+q72JxtqhBcfpCXIeRRw4c6HhC6EtDCawDWlUgA4bMkFhBKHkofG+CfcafuOp9hdp CT2teacRZdC/uGAshZ+a4bAf0r1b0JOccro3xfSrTrgwle3PMnpd33c0ZyP6Y5BwWy360HuCq4V Ip01EK6mzht9JnGnbWb79MdFWP+wKOJWUqsEq5xtULzTffM= X-Received: by 2002:a05:600c:4f48:b0:4a6:44b:2593 with SMTP id 5b1f17b1804b1-4bb8893ab9cmr20069015e9.29.1795125089289; Thu, 19 Nov 2026 13:51:29 -0800 (PST) Received: from localhost ([2001:b07:5d26:7a6a:365a:60ff:fe0d:cfc6]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb884a3a3dsm24821245e9.10.2026.11.19.13.51.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 19 Nov 2026 13:51:28 -0800 (PST) X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Mime-Version: 1.0 Content-Type: multipart/signed; boundary=305c4db69b4b7682b4927e5c7245ccd497c3eba9918a22ec95937c8c862e; micalg=pgp-sha512; protocol="application/pgp-signature" Date: Thu, 19 Nov 2026 22:51:26 +0100 Message-Id: Cc: "David Sterba" , "Namjae Jeon" , "Sungjong Seo" , "Alexander Viro" , "Christian Brauner" , "Trond Myklebust" , "Anna Schumaker" , "Chuck Lever" , "Jeff Layton" , "Konstantin Komarov" , "Paulo Alcantara" , "Chris Mason" , "Yuezhang Mo" , "Jan Kara" , "NeilBrown" , "Olga Kornievskaia" , "Dai Ngo" , "Tom Talpey" , "Ronnie Sahlberg" , "Shyam Prasad N" , "Bharath SM" , "Sergey Senozhatsky" , "ChenXiaoSong" , "Darrick J . Wong" , "Sean Smith" , "Andrey Albershteyn" , "Pedro Falcato" , =?utf-8?q?Pali_Roh=C3=A1r?= , , , , , , , , Subject: Re: [RFC PATCH v4 09/10] ksmbd: add provenance time (ptime) and map it to CreationTime From: "koraynilay" To: "Amir Goldstein" , "koraynilay" X-Mailer: aerc 0.22.0-0-gc2f86b7abde3 References: <20261115180343.576773-1-koray.fra@gmail.com> <20261115180343.576773-10-koray.fra@gmail.com> In-Reply-To: --305c4db69b4b7682b4927e5c7245ccd497c3eba9918a22ec95937c8c862e Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 On Thu Nov 19, 2026 at 6:34 PM CET, Amir Goldstein wrote: > On Sun, Nov 15, 2026 at 7:04=E2=80=AFPM koraynilay = wrote: >> >> Implement provenance time (ptime) in ksmbd, as introduced in a >> previous commit ("vfs: add provenance time (ptime)"). >> >> Map it to SMB's CreationTime, making it settable by SMB clients. When >> reporting CreationTime to clients, prioritize ptime over da.create_time >> memorized in the user.DOSATTRIB xattr. > > That doesn't sound like the right thing to do. > > If the server stored a CreationTime that client had set, you cannot > override this. Ah, yes, but how would we handle older files which get a custom CreationTime both before (in the xattr) and after (in ptime) a kernel upgrade? > When the client sets CreationTime, the server can decide if it can and wa= nts > (may be a policy decision) to store CreationTime in PTIME and not store > it in user.DOSATTRIB. To fix the above problem we should probably keep storing it in both ptime and the xattr though. > Fun fact: the user.DOSATTRIB format also has a mask so storing the > creation time inside it is also optional. With my current patch series applied, when CreationTime gets set by a client, ksmbd writes it to ptime and fixes/heals the xattr (=3D removing the CREATE_TIME flag created by older kernels, see the other fun fact below). And another fun fact: until [1] ksmbd ignored the flags and just read/wrote the attribs every time :) so that can only be honored for files that have been written to/updated with newer kernels. (That's why there is the ((flags & CREATE_TIME) || da.create_time > 0) in my patch, and not just the flag check) Thanks, koraynilay [1]: https://lore.kernel.org/linux-cifs/20261115155308.415734-1-koray.fra@g= mail.com/ > Thanks, > Amir. --305c4db69b4b7682b4927e5c7245ccd497c3eba9918a22ec95937c8c862e Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQSgVimKafU5DQMcjcDmj22qf5IGXAUCav9vXgAKCRDmj22qf5IG XM7AAPsG6qghsrCfCEnMzpWg6QyG3mDtqVzO2LuI2Jbx+5MdmwEAqDTU6SUvXvP1 4H1OcrcMro3Ek7i+OVcH9ZQ2xF4lngw= =LZNw -----END PGP SIGNATURE----- --305c4db69b4b7682b4927e5c7245ccd497c3eba9918a22ec95937c8c862e--