blkgetsize64 hptraid

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

 



Hi there,

I've used hptraid eversince it came out last year, but now I'm
in need of the BLKGETSIZE64 argument for ioctl call, the reason is because
SGI's journaling file system XFS started using it.  Now is it enough to
add an extra case statment in the code that will handle this, that looks
like the following or is the solution more involved, and I was wondering
if it would be possible to make that fix part of the raid package.  My
solution was as follows it seems to work but I've never hacked the
kernel before so I need some confirmation if I've done it right.

switch (cmd) {
	case BLKGETSIZE64:
		if (!arg) return -EINVAL;
		sectors = ataraid_gendisk.part[MINOR(inode->i_rdev)].nrsects;

		if (MINOR(inode->i_rdev)&15)
			return puti_user((u64)sectors << 9, (u64 *) arg);
		return put_user((u64)raid[minor].sectors << 9, (u64 *)
arg);

	break;

as you can see I took the BLKGETSIZE case and added some modifications
that I took from ide.c  I'm setting up a machine in which I would like
to use this code.

Thanks for the great work.

Cheers
Michal Kozlowski

email: michal@xxxxxxxxxxxxxxxx





[Index of Archives]     [Linux RAID]     [Linux Device Mapper]     [Linux IDE]     [Linux SCSI]     [Kernel]     [Linux Books]     [Linux Admin]     [GFS]     [RPM]     [Yosemite Campgrounds]     [AMD 64]

  Powered by Linux