[Sheepdog] [PATCH 1/3] store: propagate open failure in store_queue_request_local

Christoph Hellwig hch at infradead.org
Fri Nov 11 13:05:57 CET 2011


On Thu, Nov 10, 2011 at 02:22:28PM -0500, Christoph Hellwig wrote:
> Currently store_queue_request_local returns success when an open fails,
> change this to SD_RES_EIO to indicate failure.  It might make sense to
> make the failure more specific, but this at least fixes the bug for now.
> 
> Signed-off-by: Christoph Hellwig <hch at lst.de>
> 
> Index: sheepdog/sheep/store.c
> ===================================================================
> --- sheepdog.orig/sheep/store.c	2011-11-10 18:56:50.532796327 +0100
> +++ sheepdog/sheep/store.c	2011-11-10 18:57:46.735797654 +0100
> @@ -597,8 +597,10 @@ static int store_queue_request_local(str
>  		else
>  			fd = ob_open(epoch, oid, 0, &ret);
>  
> -		if (fd < 0)
> +		if (fd < 0) {
> +			ret = SD_RES_EIO;

Sorry, I was wrong.

ob_open actually returns an error through the last argument, so this
patch was incorrect and needs to be reverted.




More information about the sheepdog mailing list