On Sunday 25 November 2007 20:50:56 Erez Zadok wrote:
> In message <[EMAIL PROTECTED]>, Paul Hewlett writes:
> > Please ignore previous post - here is correct patch (apologies)
> >
> > diff -urN unionfs.org/dentry.c unionfs/dentry.c
> > --- unionfs.org/dentry.c    2007-11-22 13:08:11.000000000 +0200
> > +++ unionfs/dentry.c        2007-11-20 09:32:24.000000000 +0200
> > @@ -268,7 +268,7 @@
> >     /* remove all non-private mappings */
> >     unmap_mapping_range(inode->i_mapping, 0, 0, 0);
> >
> > -   if (inode->i_data.nrpages)
> > +   if (mapping_nrpages(&inode->i_data))
> >             truncate_inode_pages(&inode->i_data, 0);
> >  }
> >
> > diff -urN unionfs.org/super.c unionfs/super.c
> > --- unionfs.org/super.c     2007-11-22 13:07:46.000000000 +0200
> > +++ unionfs/super.c 2007-11-20 09:32:10.000000000 +0200
> > @@ -71,7 +71,7 @@
> >  {
> >     i_size_write(inode, 0); /* every f/s seems to do that */
> >
> > -   if (inode->i_data.nrpages)
> > +   if (mapping_nrpages(&inode->i_data))
> >             truncate_inode_pages(&inode->i_data, 0);
> >
> >     clear_inode(inode);
>
> Paul, the problem with this patch, as I alluded to in my previous email, is
> that unionfs won't compile unless the RT patches are applied: the vanilla
> kernel doesn't have a mapping_nrpages() function.  I'd like to avoid
> keeping two sets of unionfs-patches, one for RT users and one for those who
> don't use RT.  I could have created a simple wrapper macro to replace
> mapping_nrpages when the RT patches are not applied, but I can't b/c the RT
> patches also changed the nrpages field to __nrpages; there's no way to
> discover that difference at cpp/compile time (I'll need to use an Autoconf
> macro ala AC_CHECK_STRUCT_FIELD :-)
>
> What I can do in the mean time is keep such unionfs RT patches available on
> the Web site.
>
> Cheers,
> Erez.
Erez

Sorry - I misunderstood you - I thiught you only wanted to use the mapping 
function in all cases. Another patch to follow

Paul


-- 
Paul Hewlett  Technical Director 
Global Call Center Solutions Ltd, 2nd Floor, Milnerton Mall
Cnr Loxton & Koeberg Roads, 7435 Milnerton
www.gccs.co.za
Tel: +27 86 111 3433 Fax: +27 86 111 3520 Cel: +27 76 072 7906
VOIP: 087 750 7474

_______________________________________________
unionfs mailing list: http://unionfs.filesystems.org/
unionfs@mail.fsl.cs.sunysb.edu
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs

Reply via email to