2002-10-31 23:51:03

by Bob Miller

[permalink] [raw]
Subject: [PATCH 2.5.45] Export blkdev_ioctl for raw block driver.

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet 1.857 -> 1.858
# kernel/ksyms.c 1.155 -> 1.156
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/10/31 [email protected] 1.858
# Export blkdev_ioctl so that the raw device driver
# can be built as a module.
# --------------------------------------------
#
diff -Nru a/kernel/ksyms.c b/kernel/ksyms.c
--- a/kernel/ksyms.c Thu Oct 31 16:47:14 2002
+++ b/kernel/ksyms.c Thu Oct 31 16:47:14 2002
@@ -349,6 +349,7 @@
EXPORT_SYMBOL(blkdev_open);
EXPORT_SYMBOL(blkdev_get);
EXPORT_SYMBOL(blkdev_put);
+EXPORT_SYMBOL(blkdev_ioctl);
EXPORT_SYMBOL(ioctl_by_bdev);
EXPORT_SYMBOL(read_dev_sector);
EXPORT_SYMBOL(init_buffer);

--
Bob Miller Email: [email protected]
Open Source Development Lab Phone: 503.626.2455 Ext. 17


2002-11-01 00:05:00

by Alexander Viro

[permalink] [raw]
Subject: Re: [PATCH 2.5.45] Export blkdev_ioctl for raw block driver.



On Thu, 31 Oct 2002, Bob Miller wrote:

> diff -Nru a/kernel/ksyms.c b/kernel/ksyms.c
> --- a/kernel/ksyms.c Thu Oct 31 16:47:14 2002
> +++ b/kernel/ksyms.c Thu Oct 31 16:47:14 2002
> @@ -349,6 +349,7 @@
> EXPORT_SYMBOL(blkdev_open);
> EXPORT_SYMBOL(blkdev_get);
> EXPORT_SYMBOL(blkdev_put);
> +EXPORT_SYMBOL(blkdev_ioctl);

Why not use ioctl_by_bdev() in the first place? (and yes, it's very likely
my fault - I hadn't realized that raw.c went modular at some point).

2002-11-01 00:14:21

by Bob Miller

[permalink] [raw]
Subject: Re: [PATCH 2.5.45] Export blkdev_ioctl for raw block driver.

On Thu, Oct 31, 2002 at 07:11:19PM -0500, Alexander Viro wrote:
>
>
> On Thu, 31 Oct 2002, Bob Miller wrote:
>
> > diff -Nru a/kernel/ksyms.c b/kernel/ksyms.c
> > --- a/kernel/ksyms.c Thu Oct 31 16:47:14 2002
> > +++ b/kernel/ksyms.c Thu Oct 31 16:47:14 2002
> > @@ -349,6 +349,7 @@
> > EXPORT_SYMBOL(blkdev_open);
> > EXPORT_SYMBOL(blkdev_get);
> > EXPORT_SYMBOL(blkdev_put);
> > +EXPORT_SYMBOL(blkdev_ioctl);
>
> Why not use ioctl_by_bdev() in the first place? (and yes, it's very likely
> my fault - I hadn't realized that raw.c went modular at some point).
Didn't know about ioctl_by_bdev()... I'll make a patch that converts
the raw driver to call it instead of blkdev_ioctl().

--
Bob Miller Email: [email protected]
Open Source Development Lab Phone: 503.626.2455 Ext. 17

2002-11-01 00:42:08

by Bob Miller

[permalink] [raw]
Subject: Re: [PATCH 2.5.45] Export blkdev_ioctl for raw block driver.

On Thu, Oct 31, 2002 at 05:20:07PM -0800, Bob Miller wrote:
> On Thu, Oct 31, 2002 at 07:11:19PM -0500, Alexander Viro wrote:

Stuff deleted...

> > Why not use ioctl_by_bdev() in the first place? (and yes, it's very likely
> > my fault - I hadn't realized that raw.c went modular at some point).
> Didn't know about ioctl_by_bdev()... I'll make a patch that converts
> the raw driver to call it instead of blkdev_ioctl().
>

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet 1.869 -> 1.870
# drivers/char/raw.c 1.23 -> 1.24
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/10/31 [email protected] 1.870
# Changed raw driver to call ioctl_by_bdev() instead of
# blkdev_ioctl() so that it will build as a module.
# --------------------------------------------
#
diff -Nru a/drivers/char/raw.c b/drivers/char/raw.c
--- a/drivers/char/raw.c Thu Oct 31 17:34:56 2002
+++ b/drivers/char/raw.c Thu Oct 31 17:34:56 2002
@@ -95,7 +95,7 @@
{
struct block_device *bdev = filp->private_data;

- return blkdev_ioctl(bdev->bd_inode, NULL, command, arg);
+ return ioctl_by_bdev(bdev, command, arg);
}

/*
--
Bob Miller Email: [email protected]
Open Source Development Lab Phone: 503.626.2455 Ext. 17

2002-11-01 00:53:59

by Alexander Viro

[permalink] [raw]
Subject: Re: [PATCH 2.5.45] Export blkdev_ioctl for raw block driver.



On Thu, 31 Oct 2002, Bob Miller wrote:

> On Thu, Oct 31, 2002 at 05:20:07PM -0800, Bob Miller wrote:
> > On Thu, Oct 31, 2002 at 07:11:19PM -0500, Alexander Viro wrote:
>
> Stuff deleted...
>
> > > Why not use ioctl_by_bdev() in the first place? (and yes, it's very likely
> > > my fault - I hadn't realized that raw.c went modular at some point).
> > Didn't know about ioctl_by_bdev()... I'll make a patch that converts
> > the raw driver to call it instead of blkdev_ioctl().

Looks OK.

<OT, teasing>

vi -c'/blkdev_ioctl/s/blk.*NULL/ioctl_by_bdev(bdev/|x' drivers/char/raw.c

would be a bit more concise than thing below, wouldn't it?

</OT>


> # This is a BitKeeper generated patch for the following project:
> # Project Name: Linux kernel tree
> # This patch format is intended for GNU patch command version 2.5 or higher.
> # This patch includes the following deltas:
> # ChangeSet 1.869 -> 1.870
> # drivers/char/raw.c 1.23 -> 1.24
> #
> # The following is the BitKeeper ChangeSet Log
> # --------------------------------------------
> # 02/10/31 [email protected] 1.870
> # Changed raw driver to call ioctl_by_bdev() instead of
> # blkdev_ioctl() so that it will build as a module.
> # --------------------------------------------
> #
> diff -Nru a/drivers/char/raw.c b/drivers/char/raw.c
> --- a/drivers/char/raw.c Thu Oct 31 17:34:56 2002
> +++ b/drivers/char/raw.c Thu Oct 31 17:34:56 2002
> @@ -95,7 +95,7 @@
> {
> struct block_device *bdev = filp->private_data;
>
> - return blkdev_ioctl(bdev->bd_inode, NULL, command, arg);
> + return ioctl_by_bdev(bdev, command, arg);
> }
>
> /*
> --
> Bob Miller Email: [email protected]
> Open Source Development Lab Phone: 503.626.2455 Ext. 17
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>