Thread (73 messages) 73 messages, 8 authors, 2021-03-13

Re: [PATCH v6 39/40] xfs: support idmapped mounts

From: Christoph Hellwig <hch@lst.de>
Date: 2021-03-04 00:27:21
Also in: linux-api, linux-ext4, linux-fsdevel, linux-integrity, linux-xfs, selinux

On Mon, Mar 01, 2021 at 12:05:20PM -0800, Darrick J. Wong wrote:
quoted
+	if (breq->mnt_userns != &init_user_ns) {
+		xfs_warn_ratelimited(breq->mp,
+			"bulkstat not supported inside of idmapped mounts.");
+		return -EINVAL;
Shouldn't this be -EPERM?

Or -EOPNOTSUPP?
-EINVAL is what we return for all our nor suppored ioctls, so I think it
is the right choice here, and should generally trigger the right
fallbacks.
Also, I'm not sure why bulkstat won't work in an idmapped mount but
bulkstat_single does?  You can use the singleton version to stat inodes
that aren't inside the submount.
Looking at it again I think we should fail BULKSTAT_SINGLE as well.
I had somehow assumed BULKSTAT_SINGLE would operate on the inode of
the open file, in which case it would be fine.  But it doesn't so that
argument doesn't count.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help