I think mips folks agree with the change. I really wish to have there comment.<div><br></div><div>I also wish to know do we really need fix in XFS for virtual indexed architecture, I think its generic issue as many architecture now use VIVT or VIPT caches. Do we want to say XFS is relatively unstable with virtual indexed architecture ?</div>
<div> </div><div><br><div class="gmail_quote">On Thu, Nov 11, 2010 at 10:27 AM, Ajeet Yadav <span dir="ltr">&lt;<a href="mailto:ajeet.yadav.77@gmail.com">ajeet.yadav.77@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Coming back to problem, I wish to know about this problem<div><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse"><div class="im"><div>Linux XFS version : 2.6.34</div><div>Architecure: MIPS</div>

<div>I am getting the following error during mount.</div><div> </div></div><div><div></div><div class="h5"><div>XFS mounting filesystem sda2<br>Starting XFS recovery on filesystem: sda2 (logdev: internal)<br>XFS internal error XFS_WANT_CORRUPTED_GOTO at line 1518 of file fs/xfs/xfs_alloc.c.  Caller 0x801174a0<br>

Call Trace:<br>[&lt;800050bc&gt;] dump_stack+0x8/0x34<br>[&lt;80115254&gt;] xfs_free_ag_extent+0x128/0x7a8<br>[&lt;801174a0&gt;] xfs_free_extent+0xa0/0xcc<br>[&lt;80155278&gt;] xlog_recover_process_efi+0x15c/0x210<br>[&lt;801553cc&gt;] xlog_recover_process_efis+0xa0/0x12c<br>

[&lt;8015590c&gt;] xlog_recover_finish+0x28/0xcc<br>[&lt;8015d4fc&gt;] xfs_mountfs+0x4f0/0x5d0<br>[&lt;801758d8&gt;] xfs_fs_fill_super+0x158/0x360<br>[&lt;8008b67c&gt;] get_sb_bdev+0x11c/0x1c4<br>[&lt;801734e0&gt;] xfs_fs_get_sb+0x20/0x2c<br>

[&lt;80089cd0&gt;] vfs_kern_mount+0x68/0xd0<br>[&lt;80089d9c&gt;] do_kern_mount+0x54/0x118<br>[&lt;800a4e98&gt;] do_mount+0x7f0/0x86c<br>[&lt;800a4fb0&gt;] sys_mount+0x9c/0xf8<br>[&lt;80002124&gt;] stack_done+0x20/0x3c<br>

 <br>Filesystem &quot;sda2&quot;: XFS internal error xfs_trans_cancel at line 1161 of file fs/xfs/xfs_trans.c.  Caller 0x801552f8<br> <br>Call Trace:<br>[&lt;800050bc&gt;] dump_stack+0x8/0x34<br>[&lt;801601f0&gt;] xfs_trans_cancel+0x88/0x118<br>

[&lt;801552f8&gt;] xlog_recover_process_efi+0x1dc/0x210<br>[&lt;801553cc&gt;] xlog_recover_process_efis+0xa0/0x12c<br>[&lt;8015590c&gt;] xlog_recover_finish+0x28/0xcc<br>[&lt;8015d4fc&gt;] xfs_mountfs+0x4f0/0x5d0<br>[&lt;801758d8&gt;] xfs_fs_fill_super+0x158/0x360<br>

[&lt;8008b67c&gt;] get_sb_bdev+0x11c/0x1c4<br>[&lt;801734e0&gt;] xfs_fs_get_sb+0x20/0x2c<br>[&lt;80089cd0&gt;] vfs_kern_mount+0x68/0xd0<br>[&lt;80089d9c&gt;] do_kern_mount+0x54/0x118<br>[&lt;800a4e98&gt;] do_mount+0x7f0/0x86c<br>

[&lt;800a4fb0&gt;] sys_mount+0x9c/0xf8<br>[&lt;80002124&gt;] stack_done+0x20/0x3c<br> <br>xfs_force_shutdown(sda2,0x8) called from line 1162 of file fs/xfs/xfs_trans.c.  Return address = 0x80160204<br>Filesystem &quot;sda2&quot;: Corruption of in-memory data detected.  Shutting down filesystem: sda2<br>

Please umount the filesystem, and rectify the problem(s)<br>Failed to recover EFIs on filesystem: sda2<br>XFS: log mount finish failed</div><div> </div><div>With Regards</div><div>Ajeet Yadav</div></div></div></span><div>
<div></div><div class="h5"><br><div class="gmail_quote">
On Tue, Nov 9, 2010 at 7:35 PM, Christoph Hellwig <span dir="ltr">&lt;<a href="mailto:hch@infradead.org" target="_blank">hch@infradead.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi Ajeet,<br>
<div><br>
On Tue, Nov 09, 2010 at 04:43:04PM +0530, Ajeet Yadav wrote:<br>
&gt; True, its the same system and you were right it was cache VIPT cache problem<br>
&gt; the cache hold the stale value even after xlog_bread() update the buffer.<br>
&gt; I do not know whether its correct ways to resolve the problem, but the<br>
&gt; problem no longer occur.<br>
<br>
</div>It seems like you more less re-implemented the vmap coherency hooks<br>
inside XFS, hardcoded to the mips implementation.<br>
<br>
The actual helpers would looks something like:<br>
<br>
static inline void flush_kernel_vmap_range(void *addr, int size)<br>
{<br>
        dma_cache_inv(addr, size);<br>
}<br>
<br>
static inline void invalidate_kernel_vmap_range(void *addr, int size)<br>
{<br>
        dma_cache_inv(addr, size);<br>
}<br>
<br>
For some reason the kernel also expects flush_dcache_page to be<br>
implemented by an architecture if we want to implement these two<br>
(it&#39;s keyed off ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE).<br>
<br>
Can someone of the mips folks helps with this?<br>
<br>
The testcase is easy, mounting an xfs filesystem after an unclean<br>
shutdown on a machine with virtually indexed caches.<br>
<br>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div>