All of lore.kernel.org
 help / color / mirror / Atom feed
* fstest generic/696 failure on ext4 fs with quotas+idmap
@ 2024-02-21 18:20 Luis Henriques
  2024-02-22 13:23 ` [PATCH] vfs: fix check for tmpfile support Christian Brauner
  2024-02-22 13:26 ` fstest generic/696 failure on ext4 fs with quotas+idmap Christian Brauner
  0 siblings, 2 replies; 7+ messages in thread
From: Luis Henriques @ 2024-02-21 18:20 UTC (permalink / raw)
  To: linux-ext4; +Cc: Christian Brauner

Hi!

The fstest generic/696 (and 697) fail on ext4 when the filesystem is
created with quota support (-O quota).  It's really easy to reproduce, and
it fails when doing the idmapped tests (setgid_create_umask_idmapped() and
setgid_create_umask_idmapped_in_userns()).

The failure happens when the test does an openat() with O_TMPFILE:

  ext4_tmpfile()
    __ext4_new_inode()
      dquot_initialize()
        dqget()

and at this point the error occurs:

	if (!qid_has_mapping(sb->s_user_ns, qid))
		return ERR_PTR(-EINVAL);

qid is '-1', which is invalid, but I'm failing to understand if it should
really be invalid or if dqget() should handle this invalid qid some other
way.  Earlier, __ext4_new_inode() called inode_init_owner(), which indeed
sets inode->i_uid with '-1'.

I've been trying to figure it out, but it's very tricky to follow all the
details, so I decided to ask here and see if anyone has any idea.  Is this
a known issue?  Maybe the issue is with the test itself, and not with
ext4, quota or idmapped code.

Cheers,
-- 
Luís

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-02-26  8:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-21 18:20 fstest generic/696 failure on ext4 fs with quotas+idmap Luis Henriques
2024-02-22 13:23 ` [PATCH] vfs: fix check for tmpfile support Christian Brauner
2024-02-22 14:05   ` Luis Henriques
2024-02-25 15:56     ` Zorro Lang
2024-02-26  8:56       ` Luis Henriques
2024-02-22 13:26 ` fstest generic/696 failure on ext4 fs with quotas+idmap Christian Brauner
2024-02-22 13:53   ` Luis Henriques

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.