diff options
| author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-27 11:46:49 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-27 11:46:49 -0500 |
| commit | 4fa639123d9e6e8dfaa3d116368f4b2478da31af (patch) | |
| tree | 50c42e2102a542891a15b5011e48fbde14149baf | |
| parent | df5b89b323b922f56650b4b4d7c41899b937cf19 (diff) | |
| parent | ae36b883d29e53b6083ed3d1d44f254cee7507d3 (diff) | |
Merge branch 'for-linus' of git://brick.kernel.dk/data/git/linux-2.6-block
* 'for-linus' of git://brick.kernel.dk/data/git/linux-2.6-block:
[PATCH] Don't make debugfs depend on DEBUG_KERNEL
[PATCH] Fix blktrace compile with sysfs not defined
[PATCH] unused label in drivers/block/cciss.
[BLOCK] increase size of disk stat counters
[PATCH] blk_execute_rq_nowait-speedup
[PATCH] ide-cd: quiet down GPCMD_READ_CDVD_CAPACITY failure
[BLOCK] ll_rw_blk: kmalloc -> kzalloc conversion
[PATCH] kzalloc() conversion in drivers/block
[PATCH] update max_sectors documentation
| -rw-r--r-- | Documentation/block/biodoc.txt | 14 | ||||
| -rw-r--r-- | block/Kconfig | 1 | ||||
| -rw-r--r-- | block/genhd.c | 6 | ||||
| -rw-r--r-- | block/ll_rw_blk.c | 14 | ||||
| -rw-r--r-- | drivers/block/DAC960.c | 7 | ||||
| -rw-r--r-- | drivers/block/cciss.c | 12 | ||||
| -rw-r--r-- | drivers/block/cciss_scsi.c | 3 | ||||
| -rw-r--r-- | drivers/block/paride/bpck6.c | 3 | ||||
| -rw-r--r-- | drivers/ide/ide-cd.c | 1 | ||||
| -rw-r--r-- | include/linux/genhd.h | 12 | ||||
| -rw-r--r-- | lib/Kconfig.debug | 2 |
11 files changed, 39 insertions, 36 deletions
diff --git a/Documentation/block/biodoc.txt b/Documentation/block/biodoc.txt index 8e63831971d5..f989a9e839b4 100644 --- a/Documentation/block/biodoc.txt +++ b/Documentation/block/biodoc.txt | |||
| @@ -132,8 +132,18 @@ Some new queue property settings: | |||
| 132 | limit. No highmem default. | 132 | limit. No highmem default. |
| 133 | 133 | ||
| 134 | blk_queue_max_sectors(q, max_sectors) | 134 | blk_queue_max_sectors(q, max_sectors) |
| 135 | Maximum size request you can handle in units of 512 byte | 135 | Sets two variables that limit the size of the request. |
| 136 | sectors. 255 default. | 136 | |
| 137 | - The request queue's max_sectors, which is a soft size in | ||
| 138 | in units of 512 byte sectors, and could be dynamically varied | ||
| 139 | by the core kernel. | ||
| 140 | |||
| 141 | - The request queue's max_hw_sectors, which is a hard limit | ||
| 142 | and reflects the maximum size request a driver can handle | ||
| 143 | in units of 512 byte sectors. | ||
| 144 | |||
| 145 | The default for both max_sectors and max_hw_sectors is | ||
| 146 | 255. The upper limit of max_sectors is 1024. | ||
| 137 | 147 | ||
| 138 | blk_queue_max_phys_segments(q, max_segments) | 148 | blk_queue_max_phys_segments(q, max_segments) |
| 139 | Maximum physical segments you can handle in a request. 128 | 149 | Maximum physical segments you can handle in a request. 128 |
diff --git a/block/Kconfig b/block/Kconfig index 43ca070dc0f8..5536839886ff 100644 --- a/block/Kconfig +++ b/block/Kconfig | |||
| @@ -13,6 +13,7 @@ config LBD | |||
| 13 | 13 | ||
| 14 | config BLK_DEV_IO_TRACE | 14 | config BLK_DEV_IO_TRACE |
| 15 | bool "Support for tracing block io actions" | 15 | bool "Support for tracing block io actions" |
| 16 | depends on SYSFS | ||
| 16 | select RELAY | 17 | select RELAY |
| 17 | select DEBUG_FS | 18 | select DEBUG_FS |
| 18 | help | 19 | help |
diff --git a/block/genhd.c b/block/genhd.c index 64510fd88621..db4c60c802d6 100644 --- a/block/genhd.c +++ b/block/genhd.c | |||
| @@ -454,8 +454,8 @@ static ssize_t disk_stats_read(struct gendisk * disk, char *page) | |||
| 454 | disk_round_stats(disk); | 454 | disk_round_stats(disk); |
| 455 | preempt_enable(); | 455 | preempt_enable(); |
| 456 | return sprintf(page, | 456 | return sprintf(page, |
| 457 | "%8u %8u %8llu %8u " | 457 | "%8lu %8lu %8llu %8u " |
| 458 | "%8u %8u %8llu %8u " | 458 | "%8lu %8lu %8llu %8u " |
| 459 | "%8u %8u %8u" | 459 | "%8u %8u %8u" |
| 460 | "\n", | 460 | "\n", |
| 461 | disk_stat_read(disk, ios[READ]), | 461 | disk_stat_read(disk, ios[READ]), |
| @@ -649,7 +649,7 @@ static int diskstats_show(struct seq_file *s, void *v) | |||
| 649 | preempt_disable(); | 649 | preempt_disable(); |
| 650 | disk_round_stats(gp); | 650 | disk_round_stats(gp); |
| 651 | preempt_enable(); | 651 | preempt_enable(); |
| 652 | seq_printf(s, "%4d %4d %s %u %u %llu %u %u %u %llu %u %u %u %u\n", | 652 | seq_printf(s, "%4d %4d %s %lu %lu %llu %u %lu %lu %llu %u %u %u %u\n", |
| 653 | gp->major, n + gp->first_minor, disk_name(gp, n, buf), | 653 | gp->major, n + gp->first_minor, disk_name(gp, n, buf), |
| 654 | disk_stat_read(gp, ios[0]), disk_stat_read(gp, merges[0]), | 654 | disk_stat_read(gp, ios[0]), disk_stat_read(gp, merges[0]), |
| 655 | (unsigned long long)disk_stat_read(gp, sectors[0]), | 655 | (unsigned long long)disk_stat_read(gp, sectors[0]), |
diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c index a2e333ad0b64..82469db25100 100644 --- a/block/ll_rw_blk.c +++ b/block/ll_rw_blk.c | |||
| @@ -908,17 +908,15 @@ init_tag_map(request_queue_t *q, struct blk_queue_tag *tags, int depth) | |||
| 908 | __FUNCTION__, depth); | 908 | __FUNCTION__, depth); |
| 909 | } | 909 | } |
| 910 | 910 | ||
| 911 | tag_index = kmalloc(depth * sizeof(struct request *), GFP_ATOMIC); | 911 | tag_index = kzalloc(depth * sizeof(struct request *), GFP_ATOMIC); |
| 912 | if (!tag_index) | 912 | if (!tag_index) |
| 913 | goto fail; | 913 | goto fail; |
| 914 | 914 | ||
| 915 | nr_ulongs = ALIGN(depth, BITS_PER_LONG) / BITS_PER_LONG; | 915 | nr_ulongs = ALIGN(depth, BITS_PER_LONG) / BITS_PER_LONG; |
| 916 | tag_map = kmalloc(nr_ulongs * sizeof(unsigned long), GFP_ATOMIC); | 916 | tag_map = kzalloc(nr_ulongs * sizeof(unsigned long), GFP_ATOMIC); |
| 917 | if (!tag_map) | 917 | if (!tag_map) |
| 918 | goto fail; | 918 | goto fail; |
| 919 | 919 | ||
| 920 | memset(tag_index, 0, depth * sizeof(struct request *)); | ||
| 921 | memset(tag_map, 0, nr_ulongs * sizeof(unsigned long)); | ||
| 922 | tags->real_max_depth = depth; | 920 | tags->real_max_depth = depth; |
| 923 | tags->max_depth = depth; | 921 | tags->max_depth = depth; |
| 924 | tags->tag_index = tag_index; | 922 | tags->tag_index = tag_index; |
| @@ -2481,10 +2479,12 @@ void blk_execute_rq_nowait(request_queue_t *q, struct gendisk *bd_disk, | |||
| 2481 | rq->rq_disk = bd_disk; | 2479 | rq->rq_disk = bd_disk; |
| 2482 | rq->flags |= REQ_NOMERGE; | 2480 | rq->flags |= REQ_NOMERGE; |
| 2483 | rq->end_io = done; | 2481 | rq->end_io = done; |
| 2484 | elv_add_request(q, rq, where, 1); | 2482 | WARN_ON(irqs_disabled()); |
| 2485 | generic_unplug_device(q); | 2483 | spin_lock_irq(q->queue_lock); |
| 2484 | __elv_add_request(q, rq, where, 1); | ||
| 2485 | __generic_unplug_device(q); | ||
| 2486 | spin_unlock_irq(q->queue_lock); | ||
| 2486 | } | 2487 | } |
| 2487 | |||
| 2488 | EXPORT_SYMBOL_GPL(blk_execute_rq_nowait); | 2488 | EXPORT_SYMBOL_GPL(blk_execute_rq_nowait); |
| 2489 | 2489 | ||
| 2490 | /** | 2490 | /** |
diff --git a/drivers/block/DAC960.c b/drivers/block/DAC960.c index 9bdea2a5cf0e..49c7cd558ddf 100644 --- a/drivers/block/DAC960.c +++ b/drivers/block/DAC960.c | |||
| @@ -311,11 +311,10 @@ static boolean DAC960_CreateAuxiliaryStructures(DAC960_Controller_T *Controller) | |||
| 311 | CommandsRemaining = CommandAllocationGroupSize; | 311 | CommandsRemaining = CommandAllocationGroupSize; |
| 312 | CommandGroupByteCount = | 312 | CommandGroupByteCount = |
| 313 | CommandsRemaining * CommandAllocationLength; | 313 | CommandsRemaining * CommandAllocationLength; |
| 314 | AllocationPointer = kmalloc(CommandGroupByteCount, GFP_ATOMIC); | 314 | AllocationPointer = kzalloc(CommandGroupByteCount, GFP_ATOMIC); |
| 315 | if (AllocationPointer == NULL) | 315 | if (AllocationPointer == NULL) |
| 316 | return DAC960_Failure(Controller, | 316 | return DAC960_Failure(Controller, |
| 317 | "AUXILIARY STRUCTURE CREATION"); | 317 | "AUXILIARY STRUCTURE CREATION"); |
| 318 | memset(AllocationPointer, 0, CommandGroupByteCount); | ||
| 319 | } | 318 | } |
| 320 | Command = (DAC960_Command_T *) AllocationPointer; | 319 | Command = (DAC960_Command_T *) AllocationPointer; |
| 321 | AllocationPointer += CommandAllocationLength; | 320 | AllocationPointer += CommandAllocationLength; |
| @@ -2709,14 +2708,12 @@ DAC960_DetectController(struct pci_dev *PCI_Device, | |||
| 2709 | void __iomem *BaseAddress; | 2708 | void __iomem *BaseAddress; |
| 2710 | int i; | 2709 | int i; |
| 2711 | 2710 | ||
| 2712 | Controller = (DAC960_Controller_T *) | 2711 | Controller = kzalloc(sizeof(DAC960_Controller_T), GFP_ATOMIC); |
| 2713 | kmalloc(sizeof(DAC960_Controller_T), GFP_ATOMIC); | ||
| 2714 | if (Controller == NULL) { | 2712 | if (Controller == NULL) { |
| 2715 | DAC960_Error("Unable to allocate Controller structure for " | 2713 | DAC960_Error("Unable to allocate Controller structure for " |
| 2716 | "Controller at\n", NULL); | 2714 | "Controller at\n", NULL); |
| 2717 | return NULL; | 2715 | return NULL; |
| 2718 | } | 2716 | } |
| 2719 | memset(Controller, 0, sizeof(DAC960_Controller_T)); | ||
| 2720 | Controller->ControllerNumber = DAC960_ControllerCount; | 2717 | Controller->ControllerNumber = DAC960_ControllerCount; |
| 2721 | DAC960_Controllers[DAC960_ControllerCount++] = Controller; | 2718 | DAC960_Controllers[DAC960_ControllerCount++] = Controller; |
| 2722 | Controller->Bus = PCI_Device->bus->number; | 2719 | Controller->Bus = PCI_Device->bus->number; |
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index 71ec9e664383..1b0fd31c57c3 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c | |||
| @@ -996,13 +996,11 @@ static int cciss_ioctl(struct inode *inode, struct file *filep, | |||
| 996 | status = -EINVAL; | 996 | status = -EINVAL; |
| 997 | goto cleanup1; | 997 | goto cleanup1; |
| 998 | } | 998 | } |
| 999 | buff = (unsigned char **) kmalloc(MAXSGENTRIES * | 999 | buff = kzalloc(MAXSGENTRIES * sizeof(char *), GFP_KERNEL); |
| 1000 | sizeof(char *), GFP_KERNEL); | ||
| 1001 | if (!buff) { | 1000 | if (!buff) { |
| 1002 | status = -ENOMEM; | 1001 | status = -ENOMEM; |
| 1003 | goto cleanup1; | 1002 | goto cleanup1; |
| 1004 | } | 1003 | } |
| 1005 | memset(buff, 0, MAXSGENTRIES); | ||
| 1006 | buff_size = (int *) kmalloc(MAXSGENTRIES * sizeof(int), | 1004 | buff_size = (int *) kmalloc(MAXSGENTRIES * sizeof(int), |
| 1007 | GFP_KERNEL); | 1005 | GFP_KERNEL); |
| 1008 | if (!buff_size) { | 1006 | if (!buff_size) { |
| @@ -2729,9 +2727,9 @@ static void __devinit cciss_interrupt_mode(ctlr_info_t *c, struct pci_dev *pdev, | |||
| 2729 | return; | 2727 | return; |
| 2730 | } | 2728 | } |
| 2731 | } | 2729 | } |
| 2730 | default_int_mode: | ||
| 2732 | #endif /* CONFIG_PCI_MSI */ | 2731 | #endif /* CONFIG_PCI_MSI */ |
| 2733 | /* if we get here we're going to use the default interrupt mode */ | 2732 | /* if we get here we're going to use the default interrupt mode */ |
| 2734 | default_int_mode: | ||
| 2735 | c->intr[SIMPLE_MODE_INT] = pdev->irq; | 2733 | c->intr[SIMPLE_MODE_INT] = pdev->irq; |
| 2736 | return; | 2734 | return; |
| 2737 | } | 2735 | } |
| @@ -2940,13 +2938,12 @@ static void cciss_getgeometry(int cntl_num) | |||
| 2940 | int block_size; | 2938 | int block_size; |
| 2941 | int total_size; | 2939 | int total_size; |
| 2942 | 2940 | ||
| 2943 | ld_buff = kmalloc(sizeof(ReportLunData_struct), GFP_KERNEL); | 2941 | ld_buff = kzalloc(sizeof(ReportLunData_struct), GFP_KERNEL); |
| 2944 | if (ld_buff == NULL) | 2942 | if (ld_buff == NULL) |
| 2945 | { | 2943 | { |
| 2946 | printk(KERN_ERR "cciss: out of memory\n"); | 2944 | printk(KERN_ERR "cciss: out of memory\n"); |
| 2947 | return; | 2945 | return; |
| 2948 | } | 2946 | } |
| 2949 | memset(ld_buff, 0, sizeof(ReportLunData_struct)); | ||
| 2950 | size_buff = kmalloc(sizeof( ReadCapdata_struct), GFP_KERNEL); | 2947 | size_buff = kmalloc(sizeof( ReadCapdata_struct), GFP_KERNEL); |
| 2951 | if (size_buff == NULL) | 2948 | if (size_buff == NULL) |
| 2952 | { | 2949 | { |
| @@ -3060,10 +3057,9 @@ static int alloc_cciss_hba(void) | |||
| 3060 | for(i=0; i< MAX_CTLR; i++) { | 3057 | for(i=0; i< MAX_CTLR; i++) { |
| 3061 | if (!hba[i]) { | 3058 | if (!hba[i]) { |
| 3062 | ctlr_info_t *p; | 3059 | ctlr_info_t *p; |
| 3063 | p = kmalloc(sizeof(ctlr_info_t), GFP_KERNEL); | 3060 | p = kzalloc(sizeof(ctlr_info_t), GFP_KERNEL); |
| 3064 | if (!p) | 3061 | if (!p) |
| 3065 | goto Enomem; | 3062 | goto Enomem; |
| 3066 | memset(p, 0, sizeof(ctlr_info_t)); | ||
| 3067 | for (n = 0; n < NWD; n++) | 3063 | for (n = 0; n < NWD; n++) |
| 3068 | p->gendisk[n] = disk[n]; | 3064 | p->gendisk[n] = disk[n]; |
| 3069 | hba[i] = p; | 3065 | hba[i] = p; |
diff --git a/drivers/block/cciss_scsi.c b/drivers/block/cciss_scsi.c index 0e66e904bd8c..597c007fe81b 100644 --- a/drivers/block/cciss_scsi.c +++ b/drivers/block/cciss_scsi.c | |||
| @@ -1027,12 +1027,11 @@ cciss_update_non_disk_devices(int cntl_num, int hostno) | |||
| 1027 | int i; | 1027 | int i; |
| 1028 | 1028 | ||
| 1029 | c = (ctlr_info_t *) hba[cntl_num]; | 1029 | c = (ctlr_info_t *) hba[cntl_num]; |
| 1030 | ld_buff = kmalloc(reportlunsize, GFP_KERNEL); | 1030 | ld_buff = kzalloc(reportlunsize, GFP_KERNEL); |
| 1031 | if (ld_buff == NULL) { | 1031 | if (ld_buff == NULL) { |
| 1032 | printk(KERN_ERR "cciss: out of memory\n"); | 1032 | printk(KERN_ERR "cciss: out of memory\n"); |
| 1033 | return; | 1033 | return; |
| 1034 | } | 1034 | } |
| 1035 | memset(ld_buff, 0, reportlunsize); | ||
| 1036 | inq_buff = kmalloc(OBDR_TAPE_INQ_SIZE, GFP_KERNEL); | 1035 | inq_buff = kmalloc(OBDR_TAPE_INQ_SIZE, GFP_KERNEL); |
| 1037 | if (inq_buff == NULL) { | 1036 | if (inq_buff == NULL) { |
| 1038 | printk(KERN_ERR "cciss: out of memory\n"); | 1037 | printk(KERN_ERR "cciss: out of memory\n"); |
diff --git a/drivers/block/paride/bpck6.c b/drivers/block/paride/bpck6.c index 08d858ad64db..41a237c5957d 100644 --- a/drivers/block/paride/bpck6.c +++ b/drivers/block/paride/bpck6.c | |||
| @@ -224,10 +224,9 @@ static void bpck6_log_adapter( PIA *pi, char * scratch, int verbose ) | |||
| 224 | 224 | ||
| 225 | static int bpck6_init_proto(PIA *pi) | 225 | static int bpck6_init_proto(PIA *pi) |
| 226 | { | 226 | { |
| 227 | Interface *p = kmalloc(sizeof(Interface), GFP_KERNEL); | 227 | Interface *p = kzalloc(sizeof(Interface), GFP_KERNEL); |
| 228 | 228 | ||
| 229 | if (p) { | 229 | if (p) { |
| 230 | memset(p, 0, sizeof(Interface)); | ||
| 231 | pi->private = (unsigned long)p; | 230 | pi->private = (unsigned long)p; |
| 232 | return 0; | 231 | return 0; |
| 233 | } | 232 | } |
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index c7671e188017..b4a41d6d0714 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c | |||
| @@ -2143,6 +2143,7 @@ static int cdrom_read_capacity(ide_drive_t *drive, unsigned long *capacity, | |||
| 2143 | req.cmd[0] = GPCMD_READ_CDVD_CAPACITY; | 2143 | req.cmd[0] = GPCMD_READ_CDVD_CAPACITY; |
| 2144 | req.data = (char *)&capbuf; | 2144 | req.data = (char *)&capbuf; |
| 2145 | req.data_len = sizeof(capbuf); | 2145 | req.data_len = sizeof(capbuf); |
| 2146 | req.flags |= REQ_QUIET; | ||
| 2146 | 2147 | ||
| 2147 | stat = cdrom_queue_packet_command(drive, &req); | 2148 | stat = cdrom_queue_packet_command(drive, &req); |
| 2148 | if (stat == 0) { | 2149 | if (stat == 0) { |
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index bd7db861041e..3c1b0294a742 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
| @@ -90,12 +90,12 @@ struct hd_struct { | |||
| 90 | #define GENHD_FL_SUPPRESS_PARTITION_INFO 32 | 90 | #define GENHD_FL_SUPPRESS_PARTITION_INFO 32 |
| 91 | 91 | ||
| 92 | struct disk_stats { | 92 | struct disk_stats { |
| 93 | unsigned sectors[2]; /* READs and WRITEs */ | 93 | unsigned long sectors[2]; /* READs and WRITEs */ |
| 94 | unsigned ios[2]; | 94 | unsigned long ios[2]; |
| 95 | unsigned merges[2]; | 95 | unsigned long merges[2]; |
| 96 | unsigned ticks[2]; | 96 | unsigned long ticks[2]; |
| 97 | unsigned io_ticks; | 97 | unsigned long io_ticks; |
| 98 | unsigned time_in_queue; | 98 | unsigned long time_in_queue; |
| 99 | }; | 99 | }; |
| 100 | 100 | ||
| 101 | struct gendisk { | 101 | struct gendisk { |
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 7e70ab13e191..6e8a60f67c7a 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
| @@ -172,7 +172,7 @@ config DEBUG_IOREMAP | |||
| 172 | 172 | ||
| 173 | config DEBUG_FS | 173 | config DEBUG_FS |
| 174 | bool "Debug Filesystem" | 174 | bool "Debug Filesystem" |
| 175 | depends on DEBUG_KERNEL && SYSFS | 175 | depends on SYSFS |
| 176 | help | 176 | help |
| 177 | debugfs is a virtual file system that kernel developers use to put | 177 | debugfs is a virtual file system that kernel developers use to put |
| 178 | debugging files into. Enable this option to be able to read and | 178 | debugging files into. Enable this option to be able to read and |
