Re: [PATCH 06/27] xfs_scrub: create an abstraction for a block device

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

 



On Thu, Jan 11, 2018 at 05:24:58PM -0600, Eric Sandeen wrote:
> On 1/5/18 7:52 PM, Darrick J. Wong wrote:
> > From: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
> 
> ...
> 
> > +/*
> > + * Disk Abstraction
> > + *
> > + * These routines help us to discover the geometry of a block device,
> > + * estimate the amount of concurrent IOs that we can send to it, and
> > + * abstract the process of performing read verification of disk blocks.
> > + */
> > +
> > +/* Figure out how many disk heads are available. */
> > +static unsigned int
> > +__disk_heads(
> > +	struct disk		*disk)
> > +{
> > +	int			iomin;
> > +	int			ioopt;
> > +	unsigned short		rot;
> > +	int			error;
> > +
> > +	/* If it's not a block device, throw all the CPUs at it. */
> > +	if (!S_ISBLK(disk->d_sb.st_mode))
> > +		return nproc;
> > +
> > +	/* Non-rotational device?  Throw all the CPUs. */
> > +	rot = 1;
> > +	error = ioctl(disk->d_fd, BLKROTATIONAL, &rot);
> > +	if (error == 0 && rot == 0)
> > +		return nproc;
> 
> I needed
> 
> +#ifndef BLKROTATIONAL
> +#define BLKROTATIONAL _IO(0x12,126)
> +#endif
> 
> to make this compile on my not /that/ ancient (?) rhel6 box ;)

Hmm... well, since I don't see backporting xfs kernel scrub to 2.6.32
maybe xfsprogs' build system should just turn off xfs_scrub on old
systems?

In any case, I #ifdef BLKROTATIONAL'd out the entire clause.

--D

> -Eric
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux