All of lore.kernel.org
 help / color / mirror / Atom feed
* [Ocfs2-devel] [PATCH] ocfs2: for SEEK_DATA/SEEK_HOLE, return internal error unchanged if ocfs2_get_clusters_nocache() or ocfs2_inode_lock() call failed.
@ 2012-02-09  6:42 Jeff Liu
  2012-02-09 17:43 ` Sunil Mushran
  2012-07-04  7:32 ` Joel Becker
  0 siblings, 2 replies; 3+ messages in thread
From: Jeff Liu @ 2012-02-09  6:42 UTC (permalink / raw)
  To: ocfs2-devel

Hello,

Since ENXIO only means "offset beyond EOF" for SEEK_DATA/SEEK_HOLE,
Hence we should return the internal error unchanged if ocfs2_inode_lock() or
ocfs2_get_clusters_nocache() call failed rather than ENXIO.
Otherwise, it will confuse the user applications when they trying to understand the root cause.

Thanks Dave for pointing this out.

Thanks,
-Jeff


Cc: Dave Chinner <david@fromorbit.com>
Signed-off-by: Jie Liu <jeff.liu@oracle.com>

---
 fs/ocfs2/extent_map.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/fs/ocfs2/extent_map.c b/fs/ocfs2/extent_map.c
index 2f5b92e..70b5863 100644
--- a/fs/ocfs2/extent_map.c
+++ b/fs/ocfs2/extent_map.c
@@ -923,8 +923,6 @@ out_unlock:
 
 	ocfs2_inode_unlock(inode, 0);
 out:
-	if (ret && ret != -ENXIO)
-		ret = -ENXIO;
 	return ret;
 }
 
-- 
1.7.9

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

* [Ocfs2-devel] [PATCH] ocfs2: for SEEK_DATA/SEEK_HOLE, return internal error unchanged if ocfs2_get_clusters_nocache() or ocfs2_inode_lock() call failed.
  2012-02-09  6:42 [Ocfs2-devel] [PATCH] ocfs2: for SEEK_DATA/SEEK_HOLE, return internal error unchanged if ocfs2_get_clusters_nocache() or ocfs2_inode_lock() call failed Jeff Liu
@ 2012-02-09 17:43 ` Sunil Mushran
  2012-07-04  7:32 ` Joel Becker
  1 sibling, 0 replies; 3+ messages in thread
From: Sunil Mushran @ 2012-02-09 17:43 UTC (permalink / raw)
  To: ocfs2-devel

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>

On 02/08/2012 10:42 PM, Jeff Liu wrote:
> Hello,
>
> Since ENXIO only means "offset beyond EOF" for SEEK_DATA/SEEK_HOLE,
> Hence we should return the internal error unchanged if ocfs2_inode_lock() or
> ocfs2_get_clusters_nocache() call failed rather than ENXIO.
> Otherwise, it will confuse the user applications when they trying to understand the root cause.
>
> Thanks Dave for pointing this out.
>
> Thanks,
> -Jeff
>
>
> Cc: Dave Chinner<david@fromorbit.com>
> Signed-off-by: Jie Liu<jeff.liu@oracle.com>
>
> ---
>   fs/ocfs2/extent_map.c |    2 --
>   1 files changed, 0 insertions(+), 2 deletions(-)
>
> diff --git a/fs/ocfs2/extent_map.c b/fs/ocfs2/extent_map.c
> index 2f5b92e..70b5863 100644
> --- a/fs/ocfs2/extent_map.c
> +++ b/fs/ocfs2/extent_map.c
> @@ -923,8 +923,6 @@ out_unlock:
>
>   	ocfs2_inode_unlock(inode, 0);
>   out:
> -	if (ret&&  ret != -ENXIO)
> -		ret = -ENXIO;
>   	return ret;
>   }
>

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

* [Ocfs2-devel] [PATCH] ocfs2: for SEEK_DATA/SEEK_HOLE, return internal error unchanged if ocfs2_get_clusters_nocache() or ocfs2_inode_lock() call failed.
  2012-02-09  6:42 [Ocfs2-devel] [PATCH] ocfs2: for SEEK_DATA/SEEK_HOLE, return internal error unchanged if ocfs2_get_clusters_nocache() or ocfs2_inode_lock() call failed Jeff Liu
  2012-02-09 17:43 ` Sunil Mushran
@ 2012-07-04  7:32 ` Joel Becker
  1 sibling, 0 replies; 3+ messages in thread
From: Joel Becker @ 2012-07-04  7:32 UTC (permalink / raw)
  To: ocfs2-devel

On Thu, Feb 09, 2012 at 02:42:22PM +0800, Jeff Liu wrote:
> Hello,
> 
> Since ENXIO only means "offset beyond EOF" for SEEK_DATA/SEEK_HOLE,
> Hence we should return the internal error unchanged if ocfs2_inode_lock() or
> ocfs2_get_clusters_nocache() call failed rather than ENXIO.
> Otherwise, it will confuse the user applications when they trying to understand the root cause.
> 
> Thanks Dave for pointing this out.
> 
> Thanks,
> -Jeff
> 
> 
> Cc: Dave Chinner <david@fromorbit.com>
> Signed-off-by: Jie Liu <jeff.liu@oracle.com>

This patch is now (finally) part of the 'fixes' branch of ocfs2.git.

Joel

> 
> ---
>  fs/ocfs2/extent_map.c |    2 --
>  1 files changed, 0 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/ocfs2/extent_map.c b/fs/ocfs2/extent_map.c
> index 2f5b92e..70b5863 100644
> --- a/fs/ocfs2/extent_map.c
> +++ b/fs/ocfs2/extent_map.c
> @@ -923,8 +923,6 @@ out_unlock:
>  
>  	ocfs2_inode_unlock(inode, 0);
>  out:
> -	if (ret && ret != -ENXIO)
> -		ret = -ENXIO;
>  	return ret;
>  }
>  
> -- 
> 1.7.9
> 
> _______________________________________________
> Ocfs2-devel mailing list
> Ocfs2-devel at oss.oracle.com
> http://oss.oracle.com/mailman/listinfo/ocfs2-devel

-- 

"Nearly all men can stand adversity, but if you really want to
 test a man's character, give him power."
	- Abraham Lincoln

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

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

end of thread, other threads:[~2012-07-04  7:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-09  6:42 [Ocfs2-devel] [PATCH] ocfs2: for SEEK_DATA/SEEK_HOLE, return internal error unchanged if ocfs2_get_clusters_nocache() or ocfs2_inode_lock() call failed Jeff Liu
2012-02-09 17:43 ` Sunil Mushran
2012-07-04  7:32 ` 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.