[Top] [All Lists]

Re: What should to do with ASSERT failed

To: Mike Gao <ygao.linux@xxxxxxxxx>
Subject: Re: What should to do with ASSERT failed
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Wed, 1 Sep 2010 09:39:47 +1000
Cc: xfs@xxxxxxxxxxx
In-reply-to: <AANLkTi=CVi5F4qMtWAgxneA_NcJgGSogK-G1x4awtOSz@xxxxxxxxxxxxxx>
References: <AANLkTin-zf0chkk68pGfwDRt03QaKmNdsP3=goDEUS+p@xxxxxxxxxxxxxx> <4C7C26E8.9070308@xxxxxxxxxxx> <AANLkTinXDQoo7ZU+w2V7N7zBrxdS=Tc71MNZ7M4R5A9w@xxxxxxxxxxxxxx> <20100831003050.GL705@dastard> <AANLkTi=CVi5F4qMtWAgxneA_NcJgGSogK-G1x4awtOSz@xxxxxxxxxxxxxx>
User-agent: Mutt/1.5.20 (2009-06-14)
On Tue, Aug 31, 2010 at 05:50:06PM -0500, Mike Gao wrote:
> What kind of logic there could be?
> I notice that in old version, if page has no buffer in writepage, then xfs
> will create a empty buffer and attach to page. This logic there at least
> untill 2.6.33. But now xfs need this never happens (assert) when coming to
> writepage.  But I guess, when use mmap, there is no buffer attach to page
> because it operates on page directly on kernel. xfs should create buffer
> before submit bio. There must be sth I don't know. Maybe sbd can help me
> out.

mmap() pages used to be special because they weren't tagged
correctly when the page was dirtied. Nowdays the ->page_mkwrite
interface captures those and does the correct processing at page
fault time to set up the buffers. Hence we should never see an
unmapped dirty buffer in writeback. ->page-mkwrite was introduced
around 2.6.18 IIRC, but there has been changes to the way it works
since then. Maybe it is not functioning correctly on your kernel?

However, this is just one example of how buffers are handled
differently _outside XFS_ on older kernels. Nobody will be able to
give you a definitive list of what has changed - you'll only find
those by trolling git logs or testing and tripping over them.

As it is, I'm curious why you are backporting to such an old kernel
rather than just using a newer kernel. Using a newer kernel would
save you a lot of time and effort....


Dave Chinner

<Prev in Thread] Current Thread [Next in Thread>