From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.41 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795127117; b=5Qk727OpCZeNKLWV9bfLPF9gVLlwJgAQ/ygWAeRSCK5CQy0mx3arNCvcITlm3boExzdo V1TmtSmxciKFEwaLehCCb5C0Z6CHOextkfjqf6i/zn0cLXgCf9Yce8BLeJzl/mvUNWXrh l1Mq3VxLw6dt9H9nqIOHH1I339IcAHAcrkt3uMiGuo61jdzUrACTYB5yONWlo1kPDHLvF NgGRdI5E6pbHWkeQ5vn25Fe50zjTQnXQEjw7byFU1vhv3ifRRaD4d8P0e8pVneIVhnncq 7LlOPsezHxiM4dALOim9WTfORb9KKnY051Ed+wAP4/p/e2daIgZLg00w2FAnJMOa1Ag== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795127117; 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=Wkkl/Lkl9FxKypByBkDGnsO1INO/Eqn1TaVyFB/5Zdc=; b=JBNUiOf5//wiTRX3hvrDK44wwQHCSXnr9Gd6+utcTeSjwevAWquOAY6Kee/fco26SW5j DcZhnIJb8gXeMMgNQQvM4snEHBg93ySTHFQbwZMO2zRpvN9tYUWU6pBoUohSOxGvRHGr3 F7SD1LCFWW3OysotyD4SyMMxhR3dWEQKKPQREi2kA+BojTl23X3he80EZV88I9m6BYmXF 3JD+taFMzbQEYmeoGc3f7u5oqw+FNRL4MLU+hi71vTB2QQkyHGTKnGKLyVtvxrCAy8d46 azR43Q2YEQLssBmOFZtQ/0xoZs37EL1DolIqWpSkuKMNa9fLGrktzhWG7zUPG1q/QaA== 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=cNzeBpWr; arc=none smtp.remote-ip=209.85.128.41 Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (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 3C5B1606A331 for ; Thu, 19 Nov 2026 22:25:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 3C5B1606A331 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=cNzeBpWr Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-4bb72b44a97so1866835e9.0 for ; Thu, 19 Nov 2026 14:25:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1795127115; x=1795731915; 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=Wkkl/Lkl9FxKypByBkDGnsO1INO/Eqn1TaVyFB/5Zdc=; b=cNzeBpWrgItO0o/7RGgPImOFVEr90D6Z6G7U3EeYqrD8wslqFl+MrRAtb2P44AF0yd dDuTWJb1SPD42yPpGSlydHa28n7VMGUhRKXSewGeLV52Pq5PSUaeLk3ZhLH+SWO+70Hy rlniiquZI8JIdX90R5zhFOmpYFAssDOIImf75zzjeL7gogwm2Xq9F1ENknGMHDmtwmxB XZ2XNP3gqQp8OASv8dS1bLhNTeHZCOemPLD9n81bJBqSIx7E2OGgzWj2qaeOmJuk+dgc 1u2ebfHJwRl6IBLrwoBqVSTwHqalkb0P1aQg4h4lFWRtuxo0RXqddtpTUr+PwfJ/mvRi dwdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795127115; x=1795731915; 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=Wkkl/Lkl9FxKypByBkDGnsO1INO/Eqn1TaVyFB/5Zdc=; b=kS1IMSryrqg3OcTrunWflhaMSctW+Fc3n3Rl4QGg9kJlvCY5ybzrboDO4VPr80EQ5u KUhYWkTEEKYtguKNcHelbbQZOZ+IKvGS5o0swX3+n2LGtLIqp8iWD2APwUajnKA5enN7 M1HmRzWeRFM4wVjHl2yxWxyroeCJYoQfZyTtDc/QaRaSp5GzzKKDaSe5HE6C1Hxe6Dfy jYu7ZQ8k5WKu8fghkAfV0ViHI+hlkdD7SAnhRdh61baQZX0CLOjJlK40v8VQPew68KF2 jI18Z8wqjNo9VuuQlHNerTCdFG0U7PYkrSRjppKUdlrCuNqSrqPFPeMv1ChV3JU5KTPU PEAA== X-Forwarded-Encrypted: i=1; AL+hErFwkn2pRhEj0LoWzHogkfJl8kZnPwb1UbpFbeHXplhZt8h+/U+6RHNqNKjJ7EXVnfkNZUtO4tho0BgUw+O/@vger.kernel.org X-Gm-Message-State: APuU4Z8aRYA9s0EYQp0NMLXJg2C+Wqu+/oP/GCVxYCswgL3dgn04y/6Q 2E4h6EreF2LVLFQ0ulw8OwVHgv0YskZt5YHAXEO0sij1igh/bsjlmZaI X-Gm-Gg: AYBFou3w+qUkoM0EvonQdJyLOss3YX2tE2yTacmK6rItpDeBrU6ITrAGPCSyhOikXkh M5wM2CdFe2mbqfVkQEY98a9NvKhFc2udcsmvwJAb3CyUXURImPAEQ9Eu5VXICJzwxxdlGyoYdaP E40tgXJbiE0E03bZVq3QXA4U9WeBIYMl6n/zb1ytkhLJX+a6ee577+HMrpqh/CAUnQyvZYzWmWN 8D5bmKyjJICZqyKyofyWZjQLnfgIC4T3d6BLAXsDwED27Ar1P4Snc9lymxo8jZUefYhfHlOygGA 8rKhHaaDrQze9jaDLUnMVTine1zV0TyPpxDJeEKYyr74VQ3rti8bcxYb/WsxGZcGDzbTTm4+D6p 6p9L+BUrXKFmi3JuQD1mqfeZhXtgufjmfgUi231GHxj/w2ygyzuW99d7Bwd0/NN6WA7Eihr55/7 fSCQq2DOquyVHyBViU+0D4h0lHSIjnkmVm2k6MF6RrzMFG+51m3Q+RL5j9t0MxvLIlSJTEGN1C9 0UXl0wP0yJWKno3gDHXWpPwTO+OLpvl+j4GlX9ouFryLJF8RPsCnKkV2ME/YoFCcmS7cVv3Naxq 0/bMtmKI8aO1fIIVIuZ3x/lhjw== X-Received: by 2002:a05:600c:4f16:b0:4a2:47:b79c with SMTP id 5b1f17b1804b1-4bb8882a66emr22851135e9.32.1795127115405; Thu, 19 Nov 2026 14:25:15 -0800 (PST) Received: from localhost ([2001:b07:5d26:7a6a:365a:60ff:fe0d:cfc6]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb884ab091sm42979175e9.11.2026.11.19.14.25.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 19 Nov 2026 14:25:14 -0800 (PST) X-Mailing-List: linux-fsdevel@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=4e96d6451976e17ba3b9883f217aebe13853d9371cfaf2050bcd9e7d05d2; micalg=pgp-sha512; protocol="application/pgp-signature" Date: Thu, 19 Nov 2026 23:25:12 +0100 Message-Id: Cc: "Amir Goldstein" , "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" , , , , , , , , Subject: Re: [RFC PATCH v4 09/10] ksmbd: add provenance time (ptime) and map it to CreationTime From: "koraynilay" To: =?utf-8?q?Pali_Roh=C3=A1r?= , "koraynilay" X-Mailer: aerc 0.22.0-0-gc2f86b7abde3 References: <20261115180343.576773-1-koray.fra@gmail.com> <20261115180343.576773-10-koray.fra@gmail.com> <20261119220936.mssmaixcorn2gzli@pali> In-Reply-To: <20261119220936.mssmaixcorn2gzli@pali> --4e96d6451976e17ba3b9883f217aebe13853d9371cfaf2050bcd9e7d05d2 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 On Thu Nov 19, 2026 at 11:09 PM CET, Pali Roh=C3=A1r wrote: > On Thursday 19 November 2026 22:51:26 koraynilay wrote: >> 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_ti= me >> >> 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. >>=20 >> 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? > > Just to note that this problem is already there. ksmbd can export for > example ntfs filesystem on removable disk. And this removable disk can > be connected to Windows machine which will always only touch > CreationTime and ignores xattr DOSATTRIB. > >> > When the client sets CreationTime, the server can decide if it can and= wants >> > (may be a policy decision) to store CreationTime in PTIME and not stor= e >> > it in user.DOSATTRIB. >>=20 >> To fix the above problem we should probably keep storing it in both >> ptime and the xattr though. > > IMHO for a long term solution it is better to not have duplicated > information in xattr. Because duplicated information are going to be > out-of-sync. Windows NTFS driver will not update xattr DOSATTRIB. Yeah, to avoid out-of-sync issues is why I made ksmbd prefer ptime over the xattr's CreationTime. > > For me it looks like that this needs some policy / configuration > decision done by user. We do not know if the user will replug that disk > also to Windows NTFS driver (and then those xattr DOSATTRIB could cause > out-of-sync issues) or will only use it from Linux or Samba and then > xattr DOSATTRIB is probably fine. I'm not sure if this is the best solution, it doesn't feel too right to me, but maybe there isn't a better one. Thanks, koraynilay >> > Fun fact: the user.DOSATTRIB format also has a mask so storing the >> > creation time inside it is also optional. >>=20 >> 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). >>=20 >> 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) >>=20 >> Thanks, >> koraynilay >>=20 >> [1]: https://lore.kernel.org/linux-cifs/20261115155308.415734-1-koray.fr= a@gmail.com/ >>=20 >> > Thanks, >> > Amir. >>=20 >>=20 --4e96d6451976e17ba3b9883f217aebe13853d9371cfaf2050bcd9e7d05d2 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQSgVimKafU5DQMcjcDmj22qf5IGXAUCav93SAAKCRDmj22qf5IG XCh1AQDHwCluN/PD1HO+ivE2XkUxV2Zyx9D+P9Mq0OOkUf4W5gEA15FUsuExyJyj iwFtbJlvhrNrDKohBVZXaAkjbhxknwA= =N4cE -----END PGP SIGNATURE----- --4e96d6451976e17ba3b9883f217aebe13853d9371cfaf2050bcd9e7d05d2--