Namespaces in operation, part 5: User namespaces
Namespaces in operation, part 5: User namespaces
Posted Feb 27, 2013 22:11 UTC (Wed) by ebiederm (subscriber, #35028)In reply to: Namespaces in operation, part 5: User namespaces by einstein
Parent article: Namespaces in operation, part 5: User namespaces
That is what the remaining XFS work is about ensuring that XFS doesn't mix user space uids with in-kernel uids without adding the appropriate translations, and making it hard to mess confuse those two kinds of uids in the future. XFS has a very unique architecture for it's in-kernel filesystem data structures and many more user facing ioctls than most filesystems which means it can't be treated like just another filesystem.
What was not mentioned is that when a process in a user namespace interacts files, the interaction is the same as interacting with processes. When a file is created the uid of the process is mapped into the initial user namespace those mapped uids are stored on disk. Meanwhile when the process in a user namespace stats those files the uids are mapped back into it's namespace so it sees the uids it wrote with instead of the uids that are stored on disk.
This allows quotas and other filesystem features to work with user namespaces without any changes to the on-disk format.