Skip to contentSkip to conversation

PATCH 2.4: scsi and BLK_STATS

DISCUSSION Matthias Urlichs 2 participants 6 messages Nov 12, 2002 – Nov 13, 2002

lore
Share & tools
lore
#0 lore raw

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

Quoted 3 lines
[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

#1 lore raw
Quoted 1 line · Matthias Urlichs

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 */

#2 lore raw

Hi,

Christoph Hellwig:

Quoted 6 lines · Matthias Urlichs
Quoted 1 line

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. :-/

Quoted 3 lines

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. :-/

Signature · 1 line
Matthias Urlichs     |     noris network AG     |     http://smurf.noris.de/
#3 lore raw
Quoted 7 lines · Matthias Urlichs

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..

Quoted 5 lines

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.. :)

#4 lore raw

Hi,

Christoph Hellwig:

Quoted 7 lines
Quoted 5 lines

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 ??

Signature · 1 line
Matthias Urlichs     |     noris network AG     |     http://smurf.noris.de/
#5 lore raw
Quoted 3 lines · Matthias Urlichs
Quoted 1 line

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?