All of lore.kernel.org
 help / color / mirror / Atom feed
From: "koraynilay" <koray.fra@gmail.com>
To: "Amir Goldstein" <amir73il@gmail.com>,
	"koraynilay" <koray.fra@gmail.com>
Cc: "Pali Rohár" <pali@kernel.org>, "David Sterba" <dsterba@suse.com>,
	"Namjae Jeon" <linkinjeon@kernel.org>,
	"Sungjong Seo" <sj1557.seo@samsung.com>,
	"Alexander Viro" <viro@zeniv.linux.org.uk>,
	"Christian Brauner" <brauner@kernel.org>,
	"Trond Myklebust" <trondmy@kernel.org>,
	"Anna Schumaker" <anna@kernel.org>,
	"Chuck Lever" <cel@kernel.org>,
	"Jeff Layton" <jlayton@kernel.org>,
	"Konstantin Komarov" <almaz.alexandrovich@paragon-software.com>,
	"Paulo Alcantara" <pc@manguebit.org>,
	"Chris Mason" <mason@kernel.org>,
	"Yuezhang Mo" <yuezhang.mo@sony.com>, "Jan Kara" <jack@suse.cz>,
	NeilBrown <neil@brown.name>,
	"Olga Kornievskaia" <okorniev@redhat.com>,
	"Dai Ngo" <Dai.Ngo@oracle.com>, "Tom Talpey" <tom@talpey.com>,
	"Ronnie Sahlberg" <ronniesahlberg@gmail.com>,
	"Shyam Prasad N" <sprasad@microsoft.com>,
	"Bharath SM" <bharathsm@microsoft.com>,
	"Sergey Senozhatsky" <senozhatsky@chromium.org>,
	ChenXiaoSong <chenxiaosong@chenxiaosong.com>,
	"Darrick J . Wong" <djwong@kernel.org>,
	"Sean Smith" <defendthedisabled@gmail.com>,
	"Andrey Albershteyn" <aalbersh@kernel.org>,
	"Pedro Falcato" <pfalcato@suse.de>,
	linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, exfat@lists.linux.dev,
	ntfs3@lists.linux.dev, linux-cifs@vger.kernel.org,
	linux-nfs@vger.kernel.org, linux-api@vger.kernel.org
Subject: Re: [RFC PATCH v4 09/10] ksmbd: add provenance time (ptime) and map it to CreationTime
Date: Fri, 20 Nov 2026 14:23:41 +0100	[thread overview]
Message-ID: <DN02K8EYWHSW.1FP154N0I9QCK@gmail.com> (raw)
In-Reply-To: <CAOQ4uxhqgsh9ahJsX7C4YyZH2n_r8VwOe9X9jZwsKALCoYvyag@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3462 bytes --]

On Fri Nov 20, 2026 at 7:03 AM CET, Amir Goldstein wrote:
> On Thu, Nov 19, 2026 at 11:25 PM koraynilay <koray.fra@gmail.com> wrote:
>>
>> On Thu Nov 19, 2026 at 11:09 PM CET, Pali Rohár 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 PM koraynilay <koray.fra@gmail.com> 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?
>> >
>> > 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 store
>> >> > it in user.DOSATTRIB.
>> >>
>> >> 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.
>>
>
> If you ask me, this is not your problem and I agree with Pali that
> this is a policy decision.
>
> I would not include this patch at all in the series if I were you.
> Maybe as a demo user, but you could just as well include a demo
> user application.

Ah, ok, fair.

> The nfsd user is a simpler demo, so as long as the nfsd maintainers
> are on the same page wrt the mutable btime plan, you could include
> it in your series.
>
> The problem you raise with DOSATTRIB xattr is similar to the problems
> that Chuck raised for ptime vs. btime as the source of FATTR4_TIME_CREATE

Ah right, I can see the parallel, tho before the ptime change you
couldn't modify the creation time at all from linux with nfsd, so in
that case unless a user manually changed it after a kernel upgrade, it
wouldn't have this desync problem (apart from a kernel downgrade).

Thanks,
koraynilay

> Thanks,
> Amir.



[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2026-11-20 13:23 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-15 18:03 [RFC PATCH v4 00/10] add provenance time (ptime) koraynilay
2026-11-15 18:03 ` [RFC PATCH v4 01/10] vfs: " koraynilay
2026-11-16 20:10   ` Amir Goldstein
2026-11-16 20:53     ` koraynilay
2026-11-15 18:03 ` [RFC PATCH v4 02/10] vfs: add fileattr_has_fsx_mask() koraynilay
2026-11-19 19:36   ` Amir Goldstein
2026-11-19 22:12     ` koraynilay
2026-11-15 18:03 ` [RFC PATCH v4 03/10] ntfs3: make crtime user-settable using ptime koraynilay
2026-11-20 15:58   ` Amir Goldstein
2026-11-15 18:03 ` [RFC PATCH v4 04/10] exfat: " koraynilay
2026-11-15 18:03 ` [RFC PATCH v4 05/10] btrfs: add provenance time (ptime) koraynilay
2026-11-15 18:03 ` [RFC PATCH v4 06/10] vfs: add __vfs_fileattr_set_locked() for inode_lock()'d callers koraynilay
2026-11-16 13:52   ` Amir Goldstein
2026-11-16 15:55     ` koraynilay
2026-11-15 18:03 ` [RFC PATCH v4 07/10] nfsd: add provenance time (ptime) via FATTR4_TIME_CREATE koraynilay
2026-11-17 22:01   ` Chuck Lever
2026-11-18  0:35     ` koraynilay
2026-11-18  7:44     ` Amir Goldstein
2026-11-18 16:09       ` Chuck Lever
2026-11-18 16:36         ` Amir Goldstein
2026-11-18 17:14           ` Chuck Lever
2026-11-18 17:23             ` koraynilay
2026-11-18 17:37             ` Amir Goldstein
2026-11-15 18:03 ` [RFC PATCH v4 08/10] nfs: " koraynilay
2026-11-19 18:06   ` Amir Goldstein
2026-11-19 22:10     ` koraynilay
2026-11-20  6:45       ` Amir Goldstein
2026-11-20 13:33         ` koraynilay
2026-11-20 14:55           ` Amir Goldstein
2026-11-20 15:21             ` koraynilay
2026-11-20 16:16               ` Amir Goldstein
2026-11-15 18:03 ` [RFC PATCH v4 09/10] ksmbd: add provenance time (ptime) and map it to CreationTime koraynilay
2026-11-19 17:34   ` Amir Goldstein
2026-11-19 21:51     ` koraynilay
2026-11-19 22:09       ` Pali Rohár
2026-11-19 22:25         ` koraynilay
2026-11-20  6:03           ` Amir Goldstein
2026-11-20 13:23             ` koraynilay [this message]
2026-11-15 18:03 ` [RFC PATCH v4 10/10] cifs: add provenance time (ptime) and map it to SMB's CreationTime koraynilay
2026-11-19 18:32   ` Amir Goldstein
2026-11-19 22:02     ` koraynilay
2026-11-20  6:34       ` Amir Goldstein
2026-11-20 14:05         ` koraynilay
2026-11-20 15:55           ` Amir Goldstein
2026-11-17 23:53 ` [RFC PATCH v4 00/10] add provenance time (ptime) Jeff Layton
2026-11-18  1:09   ` koraynilay
2026-11-18  8:14     ` Amir Goldstein
2026-11-18  9:34       ` koraynilay
2026-11-18 13:39         ` Amir Goldstein
2026-11-18 13:58           ` koraynilay
2026-11-18 13:45       ` Jeff Layton
2026-11-18 14:03         ` koraynilay
2026-11-18 14:26 ` Pali Rohár
2026-11-18 14:58   ` koraynilay
2026-11-18 15:16     ` Pali Rohár
2026-11-18 16:50       ` koraynilay
2026-11-18 17:22         ` Pali Rohár
2026-11-18 17:28         ` Amir Goldstein
2026-11-18 17:36           ` Jeff Layton
2026-11-18 17:50             ` Amir Goldstein
2026-11-18 17:37           ` Pali Rohár
2026-11-18 17:42             ` Amir Goldstein
2026-11-20 17:16           ` Christian Brauner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DN02K8EYWHSW.1FP154N0I9QCK@gmail.com \
    --to=koray.fra@gmail.com \
    --cc=Dai.Ngo@oracle.com \
    --cc=aalbersh@kernel.org \
    --cc=almaz.alexandrovich@paragon-software.com \
    --cc=amir73il@gmail.com \
    --cc=anna@kernel.org \
    --cc=bharathsm@microsoft.com \
    --cc=brauner@kernel.org \
    --cc=cel@kernel.org \
    --cc=chenxiaosong@chenxiaosong.com \
    --cc=defendthedisabled@gmail.com \
    --cc=djwong@kernel.org \
    --cc=dsterba@suse.com \
    --cc=exfat@lists.linux.dev \
    --cc=jack@suse.cz \
    --cc=jlayton@kernel.org \
    --cc=linkinjeon@kernel.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=mason@kernel.org \
    --cc=neil@brown.name \
    --cc=ntfs3@lists.linux.dev \
    --cc=okorniev@redhat.com \
    --cc=pali@kernel.org \
    --cc=pc@manguebit.org \
    --cc=pfalcato@suse.de \
    --cc=ronniesahlberg@gmail.com \
    --cc=senozhatsky@chromium.org \
    --cc=sj1557.seo@samsung.com \
    --cc=sprasad@microsoft.com \
    --cc=tom@talpey.com \
    --cc=trondmy@kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=yuezhang.mo@sony.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.