public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: "Theodore Tso" <tytso@mit.edu>
To: Artem Blagodarenko <artem.blagodarenko@gmail.com>
Cc: linux-ext4@vger.kernel.org, adilger.kernel@dilger.ca
Subject: Re: [PATCH 0/3] Data in direntry (dirdata) feature
Date: Sat, 18 Apr 2026 17:43:59 -0400	[thread overview]
Message-ID: <20260418214359.GA58909@macsyma-wired.lan> (raw)
In-Reply-To: <20260417213723.74204-1-artem.blagodarenko@gmail.com>

Hi Artem,

Thank you for sending this patch.  My primary concern with it is that
it seems to be optimized for minimizing the changes for the
out-of-tree Lustre Server patches, but not for necessasrily from the
upstream perspective.

First, there is no way to actually set any dirdata feature using just
the upstream patch.  Presumably, the out-of-tree Lustre patches call
ext4_insert_dentry_data() with a non-NULL data, or add_dirent_to_buf()
in fs/ext4/namei.c was further patched so that the data variable on
the stack gets set to a non-NULL --- but in your patches, data is
always NULL, which manes the data passed into
ext4_insert_dentry_data() is always NULL.

Since there is no way to actually set dirdata after the upstream
kernel, nor is there any way to set the dirdata using debugfs (the
patches to e2fsprogs only affect e2fsck, and there is no way to
examine the dirdata or set dirdata via debugfs), it's going to make it
very hard to test the kernel patches without using pre-existing file
system images.  I haven't seen the xfstests patches from you yet, but
this is the only way you could test the code paths as far as I can
tell.

Secondly, there are a lot of changes because you rename functions like
ext4_dir_rec_len() to ext4_dirent_rec_len() and ext4_insert_dirent()
to ext4_insert_dentry_data().  Especially for the ext4_dir_rec_len()
change, it's not strictly speaking necessary, and while I can see the
argument that it might make it more readable / understandable, if you
*really* want to do the rename, it's better to break that out into a
separate patch which *just* renames the function, and then change the
function prototype in a subsequent patch.


As far as how get this patch upstream, the challenge with LUFID (and
dirdata in general), is that the dirdata has to set when the directory
entry is created, and is immutable afterwards.  And so if we want to
have a way to create directory entries with an LUFID, we either need
to (a) use the out-of-tree Lustre patches, (b) plumb through some new
interface through the VFS and potentially some new openat3() system
call, or (c) add some new ext4 ioctl EXT4_IOC_SET_LUFID which sets the
LUFID on an already existing pathname.

(c) is problematic since it's a different code path than what the
Lustre server would use, and it would require using the dentry used to
opened the file to decide which directory entry to mutate, and it also
violates the presumption that the directory entry's dirdata is
immutable after the directory entry is created.

Speaking of which, I'm really confused with *why* the LUFID is being
stored in the diretory entry.  From what I can tell, from [1], the FID
is essentially a distributed inode number.  Given that, why isn't the
LUFID stored in an xattr?  What am I missing?

[1] https://wiki.lustre.org/Understanding_Lustre_Internals

						- Ted

  parent reply	other threads:[~2026-04-18 21:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-17 21:37 [PATCH 0/3] Data in direntry (dirdata) feature Artem Blagodarenko
2026-04-17 21:37 ` [PATCH 1/3] ext4: make dirdata work with metadata_csum Artem Blagodarenko
2026-04-17 21:37 ` [PATCH 2/3] ext4: add dirdata support structures and helpers Artem Blagodarenko
2026-04-17 21:37 ` [PATCH 3/3] ext4: dirdata feature Artem Blagodarenko
2026-04-18  6:47 ` [syzbot ci] Re: Data in direntry (dirdata) feature syzbot ci
2026-04-18 21:43 ` Theodore Tso [this message]
2026-04-18 22:24   ` [PATCH 0/3] " Artem Blagodarenko
2026-04-19  0:47     ` Theodore Tso
2026-04-19 19:37       ` Artem Blagodarenko
2026-04-19 21:57         ` Theodore Tso

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=20260418214359.GA58909@macsyma-wired.lan \
    --to=tytso@mit.edu \
    --cc=adilger.kernel@dilger.ca \
    --cc=artem.blagodarenko@gmail.com \
    --cc=linux-ext4@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox