Example #1
0
/*
 * Prints out an ALERT message about I/O error.
 */
void
xfs_ioerror_alert(
    char			*func,
    struct xfs_mount	*mp,
    xfs_buf_t		*bp,
    xfs_daddr_t		blkno)
{
    xfs_alert(mp,
              "I/O error occurred: meta-data dev %s block 0x%llx"
              "       (\"%s\") error %d buf count %zd",
              XFS_BUFTARG_NAME(XFS_BUF_TARGET(bp)),
              (__uint64_t)blkno, func,
              XFS_BUF_GETERROR(bp), XFS_BUF_COUNT(bp));
}
Example #2
0
/*
 * Prints out an ALERT message about I/O error.
 */
void
xfs_ioerror_alert(
	char			*func,
	struct xfs_mount	*mp,
	xfs_buf_t		*bp,
	xfs_daddr_t		blkno)
{
	cmn_err(CE_ALERT,
 "I/O error in filesystem (\"%s\") meta-data dev %s block 0x%llx"
 "       (\"%s\") error %d buf count %zd",
		(!mp || !mp->m_fsname) ? "(fs name not set)" : mp->m_fsname,
		XFS_BUFTARG_NAME(XFS_BUF_TARGET(bp)),
		(__uint64_t)blkno, func,
		XFS_BUF_GETERROR(bp), XFS_BUF_COUNT(bp));
}
Example #3
0
void
xfs_setsize_buftarg(
	xfs_buftarg_t		*btp,
	unsigned int		blocksize,
	unsigned int		sectorsize)
{
	btp->pbr_bsize = blocksize;
	btp->pbr_sshift = ffs(sectorsize) - 1;
	btp->pbr_smask = sectorsize - 1;

	if (set_blocksize(btp->pbr_bdev, sectorsize)) {
		printk(KERN_WARNING
			"XFS: Cannot set_blocksize to %u on device %s\n",
			sectorsize, XFS_BUFTARG_NAME(btp));
	}
}