mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: "Darrick J. Wong" <djwong@us.ibm.com>
Cc: dm-devel@redhat.com, lcm@us.ibm.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Support HDIO_GETGEO on device-mapper volumes
Date: Thu, 9 Feb 2006 18:58:55 -0800	[thread overview]
Message-ID: <20060209185855.6643dcce.akpm@osdl.org> (raw)
In-Reply-To: <43EBEDD0.60608@us.ibm.com>

"Darrick J. Wong" <djwong@us.ibm.com> wrote:
>
> The attached patch implements a simple ioctl handler that supplies a 
> compatible geometry when HDIO_GETGEO is called against a device-mapper 
> device.

block_device_operations now has a standalone `getgeo' method.

> ...
> +static int dm_blk_ioctl(struct inode * inode, struct file * filp,
> +			unsigned int cmd, unsigned long arg)
> +{
> +	struct block_device *bdev = inode->i_bdev;
> +	struct hd_geometry __user *loc = (void __user *)arg;
> +	struct mapped_device *md;
> +	int diskinfo[4];
> +
> +	if (cmd == HDIO_GETGEO) {
> +		if (!arg)
> +			return -EINVAL;

I don't think we need that check?  The -EFAULT should suffice.

  reply	other threads:[~2006-02-10  2:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-10  1:35 Darrick J. Wong
2006-02-10  2:58 ` Andrew Morton [this message]
2006-02-10  5:15 ` Phillip Susi
2006-02-10  8:14   ` Darrick J. Wong
2006-02-10 15:14     ` Phillip Susi
2006-02-10 14:53 ` Alasdair G Kergon
2006-02-10 15:12   ` Phillip Susi
2006-02-10 20:27     ` Molle Bestefich
2006-02-10 21:21       ` Phillip Susi
2006-02-20 18:09         ` Molle Bestefich
2006-02-20 21:30           ` Phillip Susi
2006-02-21 13:30             ` Molle Bestefich
2006-02-21 16:02               ` Phillip Susi
2006-02-10 15:13   ` [PATCH] " Alasdair G Kergon

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=20060209185855.6643dcce.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=djwong@us.ibm.com \
    --cc=dm-devel@redhat.com \
    --cc=lcm@us.ibm.com \
    --cc=linux-kernel@vger.kernel.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

Powered by JetHome