From: Pavel Machek <pavel@ucw.cz>
To: Andrew Morton <akpm@osdl.org>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -mm 1/3] swsusp: Add ioctl for swap files support
Date: Fri, 29 Sep 2006 01:04:33 +0200 [thread overview]
Message-ID: <20060928230433.GG26653@elf.ucw.cz> (raw)
In-Reply-To: <20060928154237.d91abb1f.akpm@osdl.org>
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
next prev parent reply other threads:[~2006-09-28 23:04 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-28 22:05 [PATCH -mm 0/3] swsusp: Add ioctl for swap files support and update documentation Rafael J. Wysocki
2006-09-28 22:13 ` [PATCH -mm 1/3] swsusp: Add ioctl for swap files support Rafael J. Wysocki
2006-09-28 22:42 ` Andrew Morton
2006-09-28 22:58 ` Rafael J. Wysocki
2006-09-28 23:03 ` Pavel Machek
2006-09-28 23:35 ` Rafael J. Wysocki
2006-09-28 23:39 ` Pavel Machek
2006-09-30 14:15 ` Arnd Bergmann
2006-09-30 19:58 ` Rafael J. Wysocki
2006-09-30 20:37 ` Arnd Bergmann
2006-09-30 22:04 ` Rafael J. Wysocki
2006-10-01 21:52 ` Arnd Bergmann
2006-09-28 23:04 ` Pavel Machek [this message]
2006-09-28 22:17 ` [PATCH -mm 2/3] swsusp: Update userland interface documentation Rafael J. Wysocki
2006-09-28 22:19 ` [PATCH -mm 3/3] swsusp: Document testing code Rafael J. Wysocki
2006-09-28 22:37 ` Pavel Machek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060928230433.GG26653@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rjw@sisk.pl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox