xfs
[Top] [All Lists]

Re: xfs + rmap?

To: Adam McKenna <adam-dated-1013037030.8ff9f0@xxxxxxxxxxxx>
Subject: Re: xfs + rmap?
From: Steve Lord <lord@xxxxxxx>
Date: 01 Feb 2002 17:28:22 -0600
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: <20020201231030.GJ23997@xxxxxxxxxxxx>
References: <20020201215351.GF23997@xxxxxxxxxxxx> <1012603950.25088.72.camel@UberGeek> <20020201225013.GH23997@xxxxxxxxxxxx> <1012604886.7434.489.camel@xxxxxxxxxxxxxxxxxxxx> <20020201231030.GJ23997@xxxxxxxxxxxx>
Sender: owner-linux-xfs@xxxxxxxxxxx
On Fri, 2002-02-01 at 17:10, Adam McKenna wrote:
> 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? :)

The rpms on oss.sgi.com are -ac kernels.

> 
> > > 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?

Yep, just add the DelallocPage(page) test as I described.

Steve

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

Steve Lord                                      voice: +1-651-683-3511
Principal Engineer, Filesystem Software         email: lord@xxxxxxx


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