public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] xfs: fix xfs_bmap_validate_extent_raw when checking attr fork of rt files
@ 2020-09-02 17:42 Darrick J. Wong
  2020-09-02 17:45 ` Eric Sandeen
  0 siblings, 1 reply; 2+ messages in thread
From: Darrick J. Wong @ 2020-09-02 17:42 UTC (permalink / raw)
  To: xfs; +Cc: Eric Sandeen

From: Darrick J. Wong <darrick.wong@oracle.com>

The realtime flag only applies to the data fork, so don't use the
realtime block number checks on the attr fork of a realtime file.

Fixes: 30b0984d9117 ("xfs: refactor bmap record validation")
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
v2: send from stable tree, not dev tree
---
 fs/xfs/libxfs/xfs_bmap.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
index 9c40d5971035..1b0a01b06a05 100644
--- a/fs/xfs/libxfs/xfs_bmap.c
+++ b/fs/xfs/libxfs/xfs_bmap.c
@@ -6226,7 +6226,7 @@ xfs_bmap_validate_extent(
 
 	isrt = XFS_IS_REALTIME_INODE(ip);
 	endfsb = irec->br_startblock + irec->br_blockcount - 1;
-	if (isrt) {
+	if (isrt && whichfork == XFS_DATA_FORK) {
 		if (!xfs_verify_rtbno(mp, irec->br_startblock))
 			return __this_address;
 		if (!xfs_verify_rtbno(mp, endfsb))

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

* Re: [PATCH v2] xfs: fix xfs_bmap_validate_extent_raw when checking attr fork of rt files
  2020-09-02 17:42 [PATCH v2] xfs: fix xfs_bmap_validate_extent_raw when checking attr fork of rt files Darrick J. Wong
@ 2020-09-02 17:45 ` Eric Sandeen
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Sandeen @ 2020-09-02 17:45 UTC (permalink / raw)
  To: Darrick J. Wong, xfs; +Cc: Eric Sandeen

On 9/2/20 12:42 PM, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> The realtime flag only applies to the data fork, so don't use the
> realtime block number checks on the attr fork of a realtime file.
> 
> Fixes: 30b0984d9117 ("xfs: refactor bmap record validation")
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>


Seems legit

Reviewed-by: Eric Sandeen <sandeen@redhat.com>

> ---
> v2: send from stable tree, not dev tree
> ---
>  fs/xfs/libxfs/xfs_bmap.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
> index 9c40d5971035..1b0a01b06a05 100644
> --- a/fs/xfs/libxfs/xfs_bmap.c
> +++ b/fs/xfs/libxfs/xfs_bmap.c
> @@ -6226,7 +6226,7 @@ xfs_bmap_validate_extent(
>  
>  	isrt = XFS_IS_REALTIME_INODE(ip);
>  	endfsb = irec->br_startblock + irec->br_blockcount - 1;
> -	if (isrt) {
> +	if (isrt && whichfork == XFS_DATA_FORK) {
>  		if (!xfs_verify_rtbno(mp, irec->br_startblock))
>  			return __this_address;
>  		if (!xfs_verify_rtbno(mp, endfsb))
> 

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

end of thread, other threads:[~2020-09-02 17:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-02 17:42 [PATCH v2] xfs: fix xfs_bmap_validate_extent_raw when checking attr fork of rt files Darrick J. Wong
2020-09-02 17:45 ` Eric Sandeen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox