mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Mark Peloquin <peloquin@us.ibm.com>
Cc: torvalds@transmeta.com, viro@math.psu.edu,
	linux-kernel@vger.kernel.org, evms-devel@lists.sourceforge.net
Subject: Re: [Evms-devel] Re: [PATCH] EVMS core 3/4: evms_ioctl.h
Date: Mon, 7 Oct 2002 18:34:15 +0100	[thread overview]
Message-ID: <20021007183415.A22316@infradead.org> (raw)
In-Reply-To: <OFEADEC58E.F70F8BE4-ON85256C4B.004F8C03@pok.ibm.com>; from peloquin@us.ibm.com on Mon, Oct 07, 2002 at 11:43:30AM -0500

On Mon, Oct 07, 2002 at 11:43:30AM -0500, Mark Peloquin wrote:
> > Can't you use normal revalidate/media change operations?
> 
> For most plugins, except the device manager, this operation
> was nothing more than an exercise in routing the operation
> requests to the underlying devices. Since this routing code
> already exists in the ioctl interface, it seemed reasonable
> to just reuse it for this purpose as well. As a result,
> each plugin had to add 0 lines of code to support this.

I don't think that basing kernel internal interfaces on ioctl is
a smart idea.  Just add another function pionter to your operations
vector for every operation you want supported on volumes.

That way the uppermost layer can do the translation from the ugly
ioctl interface (or a future nice fs-based interface) to the operations
once instead of carrying the user-defined syscalls (aka ioctls)
around through your whole architecture.

> > if you need open/close ioctl you got some abstraction wrong..
> 
> In EVMS, because of removable media devices, we chose to
> open/close the underlying devices only when an actual
> open/close is received for a volume residing on the
> devices. This allows removable media devices to remain
> unlocked until they are in use.

Again, why can't you have open/close _methods_ for it instead of abusing
the ioctl interface.  It would be even nicer if you could extend
the block device operations with your new volume-mangment methods
instead of adding another API for blockdevices/disks outside the higher
level kernel code.

> > You don't use an ioctl to read into a user supplied buffer??
> 
> This ioctl is used by our userspace tools. EVMS stores
> metadata at the very end of devices. This ioctl was
> initially done to avoid the problem of "short writes"
> to those last sectors. It also allows the core to
> control which devices userspace can address.

Umm.  I'd suggest you fix the read/write access instead of duplicating those
two core unix syscalls in an messy ioctl API.

> > An ioctl to compute a checksum??
> 
> MD uses checksum routines. Rather than duplicating
> this code, we provided a method, for our usertools,
> of using the kernel routines, especially considering
> there is multiple methods based on various
> characteristics.

Based on that argumentation we should make memcpy a syscall..


  reply	other threads:[~2002-10-07 17:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-07 16:43 Mark Peloquin
2002-10-07 17:34 ` Christoph Hellwig [this message]
2002-10-07 17:50   ` Alexander Viro
2002-10-07 18:40     ` Christoph Hellwig
  -- strict thread matches above, loose matches on Subject: below --
2002-10-04 14:44 Mark Peloquin

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=20021007183415.A22316@infradead.org \
    --to=hch@infradead.org \
    --cc=evms-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peloquin@us.ibm.com \
    --cc=torvalds@transmeta.com \
    --cc=viro@math.psu.edu \
    /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

all inboxes | Powered by JetHome®