Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 273810
b: refs/heads/master
c: 8315722
h: refs/heads/master
v: v3
  • Loading branch information
Jens Axboe committed Oct 24, 2011
1 parent a91eae9 commit fc53738
Show file tree
Hide file tree
Showing 40 changed files with 499 additions and 490 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: f992ae801a7dec34a4ed99a6598bbbbfb82af4fb
refs/heads/master: 83157223defe3be490cfea048e83451b6f254216
2 changes: 1 addition & 1 deletion trunk/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
VERSION = 3
PATCHLEVEL = 1
SUBLEVEL = 0
EXTRAVERSION = -rc9
EXTRAVERSION = -rc10
NAME = "Divemaster Edition"

# *DOCUMENTATION*
Expand Down
3 changes: 1 addition & 2 deletions trunk/arch/m68k/emu/nfblock.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ struct nfhd_device {
struct gendisk *disk;
};

static int nfhd_make_request(struct request_queue *queue, struct bio *bio)
static void nfhd_make_request(struct request_queue *queue, struct bio *bio)
{
struct nfhd_device *dev = queue->queuedata;
struct bio_vec *bvec;
Expand All @@ -76,7 +76,6 @@ static int nfhd_make_request(struct request_queue *queue, struct bio *bio)
sec += len;
}
bio_endio(bio, 0);
return 0;
}

static int nfhd_getgeo(struct block_device *bdev, struct hd_geometry *geo)
Expand Down
8 changes: 2 additions & 6 deletions trunk/arch/powerpc/sysdev/axonram.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ axon_ram_irq_handler(int irq, void *dev)
* axon_ram_make_request - make_request() method for block device
* @queue, @bio: see blk_queue_make_request()
*/
static int
static void
axon_ram_make_request(struct request_queue *queue, struct bio *bio)
{
struct axon_ram_bank *bank = bio->bi_bdev->bd_disk->private_data;
Expand All @@ -113,16 +113,14 @@ axon_ram_make_request(struct request_queue *queue, struct bio *bio)
struct bio_vec *vec;
unsigned int transfered;
unsigned short idx;
int rc = 0;

phys_mem = bank->io_addr + (bio->bi_sector << AXON_RAM_SECTOR_SHIFT);
phys_end = bank->io_addr + bank->size;
transfered = 0;
bio_for_each_segment(vec, bio, idx) {
if (unlikely(phys_mem + vec->bv_len > phys_end)) {
bio_io_error(bio);
rc = -ERANGE;
break;
return;
}

user_mem = page_address(vec->bv_page) + vec->bv_offset;
Expand All @@ -135,8 +133,6 @@ axon_ram_make_request(struct request_queue *queue, struct bio *bio)
transfered += vec->bv_len;
}
bio_endio(bio, 0);

return rc;
}

/**
Expand Down
56 changes: 23 additions & 33 deletions trunk/block/blk-cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -768,25 +768,14 @@ static uint64_t blkio_get_stat(struct blkio_group *blkg,
return disk_total;
}

static int blkio_check_dev_num(dev_t dev)
{
int part = 0;
struct gendisk *disk;

disk = get_gendisk(dev, &part);
if (!disk || part)
return -ENODEV;

return 0;
}

static int blkio_policy_parse_and_set(char *buf,
struct blkio_policy_node *newpn, enum blkio_policy_id plid, int fileid)
{
struct gendisk *disk = NULL;
char *s[4], *p, *major_s = NULL, *minor_s = NULL;
int ret;
unsigned long major, minor;
int i = 0;
int i = 0, ret = -EINVAL;
int part;
dev_t dev;
u64 temp;

Expand All @@ -804,37 +793,36 @@ static int blkio_policy_parse_and_set(char *buf,
}

if (i != 2)
return -EINVAL;
goto out;

p = strsep(&s[0], ":");
if (p != NULL)
major_s = p;
else
return -EINVAL;
goto out;

minor_s = s[0];
if (!minor_s)
return -EINVAL;
goto out;

ret = strict_strtoul(major_s, 10, &major);
if (ret)
return -EINVAL;
if (strict_strtoul(major_s, 10, &major))
goto out;

ret = strict_strtoul(minor_s, 10, &minor);
if (ret)
return -EINVAL;
if (strict_strtoul(minor_s, 10, &minor))
goto out;

dev = MKDEV(major, minor);

ret = strict_strtoull(s[1], 10, &temp);
if (ret)
return -EINVAL;
if (strict_strtoull(s[1], 10, &temp))
goto out;

/* For rule removal, do not check for device presence. */
if (temp) {
ret = blkio_check_dev_num(dev);
if (ret)
return ret;
disk = get_gendisk(dev, &part);
if (!disk || part) {
ret = -ENODEV;
goto out;
}
}

newpn->dev = dev;
Expand All @@ -843,7 +831,7 @@ static int blkio_policy_parse_and_set(char *buf,
case BLKIO_POLICY_PROP:
if ((temp < BLKIO_WEIGHT_MIN && temp > 0) ||
temp > BLKIO_WEIGHT_MAX)
return -EINVAL;
goto out;

newpn->plid = plid;
newpn->fileid = fileid;
Expand All @@ -860,7 +848,7 @@ static int blkio_policy_parse_and_set(char *buf,
case BLKIO_THROTL_read_iops_device:
case BLKIO_THROTL_write_iops_device:
if (temp > THROTL_IOPS_MAX)
return -EINVAL;
goto out;

newpn->plid = plid;
newpn->fileid = fileid;
Expand All @@ -871,8 +859,10 @@ static int blkio_policy_parse_and_set(char *buf,
default:
BUG();
}

return 0;
ret = 0;
out:
put_disk(disk);
return ret;
}

unsigned int blkcg_get_weight(struct blkio_cgroup *blkcg,
Expand Down
2 changes: 1 addition & 1 deletion trunk/block/blk-cgroup.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ struct blkio_policy_node {
union {
unsigned int weight;
/*
* Rate read/write in terms of byptes per second
* Rate read/write in terms of bytes per second
* Whether this rate represents read or write is determined
* by file type "fileid".
*/
Expand Down
Loading

0 comments on commit fc53738

Please sign in to comment.