Re: [PATCH] direct IO breaks root filesystem

From: Martin Dalecki (dalecki@evision-ventures.com)
Date: Tue Dec 11 2001 - 13:03:07 EST


Linus Torvalds wrote:
>
> On Tue, 11 Dec 2001, GOTO Masanori wrote:
> >
> > Accessing with inode size unit (== 4096 byte) is ok, but if I accessed
> > with block size unit, generic_direct_IO() returns error. The reason
> > is that blocksize is designated as inode->i_blkbits, and its value is
> > not disk minimal block size (512), but inode's unit size (4096).
>
> Actually, I now found the _real_ bug that explains both the "inode->i_dev"
> _and_ the block size problem.
>
> We have the wrong inode.
>
> We use the on-disk inode, which is NOT the same as the "mapping" inode for
> actually doing the IO.
>
> This simple (and completely untested) patch should fix it.
>
> This two-liner should also actually make the previous patch completely
> unnecessary, because now "inode->i_dev" should be automatically correct. I
> should have realized that inode->i_dev should always be right, and have
> thought more about the fact that it wasn't.

Hah! This is explainig well, why my private experiment
to make the ext3_inode_info ext3_i field in struct inode
a pointer is still failing maliciously some how during the
booting of the system (actually the init proces goes
really after some [ OK ] optics. And this despite the
fact that there are currently only two VFS entry points
where a fresh new filesystem specific inode can be allocated.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Dec 15 2001 - 21:00:21 EST