Re: [PATCH] atari aranym nfstderr, take 2

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

 



On Tue, 15 Jan 2008, Roman Zippel wrote:
On Sun, 13 Jan 2008, Petr Stehlik wrote:
Stephen R Marenka p� v So 12. 01. 2008 v 09:55 -0600:
Hopefully this patch includes all the of feedback from the last one.
This patch adds a character device driver to allow user space access
to the aranym natfeats nfstderr.

BTW, I am amazed by simplicity of the patch and am wondering if it is
similarly simple to write a disk driver (to avoid the IDE emulation in
ARAnyM).

Below is my last version I was experimenting with. There is still 
somewhere a stack corruption or overflow (it's easy to trigger with 
"hdparm -tT /dev/...").

That reminds me, that aranym needs a fix here in src/natfeat/xhdi.cpp 
(fseeko instead of fseek) so devices larger than 2GB aren't corrupted.

The speed doesn't seem to be drastically faster (only twice as fast last I 
tested with a simple dd). One reason may be that xhdi.cpp opens the file 

Twice as fast is still better...

for every single request and asynchronous requests might help too.

.. and there's an area for improvement.

+int nfhd_getgeo(struct block_device *bdev, struct hd_geometry *geo)
+{
+	struct nfhd_device *dev = bdev->bd_disk->private_data;
+
+	geo->cylinders = dev->blocks / (64 >> dev->bshift);
+	geo->heads = 4; 
+	geo->sectors = 16;
+
+	return 0;
+}

I don't think you need getgeo these days.

+static struct block_device_operations nfhd_ops = {
+	.owner	= THIS_MODULE,
+	.ioctl	= blkdev_ioctl,
+	.getgeo	= nfhd_getgeo,
+};

Same for ioctl?

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux