Re: [PATCH 1/4] libxfs: handle read errors in libxfs_trans_read_buf

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2011-09-20 at 17:59 -0400, Christoph Hellwig wrote:
> Libxfs_readbuf may return a NULL buffer to indicate that an error happend
> during the read, but we currently ignore that if libxfs_trans_read_buf
> is called with a NULL transaction pointer.  Fix this by copying the
> relevant code from the kernel version of the routine, and also tidy
> the code up a bit by using a common exit label.
> 
> This fixes a regression that was introduced in xfsprogs 3.0.0 by commit
> 
> 	"Implement buffer and inode caching in libxfs, groundwork for a
> 	 parallel version of xfs_repair."
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>

Probably wouldn't hurt to initialize b_fsprivate2 even
if the transaction pointer is null.  Looks good though.

Reviewed-by: Alex Elder <aelder@xxxxxxx>

. . .
> @@ -510,6 +516,7 @@ libxfs_trans_read_buf(
>  
>  	/* initialise b_fsprivate2 so we can find it incore */
>  	XFS_BUF_SET_FSPRIVATE2(bp, tp);
> +done:
>  	*bpp = bp;
>  	return 0;
>  }


_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux