Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 154715
b: refs/heads/master
c: 61fd216
h: refs/heads/master
i:
  154713: 04bde68
  154711: 992c0b4
v: v3
  • Loading branch information
Andre Noll authored and Jens Axboe committed Jul 1, 2009
1 parent d11e413 commit eb80573
Show file tree
Hide file tree
Showing 40 changed files with 226 additions and 323 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 544ae5f96e14998cabc637fa20cf409eb92a0dd0
refs/heads/master: 61fd21670d048017c81e62f60894ef1b04b481db
4 changes: 2 additions & 2 deletions trunk/Documentation/block/data-integrity.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ encouraged them to allow separation of the data and integrity metadata
scatter-gather lists.

The controller will interleave the buffers on write and split them on
read. This means that the Linux can DMA the data buffers to and from
read. This means that Linux can DMA the data buffers to and from
host memory without changes to the page cache.

Also, the 16-bit CRC checksum mandated by both the SCSI and SATA specs
Expand All @@ -66,7 +66,7 @@ software RAID5).

The IP checksum is weaker than the CRC in terms of detecting bit
errors. However, the strength is really in the separation of the data
buffers and the integrity metadata. These two distinct buffers much
buffers and the integrity metadata. These two distinct buffers must
match up for an I/O to complete.

The separation of the data and integrity metadata buffers as well as
Expand Down
2 changes: 1 addition & 1 deletion trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -2931,7 +2931,7 @@ P: Dmitry Eremin-Solenikov
M: dbaryshkov@gmail.com
P: Sergey Lapin
M: slapin@ossfans.org
L: linux-zigbee-devel@lists.sourceforge.net (moderated for non-subscribers)
L: linux-zigbee-devel@lists.sourceforge.net
W: http://apps.sourceforge.net/trac/linux-zigbee
T: git git://git.kernel.org/pub/scm/linux/kernel/git/lowpan/lowpan.git
S: Maintained
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/md/linear.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ static linear_conf_t *linear_conf(mddev_t *mddev, int raid_disks)
rdev->sectors = sectors * mddev->chunk_sectors;
}

disk_stack_limits(mddev->gendisk, rdev->bdev,
rdev->data_offset << 9);
blk_queue_stack_limits(mddev->queue,
rdev->bdev->bd_disk->queue);
/* as we don't honour merge_bvec_fn, we must never risk
* violating it, so limit ->max_sector to one PAGE, as
* a one page request is never in violation.
Expand Down
56 changes: 24 additions & 32 deletions trunk/drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -3573,8 +3573,7 @@ suspend_lo_store(mddev_t *mddev, const char *buf, size_t len)
char *e;
unsigned long long new = simple_strtoull(buf, &e, 10);

if (mddev->pers == NULL ||
mddev->pers->quiesce == NULL)
if (mddev->pers->quiesce == NULL)
return -EINVAL;
if (buf == e || (*e && *e != '\n'))
return -EINVAL;
Expand Down Expand Up @@ -3602,8 +3601,7 @@ suspend_hi_store(mddev_t *mddev, const char *buf, size_t len)
char *e;
unsigned long long new = simple_strtoull(buf, &e, 10);

if (mddev->pers == NULL ||
mddev->pers->quiesce == NULL)
if (mddev->pers->quiesce == NULL)
return -EINVAL;
if (buf == e || (*e && *e != '\n'))
return -EINVAL;
Expand Down Expand Up @@ -3846,9 +3844,11 @@ static int md_alloc(dev_t dev, char *name)
flush_scheduled_work();

mutex_lock(&disks_mutex);
error = -EEXIST;
if (mddev->gendisk)
goto abort;
if (mddev->gendisk) {
mutex_unlock(&disks_mutex);
mddev_put(mddev);
return -EEXIST;
}

if (name) {
/* Need to ensure that 'name' is not a duplicate.
Expand All @@ -3860,15 +3860,17 @@ static int md_alloc(dev_t dev, char *name)
if (mddev2->gendisk &&
strcmp(mddev2->gendisk->disk_name, name) == 0) {
spin_unlock(&all_mddevs_lock);
goto abort;
return -EEXIST;
}
spin_unlock(&all_mddevs_lock);
}

error = -ENOMEM;
mddev->queue = blk_alloc_queue(GFP_KERNEL);
if (!mddev->queue)
goto abort;
if (!mddev->queue) {
mutex_unlock(&disks_mutex);
mddev_put(mddev);
return -ENOMEM;
}
mddev->queue->queuedata = mddev;

/* Can be unlocked because the queue is new: no concurrency */
Expand All @@ -3878,9 +3880,11 @@ static int md_alloc(dev_t dev, char *name)

disk = alloc_disk(1 << shift);
if (!disk) {
mutex_unlock(&disks_mutex);
blk_cleanup_queue(mddev->queue);
mddev->queue = NULL;
goto abort;
mddev_put(mddev);
return -ENOMEM;
}
disk->major = MAJOR(mddev->unit);
disk->first_minor = unit << shift;
Expand All @@ -3902,22 +3906,16 @@ static int md_alloc(dev_t dev, char *name)
mddev->gendisk = disk;
error = kobject_init_and_add(&mddev->kobj, &md_ktype,
&disk_to_dev(disk)->kobj, "%s", "md");
if (error) {
/* This isn't possible, but as kobject_init_and_add is marked
* __must_check, we must do something with the result
*/
mutex_unlock(&disks_mutex);
if (error)
printk(KERN_WARNING "md: cannot register %s/md - name in use\n",
disk->disk_name);
error = 0;
}
abort:
mutex_unlock(&disks_mutex);
if (!error) {
else {
kobject_uevent(&mddev->kobj, KOBJ_ADD);
mddev->sysfs_state = sysfs_get_dirent(mddev->kobj.sd, "array_state");
}
mddev_put(mddev);
return error;
return 0;
}

static struct kobject *md_probe(dev_t dev, int *part, void *data)
Expand Down Expand Up @@ -6336,16 +6334,10 @@ void md_do_sync(mddev_t *mddev)
sysfs_notify(&mddev->kobj, NULL, "sync_completed");
}

while (j >= mddev->resync_max && !kthread_should_stop()) {
/* As this condition is controlled by user-space,
* we can block indefinitely, so use '_interruptible'
* to avoid triggering warnings.
*/
flush_signals(current); /* just in case */
wait_event_interruptible(mddev->recovery_wait,
mddev->resync_max > j
|| kthread_should_stop());
}
if (j >= mddev->resync_max)
wait_event(mddev->recovery_wait,
mddev->resync_max > j
|| kthread_should_stop());

if (kthread_should_stop())
goto interrupted;
Expand Down
7 changes: 3 additions & 4 deletions trunk/drivers/md/multipath.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,7 @@ static int multipath_add_disk(mddev_t *mddev, mdk_rdev_t *rdev)
for (path = first; path <= last; path++)
if ((p=conf->multipaths+path)->rdev == NULL) {
q = rdev->bdev->bd_disk->queue;
disk_stack_limits(mddev->gendisk, rdev->bdev,
rdev->data_offset << 9);
blk_queue_stack_limits(mddev->queue, q);

/* as we don't honour merge_bvec_fn, we must never risk
* violating it, so limit ->max_sector to one PAGE, as
Expand Down Expand Up @@ -464,9 +463,9 @@ static int multipath_run (mddev_t *mddev)

disk = conf->multipaths + disk_idx;
disk->rdev = rdev;
disk_stack_limits(mddev->gendisk, rdev->bdev,
rdev->data_offset << 9);

blk_queue_stack_limits(mddev->queue,
rdev->bdev->bd_disk->queue);
/* as we don't honour merge_bvec_fn, we must never risk
* violating it, not that we ever expect a device with
* a merge_bvec_fn to be involved in multipath */
Expand Down
9 changes: 2 additions & 7 deletions trunk/drivers/md/raid0.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ static int create_strip_zones(mddev_t *mddev)
}
dev[j] = rdev1;

disk_stack_limits(mddev->gendisk, rdev1->bdev,
rdev1->data_offset << 9);
blk_queue_stack_limits(mddev->queue,
rdev1->bdev->bd_disk->queue);
/* as we don't honour merge_bvec_fn, we must never risk
* violating it, so limit ->max_sector to one PAGE, as
* a one page request is never in violation.
Expand Down Expand Up @@ -250,11 +250,6 @@ static int create_strip_zones(mddev_t *mddev)
mddev->chunk_sectors << 9);
goto abort;
}

blk_queue_io_min(mddev->queue, mddev->chunk_sectors << 9);
blk_queue_io_opt(mddev->queue,
(mddev->chunk_sectors << 9) * mddev->raid_disks);

printk(KERN_INFO "raid0: done.\n");
mddev->private = conf;
return 0;
Expand Down
9 changes: 5 additions & 4 deletions trunk/drivers/md/raid1.c
Original file line number Diff line number Diff line change
Expand Up @@ -1123,8 +1123,8 @@ static int raid1_add_disk(mddev_t *mddev, mdk_rdev_t *rdev)
for (mirror = first; mirror <= last; mirror++)
if ( !(p=conf->mirrors+mirror)->rdev) {

disk_stack_limits(mddev->gendisk, rdev->bdev,
rdev->data_offset << 9);
blk_queue_stack_limits(mddev->queue,
rdev->bdev->bd_disk->queue);
/* as we don't honour merge_bvec_fn, we must never risk
* violating it, so limit ->max_sector to one PAGE, as
* a one page request is never in violation.
Expand Down Expand Up @@ -1988,8 +1988,9 @@ static int run(mddev_t *mddev)
disk = conf->mirrors + disk_idx;

disk->rdev = rdev;
disk_stack_limits(mddev->gendisk, rdev->bdev,
rdev->data_offset << 9);

blk_queue_stack_limits(mddev->queue,
rdev->bdev->bd_disk->queue);
/* as we don't honour merge_bvec_fn, we must never risk
* violating it, so limit ->max_sector to one PAGE, as
* a one page request is never in violation.
Expand Down
19 changes: 6 additions & 13 deletions trunk/drivers/md/raid10.c
Original file line number Diff line number Diff line change
Expand Up @@ -1151,8 +1151,8 @@ static int raid10_add_disk(mddev_t *mddev, mdk_rdev_t *rdev)
for ( ; mirror <= last ; mirror++)
if ( !(p=conf->mirrors+mirror)->rdev) {

disk_stack_limits(mddev->gendisk, rdev->bdev,
rdev->data_offset << 9);
blk_queue_stack_limits(mddev->queue,
rdev->bdev->bd_disk->queue);
/* as we don't honour merge_bvec_fn, we must never risk
* violating it, so limit ->max_sector to one PAGE, as
* a one page request is never in violation.
Expand Down Expand Up @@ -2044,7 +2044,7 @@ raid10_size(mddev_t *mddev, sector_t sectors, int raid_disks)
static int run(mddev_t *mddev)
{
conf_t *conf;
int i, disk_idx, chunk_size;
int i, disk_idx;
mirror_info_t *disk;
mdk_rdev_t *rdev;
int nc, fc, fo;
Expand Down Expand Up @@ -2130,14 +2130,6 @@ static int run(mddev_t *mddev)
spin_lock_init(&conf->device_lock);
mddev->queue->queue_lock = &conf->device_lock;

chunk_size = mddev->chunk_sectors << 9;
blk_queue_io_min(mddev->queue, chunk_size);
if (conf->raid_disks % conf->near_copies)
blk_queue_io_opt(mddev->queue, chunk_size * conf->raid_disks);
else
blk_queue_io_opt(mddev->queue, chunk_size *
(conf->raid_disks / conf->near_copies));

list_for_each_entry(rdev, &mddev->disks, same_set) {
disk_idx = rdev->raid_disk;
if (disk_idx >= mddev->raid_disks
Expand All @@ -2146,8 +2138,9 @@ static int run(mddev_t *mddev)
disk = conf->mirrors + disk_idx;

disk->rdev = rdev;
disk_stack_limits(mddev->gendisk, rdev->bdev,
rdev->data_offset << 9);

blk_queue_stack_limits(mddev->queue,
rdev->bdev->bd_disk->queue);
/* as we don't honour merge_bvec_fn, we must never risk
* violating it, so limit ->max_sector to one PAGE, as
* a one page request is never in violation.
Expand Down
28 changes: 6 additions & 22 deletions trunk/drivers/md/raid5.c
Original file line number Diff line number Diff line change
Expand Up @@ -3699,21 +3699,13 @@ static int make_request(struct request_queue *q, struct bio * bi)
goto retry;
}
}

if (bio_data_dir(bi) == WRITE &&
logical_sector >= mddev->suspend_lo &&
/* FIXME what if we get a false positive because these
* are being updated.
*/
if (logical_sector >= mddev->suspend_lo &&
logical_sector < mddev->suspend_hi) {
release_stripe(sh);
/* As the suspend_* range is controlled by
* userspace, we want an interruptible
* wait.
*/
flush_signals(current);
prepare_to_wait(&conf->wait_for_overlap,
&w, TASK_INTERRUPTIBLE);
if (logical_sector >= mddev->suspend_lo &&
logical_sector < mddev->suspend_hi)
schedule();
schedule();
goto retry;
}

Expand Down Expand Up @@ -4460,7 +4452,7 @@ static raid5_conf_t *setup_conf(mddev_t *mddev)
static int run(mddev_t *mddev)
{
raid5_conf_t *conf;
int working_disks = 0, chunk_size;
int working_disks = 0;
mdk_rdev_t *rdev;

if (mddev->recovery_cp != MaxSector)
Expand Down Expand Up @@ -4615,14 +4607,6 @@ static int run(mddev_t *mddev)
md_set_array_sectors(mddev, raid5_size(mddev, 0, 0));

blk_queue_merge_bvec(mddev->queue, raid5_mergeable_bvec);
chunk_size = mddev->chunk_sectors << 9;
blk_queue_io_min(mddev->queue, chunk_size);
blk_queue_io_opt(mddev->queue, chunk_size *
(conf->raid_disks - conf->max_degraded));

list_for_each_entry(rdev, &mddev->disks, same_set)
disk_stack_limits(mddev->gendisk, rdev->bdev,
rdev->data_offset << 9);

return 0;
abort:
Expand Down
10 changes: 1 addition & 9 deletions trunk/drivers/net/bnx2x_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -8637,14 +8637,6 @@ static int bnx2x_nway_reset(struct net_device *dev)
return 0;
}

static u32
bnx2x_get_link(struct net_device *dev)
{
struct bnx2x *bp = netdev_priv(dev);

return bp->link_vars.link_up;
}

static int bnx2x_get_eeprom_len(struct net_device *dev)
{
struct bnx2x *bp = netdev_priv(dev);
Expand Down Expand Up @@ -10042,7 +10034,7 @@ static struct ethtool_ops bnx2x_ethtool_ops = {
.get_msglevel = bnx2x_get_msglevel,
.set_msglevel = bnx2x_set_msglevel,
.nway_reset = bnx2x_nway_reset,
.get_link = bnx2x_get_link,
.get_link = ethtool_op_get_link,
.get_eeprom_len = bnx2x_get_eeprom_len,
.get_eeprom = bnx2x_get_eeprom,
.set_eeprom = bnx2x_set_eeprom,
Expand Down
11 changes: 1 addition & 10 deletions trunk/drivers/net/e1000/e1000_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2185,16 +2185,12 @@ static void e1000_clean_rx_ring(struct e1000_adapter *adapter,
/* Free all the Rx ring sk_buffs */
for (i = 0; i < rx_ring->count; i++) {
buffer_info = &rx_ring->buffer_info[i];
if (buffer_info->dma) {
if (buffer_info->skb) {
pci_unmap_single(pdev,
buffer_info->dma,
buffer_info->length,
PCI_DMA_FROMDEVICE);
}

buffer_info->dma = 0;

if (buffer_info->skb) {
dev_kfree_skb(buffer_info->skb);
buffer_info->skb = NULL;
}
Expand Down Expand Up @@ -4037,7 +4033,6 @@ static bool e1000_clean_rx_irq(struct e1000_adapter *adapter,
buffer_info->dma,
buffer_info->length,
PCI_DMA_FROMDEVICE);
buffer_info->dma = 0;

length = le16_to_cpu(rx_desc->length);
/* !EOP means multiple descriptors were used to store a single
Expand Down Expand Up @@ -4227,7 +4222,6 @@ static void e1000_alloc_rx_buffers(struct e1000_adapter *adapter,
pci_unmap_single(pdev, buffer_info->dma,
adapter->rx_buffer_len,
PCI_DMA_FROMDEVICE);
buffer_info->dma = 0;

break; /* while !buffer_info->skb */
}
Expand Down Expand Up @@ -4823,9 +4817,6 @@ static pci_ers_result_t e1000_io_error_detected(struct pci_dev *pdev,

netif_device_detach(netdev);

if (state == pci_channel_io_perm_failure)
return PCI_ERS_RESULT_DISCONNECT;

if (netif_running(netdev))
e1000_down(adapter);
pci_disable_device(pdev);
Expand Down
Loading

0 comments on commit eb80573

Please sign in to comment.