[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87621qpg4o.fsf@xmission.com>
Date: Sun, 17 Feb 2013 17:25:43 -0800
From: ebiederm@...ssion.com (Eric W. Biederman)
To: Dave Chinner <david@...morbit.com>
Cc: Alex Elder <elder@...nel.org>,
Linux Containers <containers@...ts.linux-foundation.org>,
linux-kernel@...r.kernel.org, Ben Myers <bpm@....com>,
linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH RFC 10/12] userns: Convert xfs to use kuid/kgid/kprojid where appropriate
Dave Chinner <david@...morbit.com> 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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists