public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Samphan Raruenrom <samphan@nectec.or.th>
To: Christoph Hellwig <hch@infradead.org>
Cc: Jens Axboe <axboe@image.dk>,
	linux-kernel@vger.kernel.org, Linux TLE Team <rdi1@opentle.org>,
	Marcelo Tosatti <marcelo@conectiva.com.br>
Subject: Re: [PATCH] Add MOUNT_STATUS ioctl to cdrom device
Date: Tue, 26 Aug 2003 16:09:54 +0700	[thread overview]
Message-ID: <3F4B23E2.8040401@nectec.or.th> (raw)
In-Reply-To: <20030826083249.B20776@infradead.org>

Christoph Hellwig wrote:
>>(my random idea)
>>- fcntl(open("/dev/cdrom", F_MNTSTAT)
>>- umount2("/dev/cdrom", MS_TEST) // not actually perform
>>- new system call! e.g. mntstat(open("/dev/cdrom"))
> In userspace.  Or you could tell me what you want to actually
> archive - your call by itself doesn't make any sense.

To get the same result in userspace, it means scanning /proc
like fuser, right?  Do you think it is ok to do that?  Because
the daemon (patched magicdev) poll the cdrom device very often
(every 2 sec.)
That's why I thought that faster is better (less load to
the system) and push the job to kernel-space.

This is what I really want to achive - "enable the eject button,
by locking the drive only when the device is really in use,
unlock otherwise".

I implement this as a modified version of GNOME magicdev.
http://bugzilla.gnome.org/show_bug.cgi?id=119892

The only visible feature of this new magicdev is that now
GNOME users can eject there CDs (the discs' icon will
disappear). The eject button now act as 'umount' command.

One new requirement from this new magicdev is the question
"will umount failed?". I have no preference on any way to
implement it. Should there be the right way to do it, I'll
do so. I can think of many way to implement it (including
adding a new lazy-lock mode to cdrom device) but since
I have no kernel hacking experience, I need everyone
advices. Novice users need this 'eject' button after all.

-- 
Samphan Raruenrom,
The Open Source Project,
National Electronics and Computer Technology Center,
National Science and Technology Development Agency,
Thailand.


  reply	other threads:[~2003-08-26  9:12 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-25 18:22 [PATCH] Add MOUNT_STATUS ioctl to cdrom device Samphan Raruenrom
2003-08-25 18:50 ` Christoph Hellwig
2003-08-26  6:50   ` Samphan Raruenrom
2003-08-26  7:32     ` Christoph Hellwig
2003-08-26  9:09       ` Samphan Raruenrom [this message]
2003-08-26  9:56         ` Christoph Hellwig
2003-08-26  9:58           ` Jens Axboe
2003-08-26 11:30             ` [Rdi1] " Samphan Raruenrom
2003-08-26 11:36               ` Jens Axboe
2003-08-26 12:44                 ` Samphan Raruenrom
2003-08-26 14:16                   ` Jens Axboe
2003-08-26 13:58               ` Christoph Hellwig
2003-08-26 15:32                 ` Samphan Raruenrom
2003-08-26 15:45                   ` Jens Axboe
2003-08-25 20:03 ` viro

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=3F4B23E2.8040401@nectec.or.th \
    --to=samphan@nectec.or.th \
    --cc=axboe@image.dk \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@conectiva.com.br \
    --cc=rdi1@opentle.org \
    /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