[Ocfs2-devel] [PATCH] ocfs2: fix ocfs2_page_mkwrite path

Mark Fasheh mfasheh at suse.com
Mon Jan 24 16:36:41 PST 2011


On Mon, Jan 24, 2011 at 03:59:24PM -0800, Joel Becker wrote:
> On Mon, Jan 24, 2011 at 03:54:25PM -0800, Mark Fasheh wrote:
> > And instead I'd rather see:
> > 
> >         ret = ocfs2_grab_pages_for_write(mapping, wc, wc->w_cpos, pos, len,
> >                                          cluster_of_pages, mmap_page);
> >         if (ret) {
> > 		if (ret == -EWHATEVER) {
> 
> 	Ok, so what is EWHATEVER?

-EINVAL? That's what we used to return from ocfs2_grab_pages_for_write().
The only other possible return value right now is ENOMEM so we could pick
anything really.

errno values aren't very descriptive, which sucks (but that's what we have
to deal with).


Then again, if we want to be super explicit we could also just do:

#define	EMAPPINGCHANGED	1
int ocfs2_grab_pages_for_write( ... )
{

}

and return our own nonzero value.
	--Mark

--
Mark Fasheh



More information about the Ocfs2-devel mailing list