lkml.org 
[lkml]   [2006]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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/

\
 
 \ /
  Last update: 2006-09-29 01:07    [W:0.055 / U:0.404 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site