XFS: the filesystem of the future?
XFS: the filesystem of the future?
Posted Mar 6, 2012 0:49 UTC (Tue) by nybble41 (subscriber, #55106)In reply to: XFS: the filesystem of the future? by XTF
Parent article: XFS: the filesystem of the future?
> Not really
In that case, why did you say that on-disk inodes do not fit within one physical sector? That is filesystem-specific, and I certainly know of some where the full inode size is less than or equal to 512 bytes; ext2 is at least capable of being configured that way.
>> True, if you want to implement full copy-on-write semantics. I was going for a simpler approach which can be implemented by almost any filesystem with no on-disk structure changes.
> What do you mean by full copy-on-write semantics?
> What on-disk structure changes would be required to do this in ext4 for example?
Perhaps none. I didn't mean to imply that it was impossible to implement atomic replacement of partial files without changing the on-disk structure; I simply hadn't proved to myself that it could be done easily. In retrospect it probably could be done, though you would run into the aforementioned fragmentation issues common to most C.O.W. filesystems.
The biggest complication is not on disk but in memory; you would need to modify the filesystem code to account for the shared data blocks, of which there may be as many alternate versions as there are O_ATOMIC file descriptors--unless O_ATOMIC is exclusive, of course.
Posted Mar 6, 2012 12:55 UTC (Tue)
by XTF (guest, #83255)
[Link]
You're right, inodes typically do fit in a sector.
> unless O_ATOMIC is exclusive, of course.
Having a reader and a writer or multiple writers at the same time is always problematic.
XFS: the filesystem of the future?
What I wanted to say is that a meta-data transaction usually involves multiple parts / sectors. Providing consistency guarantees after a crash is hard without a journal.