public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* re: xfs: add buffer types to directory and attribute buffers
@ 2013-05-06  9:11 Dan Carpenter
  2013-05-06  9:27 ` Jeff Liu
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2013-05-06  9:11 UTC (permalink / raw)
  To: dchinner; +Cc: xfs

Hello Dave Chinner,

The patch d75afeb3d302: "xfs: add buffer types to directory and 
attribute buffers" from Apr 3, 2013, leads to the following Smatch warning:
"fs/xfs/xfs_log_recover.c:2042 xlog_recovery_validate_buf_type()
	 warn: always true condition '(magicda != 1480675917) =>  (0-u16max != 1480675917)'"

fs/xfs/xfs_log_recover.c
  2039          case XFS_BLFT_ATTR_RMT_BUF:
  2040                  if (!xfs_sb_version_hascrc(&mp->m_sb))
  2041                          break;
  2042                  if (magicda != XFS_ATTR3_RMT_MAGIC) {
                            ^^^^^^^
This is an unsigned short so it can never be equal to 0x5841524d.  Was
"magic32" intended here?

  2043                          xfs_warn(mp, "Bad attr remote magic!");
  2044                          ASSERT(0);
  2045                          break;
  2046                  }
  2047                  bp->b_ops = &xfs_attr3_rmt_buf_ops;
  2048                  break;

regards,
dan carpenter

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

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

* Re: xfs: add buffer types to directory and attribute buffers
  2013-05-06  9:11 xfs: add buffer types to directory and attribute buffers Dan Carpenter
@ 2013-05-06  9:27 ` Jeff Liu
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Liu @ 2013-05-06  9:27 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: xfs, dchinner

On 05/06/2013 05:11 PM, Dan Carpenter wrote:
> Hello Dave Chinner,
> 
> The patch d75afeb3d302: "xfs: add buffer types to directory and 
> attribute buffers" from Apr 3, 2013, leads to the following Smatch warning:
> "fs/xfs/xfs_log_recover.c:2042 xlog_recovery_validate_buf_type()
> 	 warn: always true condition '(magicda != 1480675917) =>  (0-u16max != 1480675917)'"
> 
> fs/xfs/xfs_log_recover.c
>   2039          case XFS_BLFT_ATTR_RMT_BUF:
>   2040                  if (!xfs_sb_version_hascrc(&mp->m_sb))
>   2041                          break;
>   2042                  if (magicda != XFS_ATTR3_RMT_MAGIC) {
>                             ^^^^^^^
> This is an unsigned short so it can never be equal to 0x5841524d.  Was
> "magic32" intended here?
You are right, but this issue has been fixed by:

commit cab09a81fbefcb21db5213a84461d421946f6eb8
Author: Dave Chinner <dchinner@redhat.com>
Date:   Tue Apr 30 21:39:36 2013 +1000

    xfs: fix da node magic number mismatches

It has been discussed on following thread before:
http://oss.sgi.com/archives/xfs/2013-04/msg00645.html

Thanks,
-Jeff
> 
>   2043                          xfs_warn(mp, "Bad attr remote magic!");
>   2044                          ASSERT(0);
>   2045                          break;
>   2046                  }
>   2047                  bp->b_ops = &xfs_attr3_rmt_buf_ops;
>   2048                  break;
> 
> regards,
> dan carpenter
> 
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
> 

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

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

end of thread, other threads:[~2013-05-06  9:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-06  9:11 xfs: add buffer types to directory and attribute buffers Dan Carpenter
2013-05-06  9:27 ` Jeff Liu

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