2002-11-12 17:21:35

by Matthias Urlichs

[permalink] [raw]
Subject: PATCH 2.4: scsi and BLK_STATS

Some people might want SCSI without block statistics...

This BitKeeper patch contains the following changesets:
+

# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: smurf
# Host: play.smurf.noris.de
# Root: /smurf/src/kernel/linux-2.4

#
#--- 1.15/drivers/scsi/scsi_lib.c Tue Aug 13 15:35:17 2002
#+++ 1.16/drivers/scsi/scsi_lib.c Tue Nov 12 18:25:40 2002
#@@ -422,7 +422,9 @@
# complete(req->waiting);
#
# spin_lock_irqsave(&io_request_lock, flags);
#+#ifdef CONFIG_BLK_STATS
# req_finished_io(req);
#+#endif
# spin_unlock_irqrestore(&io_request_lock, flags);
#
# add_blkdev_randomness(MAJOR(req->rq_dev));
#

# Diff checksum=c1ec73f8


# Patch vers: 1.3
# Patch type: REGULAR

== ChangeSet ==
[email protected]|ChangeSet|20020205173056|16047|c1d11a41ed024864
[email protected]|ChangeSet|20021108164427|64723
D 1.782 02/11/12 18:26:07+01:00 [email protected] +3 -0
B [email protected]|ChangeSet|20020205173056|16047|c1d11a41ed024864
C
c drivers/scsi/scsi_lib.c:
c req_finished_io is only available with CONFIG_BLK_STATS
K 4248
P ChangeSet
------------------------------------------------

0a0
> [email protected]|drivers/scsi/scsi_lib.c|20020205174009|30670|f55fe1364a50eb99 [email protected]|drivers/scsi/scsi_lib.c|20021112172540|62915
> [email protected]|drivers/scsi/sim710_u.h|20020205174009|26761|983dda40b0d929f6 [email protected]|BitKeeper/deleted/.del-sim710_u.h~983dda40b0d929f6|20021111023741|24738
> [email protected]|drivers/scsi/sim710_d.h|20020205174009|26007|66a7a0873b750aa9 [email protected]|BitKeeper/deleted/.del-sim710_d.h~66a7a0873b750aa9|20021111023741|03935

== drivers/scsi/scsi_lib.c ==
[email protected]|drivers/scsi/scsi_lib.c|20020205174009|30670|f55fe1364a50eb99
[email protected]|drivers/scsi/scsi_lib.c|20020814030503|60521
D 1.16 02/11/12 18:25:40+01:00 [email protected] +2 -0
B [email protected]|ChangeSet|20020205173056|16047|c1d11a41ed024864
C
c req_finished_io is only available with CONFIG_BLK_STATS
K 62915
O -rw-rw-r--
P drivers/scsi/scsi_lib.c
------------------------------------------------

I424 1
#ifdef CONFIG_BLK_STATS
I425 1
#endif

== BitKeeper/deleted/.del-sim710_d.h~66a7a0873b750aa9 ==
[email protected]|drivers/scsi/sim710_d.h|20020205174009|26007|66a7a0873b750aa9
[email protected]|drivers/scsi/sim710_d.h|20020528220443|60714
D 1.3 02/11/11 03:37:41+01:00 [email protected] +0 -0
B [email protected]|ChangeSet|20020205173056|16047|c1d11a41ed024864
C
c Delete: drivers/scsi/sim710_d.h
K 3935
O -rw-rw-r--
P BitKeeper/deleted/.del-sim710_d.h~66a7a0873b750aa9
------------------------------------------------


== BitKeeper/deleted/.del-sim710_u.h~983dda40b0d929f6 ==
[email protected]|drivers/scsi/sim710_u.h|20020205174009|26761|983dda40b0d929f6
[email protected]|drivers/scsi/sim710_u.h|20020528220443|09958
D 1.3 02/11/11 03:37:41+01:00 [email protected] +0 -0
B [email protected]|ChangeSet|20020205173056|16047|c1d11a41ed024864
C
c Delete: drivers/scsi/sim710_u.h
K 24738
O -rw-rw-r--
P BitKeeper/deleted/.del-sim710_u.h~983dda40b0d929f6
------------------------------------------------


# Patch checksum=ca3c169d


2002-11-13 00:08:42

by Christoph Hellwig

[permalink] [raw]
Subject: Re: PATCH 2.4: scsi and BLK_STATS

On Tue, Nov 12, 2002 at 06:28:21PM +0100, Matthias Urlichs wrote:
> Some people might want SCSI without block statistics...

Probably. But your patch doesn;t gain them anything but a useless
ifdef.. Look at include/linux/genhd.h:

#ifdef CONFIG_BLK_STATS
extern void disk_round_stats(struct hd_struct *hd);
extern void req_new_io(struct request *req, int merge, int sectors);
extern void req_merged_io(struct request *req);
extern void req_finished_io(struct request *req);
#else
static inline void req_new_io(struct request *req, int merge, int sectors) { }
static inline void req_merged_io(struct request *req) { }
static inline void req_finished_io(struct request *req) { }
#endif /* CONFIG_BLK_STATS */

2002-11-13 01:24:26

by Matthias Urlichs

[permalink] [raw]
Subject: Re: PATCH 2.4: scsi and BLK_STATS

Hi,

Christoph Hellwig:
> On Tue, Nov 12, 2002 at 06:28:21PM +0100, Matthias Urlichs wrote:
> > Some people might want SCSI without block statistics...
>
> Probably. But your patch doesn;t gain them anything but a useless
> ifdef.. Look at include/linux/genhd.h:
>
*Sigh*
Note that scsi_lib.c does not include linux/genhd.h, thus I missed
that. :-/

> static inline void req_new_io(struct request *req, int merge, int sectors) { }
> static inline void req_merged_io(struct request *req) { }
> static inline void req_finished_io(struct request *req) { }

That may be a matter of style, but I would strongly prefer these to be

#define req_new_io(_a,_b,_c) do {} while(0)
#define req_merge_io(_a) do {} while(0)
#define req_finished_io(_a) do {} while(0)

instead ... anyway, please disregard my patch and add

#include <linux/genhd.h>

in scsi/scsi_lib.c. :-/

--
Matthias Urlichs | noris network AG | http://smurf.noris.de/

2002-11-13 01:30:28

by Christoph Hellwig

[permalink] [raw]
Subject: Re: PATCH 2.4: scsi and BLK_STATS

On Wed, Nov 13, 2002 at 02:30:59AM +0100, Matthias Urlichs wrote:
> That may be a matter of style, but I would strongly prefer these to be
>
> #define req_new_io(_a,_b,_c) do {} while(0)
> #define req_merge_io(_a) do {} while(0)
> #define req_finished_io(_a) do {} while(0)
>
> instead ...

In kernelspace inlines are usually preferred over macros, that's why
I wrote it that way. I must adimt that I don't really care a lot
personally..

> anyway, please disregard my patch and add
>
> #include <linux/genhd.h>
>
> in scsi/scsi_lib.c. :-/

It already gets genhd.h through blk.h -> blkdev.h.. :)

2002-11-13 01:34:33

by Matthias Urlichs

[permalink] [raw]
Subject: Re: PATCH 2.4: scsi and BLK_STATS

Hi,

Christoph Hellwig:
> > anyway, please disregard my patch and add
> >
> > #include <linux/genhd.h>
> >
> > in scsi/scsi_lib.c. :-/
>
> It already gets genhd.h through blk.h -> blkdev.h.. :)

... then why did I get that undefined symbol in scsi_mod.o, I wonder ??

--
Matthias Urlichs | noris network AG | http://smurf.noris.de/

2002-11-13 01:56:29

by Christoph Hellwig

[permalink] [raw]
Subject: Re: PATCH 2.4: scsi and BLK_STATS

On Wed, Nov 13, 2002 at 02:41:18AM +0100, Matthias Urlichs wrote:
> > It already gets genhd.h through blk.h -> blkdev.h.. :)
>
> ... then why did I get that undefined symbol in scsi_mod.o, I wonder ??

I can't reproduce it here, so I wonder, too. Can you send me you
.config offlist?