[Ocfs2-devel] [PATCH] Treat writes as new when holes span across page boundaries

Joel Becker jlbec at evilplan.org
Tue Feb 22 13:54:28 PST 2011


On Tue, Feb 22, 2011 at 01:39:28PM -0800, Joel Becker wrote:
> On Tue, Feb 22, 2011 at 01:02:13PM -0600, Goldwyn Rodrigues wrote:
> > On Tue, Feb 22, 2011 at 2:36 AM, Joel Becker <jlbec at evilplan.org> wrote:
> > >        Please try the attached patch and see if it fixes the problem.
> > > It should work on its own, without your changes.  If I have it wrong,
> > > we'll continue to evaluate the problem.  I'd test it myself, but my VM
> > > setup is currently broken.
> > >
> > 
> > It does not work. However, it shows the behavior similar to "nosparse"
> > without patch. So, I would say what you are targeting is achieved but
> > another problem resurfaces. This is because nothing zeros pages beyond
> > i_size in ocfs2_map_page_blocks(), since we return early because of -
> > 
> >         if (ret == 0 || !new)
> >                 return ret;
> 
> 	Returning here is correct, because ret should == 0.  The new
> part is about zeroing in the case of error.  We should obviously handle
> it better before we get to this line.
> 	I like that we come in line nosparse and sparse.  What does
> tailtest do for you?  Does it fail or succeed?

	Looking some more.  ocfs2_zero_tail() is supposed to handle
this, isn't it?  ocfs2_write_begin_nolock() calls ocfs2_zero_tail(pos),
which calls ocfs2_zero_extend(pos), which works up to
ocfs2_clusters_for_bytes(pos).  Doesn't this include your cluster?
Shouldn't the page already be loaded into the pagecache with zeros?

Joel

-- 

Life's Little Instruction Book #511

	"Call your mother."

			http://www.jlbec.org/
			jlbec at evilplan.org



More information about the Ocfs2-devel mailing list