All of lore.kernel.org
 help / color / mirror / Atom feed
* [Ocfs2-devel] [PATCH 1/1] OCFS2: add IO error check in ocfs2_get_sector() -v2
@ 2009-02-12  7:47 wengang wang
  2009-02-12 19:23 ` Sunil Mushran
  2009-02-12 19:45 ` Joel Becker
  0 siblings, 2 replies; 6+ messages in thread
From: wengang wang @ 2009-02-12  7:47 UTC (permalink / raw)
  To: ocfs2-devel

checks IO error in ocfs2_get_sector().

this patch is based on 1.4 git.

Signed-off-by: Wengang wang <wen.gang.wang@oracle.com>
--
Index: fs/ocfs2/super.c
===================================================================
--- fs/ocfs2/super.c	(revision 128)
+++ fs/ocfs2/super.c	(working copy)
@@ -1203,6 +1203,12 @@ static int ocfs2_get_sector(struct super
 	unlock_buffer(*bh);
 	ll_rw_block(READ, 1, bh);
 	wait_on_buffer(*bh);
+	if (!buffer_uptodate(*bh)) {
+		mlog_errno(-EIO);
+		brelse(*bh);
+		return -EIO;
+	}
+
 	return 0;
 }
 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Ocfs2-devel] [PATCH 1/1] OCFS2: add IO error check in ocfs2_get_sector() -v2
  2009-02-12  7:47 [Ocfs2-devel] [PATCH 1/1] OCFS2: add IO error check in ocfs2_get_sector() -v2 wengang wang
@ 2009-02-12 19:23 ` Sunil Mushran
  2009-02-12 19:46   ` Joel Becker
  2009-02-12 19:45 ` Joel Becker
  1 sibling, 1 reply; 6+ messages in thread
From: Sunil Mushran @ 2009-02-12 19:23 UTC (permalink / raw)
  To: ocfs2-devel

The matching brelse() is in ocfs2_fill_super(). So you shouldn't
need it. Cross check though please.

Secondly, when you make a patch, please make it against mainline.
ocfs2 1.4 pulls in patches from mainline.

Sunil

wengang wang wrote:
> checks IO error in ocfs2_get_sector().
>
> this patch is based on 1.4 git.
>
> Signed-off-by: Wengang wang <wen.gang.wang@oracle.com>
> --
> Index: fs/ocfs2/super.c
> ===================================================================
> --- fs/ocfs2/super.c	(revision 128)
> +++ fs/ocfs2/super.c	(working copy)
> @@ -1203,6 +1203,12 @@ static int ocfs2_get_sector(struct super
>  	unlock_buffer(*bh);
>  	ll_rw_block(READ, 1, bh);
>  	wait_on_buffer(*bh);
> +	if (!buffer_uptodate(*bh)) {
> +		mlog_errno(-EIO);
> +		brelse(*bh);
> +		return -EIO;
> +	}
> +
>  	return 0;
>  }
>  
>
> _______________________________________________
> Ocfs2-devel mailing list
> Ocfs2-devel at oss.oracle.com
> http://oss.oracle.com/mailman/listinfo/ocfs2-devel
>   

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Ocfs2-devel] [PATCH 1/1] OCFS2: add IO error check in ocfs2_get_sector() -v2
  2009-02-12  7:47 [Ocfs2-devel] [PATCH 1/1] OCFS2: add IO error check in ocfs2_get_sector() -v2 wengang wang
  2009-02-12 19:23 ` Sunil Mushran
@ 2009-02-12 19:45 ` Joel Becker
  1 sibling, 0 replies; 6+ messages in thread
From: Joel Becker @ 2009-02-12 19:45 UTC (permalink / raw)
  To: ocfs2-devel

On Thu, Feb 12, 2009 at 03:47:26PM +0800, wengang wang wrote:
> checks IO error in ocfs2_get_sector().
> 
> this patch is based on 1.4 git.

	This patch is good, but definitely needs to be against mainline.

sobby

> 
> Signed-off-by: Wengang wang <wen.gang.wang@oracle.com>
> --
> Index: fs/ocfs2/super.c
> ===================================================================
> --- fs/ocfs2/super.c	(revision 128)
> +++ fs/ocfs2/super.c	(working copy)
> @@ -1203,6 +1203,12 @@ static int ocfs2_get_sector(struct super
>  	unlock_buffer(*bh);
>  	ll_rw_block(READ, 1, bh);
>  	wait_on_buffer(*bh);
> +	if (!buffer_uptodate(*bh)) {
> +		mlog_errno(-EIO);
> +		brelse(*bh);
> +		return -EIO;
> +	}
> +
>  	return 0;
>  }
>  
> 
> _______________________________________________
> Ocfs2-devel mailing list
> Ocfs2-devel at oss.oracle.com
> http://oss.oracle.com/mailman/listinfo/ocfs2-devel

-- 

The Graham Corollary:

	The longer a socially-moderated news website exists, the
	probability of an old Paul Graham link appearing at the top
	approaches certainty.

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Ocfs2-devel] [PATCH 1/1] OCFS2: add IO error check in ocfs2_get_sector() -v2
  2009-02-12 19:23 ` Sunil Mushran
@ 2009-02-12 19:46   ` Joel Becker
  2009-02-12 19:55     ` Sunil Mushran
  0 siblings, 1 reply; 6+ messages in thread
From: Joel Becker @ 2009-02-12 19:46 UTC (permalink / raw)
  To: ocfs2-devel

On Thu, Feb 12, 2009 at 11:23:42AM -0800, Sunil Mushran wrote:
> The matching brelse() is in ocfs2_fill_super(). So you shouldn't
> need it. Cross check though please.

	No, if we get an error from ocfs2_get_sector() we return without
brelse().  So the patch is correct.

Joel

-- 

"I have never let my schooling interfere with my education."
        - Mark Twain

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Ocfs2-devel] [PATCH 1/1] OCFS2: add IO error check in ocfs2_get_sector() -v2
  2009-02-12 19:46   ` Joel Becker
@ 2009-02-12 19:55     ` Sunil Mushran
  2009-02-12 22:15       ` Joel Becker
  0 siblings, 1 reply; 6+ messages in thread
From: Sunil Mushran @ 2009-02-12 19:55 UTC (permalink / raw)
  To: ocfs2-devel

I am looking at the brelse() in ocfs2_fill_super().

Joel Becker wrote:
> On Thu, Feb 12, 2009 at 11:23:42AM -0800, Sunil Mushran wrote:
>   
>> The matching brelse() is in ocfs2_fill_super(). So you shouldn't
>> need it. Cross check though please.
>>     
>
> 	No, if we get an error from ocfs2_get_sector() we return without
> brelse().  So the patch is correct.
>
> Joel
>
>   

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Ocfs2-devel] [PATCH 1/1] OCFS2: add IO error check in ocfs2_get_sector() -v2
  2009-02-12 19:55     ` Sunil Mushran
@ 2009-02-12 22:15       ` Joel Becker
  0 siblings, 0 replies; 6+ messages in thread
From: Joel Becker @ 2009-02-12 22:15 UTC (permalink / raw)
  To: ocfs2-devel

On Thu, Feb 12, 2009 at 11:55:30AM -0800, Sunil Mushran wrote:
> I am looking at the brelse() in ocfs2_fill_super().

	Oh, right.  Then Wengang's patch should null out *bh when
brelsing it.  No point in passing a garbage bh all the way up.


Joel

> 
> Joel Becker wrote:
> > On Thu, Feb 12, 2009 at 11:23:42AM -0800, Sunil Mushran wrote:
> >   
> >> The matching brelse() is in ocfs2_fill_super(). So you shouldn't
> >> need it. Cross check though please.
> >>     
> >
> > 	No, if we get an error from ocfs2_get_sector() we return without
> > brelse().  So the patch is correct.
> >
> > Joel
> >
> >   
> 
> 
> _______________________________________________
> Ocfs2-devel mailing list
> Ocfs2-devel at oss.oracle.com
> http://oss.oracle.com/mailman/listinfo/ocfs2-devel

-- 

"The one important thing i have learned over the years is the
 difference between taking one's work seriously and taking one's self
 seriously.  The first is imperative and the second is disastrous."
	-Margot Fonteyn

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-02-12 22:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-12  7:47 [Ocfs2-devel] [PATCH 1/1] OCFS2: add IO error check in ocfs2_get_sector() -v2 wengang wang
2009-02-12 19:23 ` Sunil Mushran
2009-02-12 19:46   ` Joel Becker
2009-02-12 19:55     ` Sunil Mushran
2009-02-12 22:15       ` Joel Becker
2009-02-12 19:45 ` Joel Becker

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.