Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

doc: correcting the idmapping mount example

In step 2, we obtain the kernel id `k1000`. So in next step (step
3), we should translate the `k1000` not `k21000`.

Signed-off-by: Hongbo Li <lihongbo22@huawei.com>
Link: https://lore.kernel.org/r/20240816063611.1961910-1-lihongbo22@huawei.com
Signed-off-by: Christian Brauner <brauner@kernel.org>

authored by

Hongbo Li and committed by
Christian Brauner
3717bbcb 1aeb6def

+4 -4
+4 -4
Documentation/filesystems/idmappings.rst
··· 821 821 /* Map the userspace id down into a kernel id in the filesystem's idmapping. */ 822 822 make_kuid(u0:k20000:r10000, u1000) = k21000 823 823 824 - 2. Verify that the caller's kernel ids can be mapped to userspace ids in the 824 + 3. Verify that the caller's kernel ids can be mapped to userspace ids in the 825 825 filesystem's idmapping:: 826 826 827 827 from_kuid(u0:k20000:r10000, k21000) = u1000 ··· 854 854 /* Map the userspace id down into a kernel id in the filesystem's idmapping. */ 855 855 make_kuid(u0:k0:r4294967295, u1000) = k1000 856 856 857 - 2. Verify that the caller's kernel ids can be mapped to userspace ids in the 857 + 3. Verify that the caller's kernel ids can be mapped to userspace ids in the 858 858 filesystem's idmapping:: 859 859 860 - from_kuid(u0:k0:r4294967295, k21000) = u1000 860 + from_kuid(u0:k0:r4294967295, k1000) = u1000 861 861 862 862 So the ownership that lands on disk will be ``u1000``. 863 863 ··· 994 994 /* Map the userspace id down into a kernel id in the filesystem's idmapping. */ 995 995 make_kuid(u0:k0:r4294967295, u1000) = k1000 996 996 997 - 2. Verify that the caller's filesystem ids can be mapped to userspace ids in the 997 + 3. Verify that the caller's filesystem ids can be mapped to userspace ids in the 998 998 filesystem's idmapping:: 999 999 1000 1000 from_kuid(u0:k0:r4294967295, k1000) = u1000