public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Kevin Corry <corryk@us.ibm.com>
Cc: torvalds@transmeta.com, linux-kernel@vger.kernel.org,
	evms-devel@lists.sourceforge.net
Subject: Re: [PATCH] EVMS core 3/4: evms_ioctl.h
Date: Thu, 3 Oct 2002 16:00:47 +0100	[thread overview]
Message-ID: <20021003160047.A20462@infradead.org> (raw)
In-Reply-To: <02100307370503.05904@boiler>; from corryk@us.ibm.com on Thu, Oct 03, 2002 at 07:37:05AM -0500

On Thu, Oct 03, 2002 at 07:37:05AM -0500, Kevin Corry wrote:
> @@ -0,0 +1,498 @@

> + *   Copyright (c) International Business Machines  Corp., 2000

> +/*
> + * linux/include/linux/evms.h
> + *
> + * EVMS public kernel header file
> + *
> + */

Same comments as last time apply.

> +#include <linux/hdreg.h>

What is this for?

> +#ifdef __KERNEL__

Nuke this.  kernel he3aders aren't for userspace anyway.

> +#define EVMS_CHECK_MEDIA_CHANGE         _IO(EVMS_MAJOR, EVMS_CHECK_MEDIA_CHANGE_NUMBER)
> +
> +#define EVMS_REVALIDATE_DISK_STRING     "EVMS_REVALIDATE_DISK"
> +#define EVMS_REVALIDATE_DISK            _IO(EVMS_MAJOR, EVMS_REVALIDATE_DISK_NUMBER)

Can't you use normal revalidate/media change operations?

> +
> +#define EVMS_OPEN_VOLUME_STRING         "EVMS_OPEN_VOLUME"
> +#define EVMS_OPEN_VOLUME                _IO(EVMS_MAJOR, EVMS_OPEN_VOLUME_NUMBER)
> +
> +#define EVMS_CLOSE_VOLUME_STRING        "EVMS_CLOSE_VOLUME"
> +#define EVMS_CLOSE_VOLUME               _IO(EVMS_MAJOR, EVMS_CLOSE_VOLUME_NUMBER)

if you need open/close ioctl you got some abstraction wrong..

> +/**
> + * struct evms_sector_io_pkt - sector io ioctl packet definition
> + * @disk_handle:	disk handle of target device
> + * @io_flag:		0 = read, 1 = write
> + * @starting_sector:	disk relative starting sector
> + * @sector_count:	count of sectors
> + * @buffer_address:	user buffer address
> + * @status:		return operation status
> + *
> + * ioctl packet definition for EVMS_SECTOR_IO ioctl
> + **/
> +struct evms_sector_io_pkt {
> +	u64 disk_handle;
> +	s32 io_flag;
> +	u64 starting_sector;
> +	u64 sector_count;
> +	u8 *buffer_address;
> +	s32 status;
> +};

You don't abuse an ioctl to read into a user supplied buffer??
> +/**
> + * struct evms_compute_csum_pkt - compute checksum ioctl packet definition
> + * @buffer_address:
> + * @buffer_size:
> + * @insum:
> + * @outsum:
> + * @status:
> + *
> + * ioctl packet definition for EVMS_COMPUTE_CSUM ioctl
> + **/
> +struct evms_compute_csum_pkt {
> +	u8 *buffer_address;
> +	s32 buffer_size;
> +	u32 insum;
> +	u32 outsum;
> +	s32 status;
> +};

An ioctl to compute a checksum??


  reply	other threads:[~2002-10-03 14:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-03 12:37 [PATCH] EVMS core 3/4: evms_ioctl.h Kevin Corry
2002-10-03 15:00 ` Christoph Hellwig [this message]
     [not found] <02100307370503.05904@boiler.suse.lists.linux.kernel>
2002-10-03 15:22 ` Andi Kleen
2002-10-03 22:30   ` Kevin Corry
2002-10-03 23:49     ` Andi Kleen

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=20021003160047.A20462@infradead.org \
    --to=hch@infradead.org \
    --cc=corryk@us.ibm.com \
    --cc=evms-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /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