On Thu, 2007-04-05 at 04:08 +0200, Nick Piggin wrote:
> On Wed, Apr 04, 2007 at 04:32:24PM -0700, Badari Pulavarty wrote:
> > On Wed, 2007-04-04 at 16:17 -0700, Mark Fasheh wrote:
> > > On Wed, Apr 04, 2007 at 04:05:19PM -0700, Badari Pulavarty wrote:
> > > > Hmm.. Okay, only filesystems that could return AOP_TRUNCATED_PAGE
> > > > are ocf2 and gfs2. Now that both of them are switched to have
> > > > write_begin()/write_end(), why do we need this code to handle
> > > > AOP_TRUNCATED_PAGE (in the else part) ? Can't we just cleanup/nuke
> > > > all the AOP_TRUNCATED_PAGE handling ?
> > > 
> > > We don't - I'm pretty sure that fs-no-AOP_TRUNCATED_PAGE.patch gets rid of
> > > them.
> > >   --Mark
> > 
> > It didn't, completely get rid of them :(
> 
> ->readpage can still return AOP_TRUNCATED_PAGE. Were there any from
> prepare_write or commit_write still around?
> 
> 

Not a big deal. But trying to understand it better.


int pagecache_write_begin()
{
 
        if (aops->write_begin) {
                return aops->write_begin(file, mapping, pos, len, flags,
                                                        pagep, fsdata);
        } else {
                .....
                ret = aops->readpage(file, page);
                page_cache_release(page);
                if (ret) {
                        if (ret == AOP_TRUNCATED_PAGE)
                                        goto again;
                        return ret;
                }
                goto again;
                
              ....
        }
}

filesystems (ocfs2, gfs2) which can return AOP_TRUNCATED_PAGE for
prepare_write or readpage would never come to this case. They
have write_begin() method set. Isn't it ? Why this check ?

Thanks,
Badari


-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to