Messages in this thread | | | Date | Fri, 29 Sep 2006 01:04:33 +0200 | From | Pavel Machek <> | Subject | Re: [PATCH -mm 1/3] swsusp: Add ioctl for swap files support |
| |
Hi!
> > + swdev = old_decode_dev(swap_area.dev); > > + if (swdev) { > > + offset = swap_area.offset; > > + data->swap = swap_type_of(swdev, offset); > > + if (data->swap < 0) > > + error = -ENODEV; > > + } else { > > + data->swap = -1; > > + error = -EINVAL; > > + } > > + } > > + break; > > + > > default: > > error = -ENOTTY; > > But I wonder if we need to pass the device identified into this ioctl at > all. What device is the ioctl() against? ie: what do `filp' and `inode' > point at? If it's /dev/hda1 then everything we need is right there, is it > not? > > ohshit, it's a miscdevice. I wonder if it would have defined all this > stuff to be operations against the blockdev. Perhaps not.
Defining it against blockdev would be ugly... we'll want to suspend to two devices at the same time, and we'll want to suspend over network etc.
Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |