xfs
[Top] [All Lists]

Re: xfs + rmap?

To: linux-xfs@xxxxxxxxxxx
Subject: Re: xfs + rmap?
From: "Adam McKenna" <adam-dated-1013037030.8ff9f0@xxxxxxxxxxxx>
Date: Fri, 1 Feb 2002 15:10:30 -0800
In-reply-to: <1012604886.7434.489.camel@xxxxxxxxxxxxxxxxxxxx>
Mail-followup-to: linux-xfs@xxxxxxxxxxx
References: <20020201215351.GF23997@xxxxxxxxxxxx> <1012603950.25088.72.camel@UberGeek> <20020201225013.GH23997@xxxxxxxxxxxx> <1012604886.7434.489.camel@xxxxxxxxxxxxxxxxxxxx>
Sender: owner-linux-xfs@xxxxxxxxxxx
User-agent: Mutt/1.3.25i
On Fri, Feb 01, 2002 at 05:08:06PM -0600, Steve Lord wrote:
> On Fri, 2002-02-01 at 16:50, Adam McKenna wrote:
> > On Fri, Feb 01, 2002 at 04:52:30PM -0600, Austin Gonyou wrote:
> > > I'd be happy to help you out. I'm looking to test both -aa and rmap. 
> > > 
> > > what is your current procedure for merging this?
> > 
> > Right now I just applied both patches and I am looking at the .rej files.
> > 
> > Currently, here are the issues I'm seeing -- I'm using the 2.4.17 snapshot
> > from ftp://oss.sgi.com/projects/xfs/download/patches/2.4.17/.
> > 
> > issue 1 - fs/buffer.c:
> > 
> 
> This one is a little nasty in that it seems to remove the possibility of
> a failure at this point, and with xfs in there we do a write_buffer_locked
> call in place of the submit_bh we can definitely fail. I am guessing
> a little bit since I need more context to really work it out, and I
> am not really feeling like patching up yet another kernel version here.

How many have you patched up so far?  Does the list include an -ac? :)

> > issue 2 - vmscan.c - see http://flounder.net/vmscan.c.rej for the .rej file.
> 
> I think you should just apply the rmap patch to a vanilla kernel and
> take the resulting vmscan.c, then on the line which does this:
> 
>       if (PageDirty(page) && page->mapping) {
> 
> right at the end of the patch, change it to:
> 
>       if ((PageDirty(page) || DelallocPage(page)) && page->mapping) {
> 
> but I would really have to see the whole file to say for sure.

Here's the rmap12 code:

        if (PageDirty(page) && page->mapping) {
            /*
             * It is not critical here to write it only if
             * the page is unmapped beause any direct writer
             * like O_DIRECT would set the PG_dirty bitflag
             * on the physical page after having successfully
             * pinned it and after the I/O to the page is finished,
             * so the direct writes to the page cannot get lost.
             */
            int (*writepage)(struct page *);

            writepage = page->mapping->a_ops->writepage;
            if ((gfp_mask & __GFP_FS) && writepage) {
                ClearPageDirty(page);
                SetPageLaunder(page);
                page_cache_get(page);
                spin_unlock(&pagemap_lru_lock);

                writepage(page);
                page_cache_release(page);

                spin_lock(&pagemap_lru_lock);
                continue;
            }
        }

Does that help?

--Adam

-- 
Adam McKenna <adam@xxxxxxxxxxxx>   | GPG: 17A4 11F7 5E7E C2E7 08AA
http://flounder.net/publickey.html |      38B0 05D0 8BF7 2C6D 110A


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