Re: [PATCH RFC 10/12] userns: Convert xfs to use kuid/kgid/kprojid where appropriate
From: Eric W. Biederman
Date: Sun Feb 17 2013 - 20:26:04 EST
Dave Chinner <david@xxxxxxxxxxxxx> writes:
> On Wed, Feb 13, 2013 at 10:13:16AM -0800, Eric W. Biederman wrote:
>
>> The crazy thing is that is that xfs appears to
>> directly write their incore inode structure into their journal.
>
> Off topic, but it's actually a very sane thing to do. It's called
> logical object logging, as opposed to physical logging like ext3/4
> and ocfs2 use. XFS uses a combination of logical logging
> (superblock, dquots, inodes) and physical logging (via buffers).
Not putting your structures in disk-endian before putting them on-disk
seems silly. As far as I can tell if you switch endianness of the
machine accessing your xfs filesystem and have to do a log recover
it won't work because a lot of the log entries will appear corrupted.
It also seems silly to require your in-memory structure to be binary
compatibile with your log when you immediately copy that structure to
another buffer when it comes time to queue a version of it to put into
the log.
The fact that you sometimes need to allocate memory and make a copy so
you can stuff your data into the logvec whose only purpose is to then
copy the data a second time seems silly and wasteful.
Logical logging itself seems reasonable. I just find the implementation
in xfs odd.
It looks like with a few little changes xfs could retain backwards
compatibility with today, remove extra memory copies, and completely
decouple the format of the in-core structures with the format of the
on-disk structures. Allowing scary comments to be removed.
Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/