Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 17087
b: refs/heads/master
c: e2688f0
h: refs/heads/master
i:
  17085: 941e8bf
  17083: d611adc
  17079: 762e77b
  17071: 68593e2
  17055: 4e606d0
  17023: 4535d02
v: v3
  • Loading branch information
Linus Torvalds committed Jan 9, 2006
1 parent 8e1fc21 commit 5a1a2ae
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 45 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: a9925a06ea52a44b4bf4a941342e8240eaf22417
refs/heads/master: e2688f00dc0ceb9d9867434dffbd080411fc23b0
3 changes: 1 addition & 2 deletions trunk/block/elevator.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ inline int elv_rq_merge_ok(struct request *rq, struct bio *bio)
}
EXPORT_SYMBOL(elv_rq_merge_ok);

inline int elv_try_merge(struct request *__rq, struct bio *bio)
static inline int elv_try_merge(struct request *__rq, struct bio *bio)
{
int ret = ELEVATOR_NO_MERGE;

Expand All @@ -80,7 +80,6 @@ inline int elv_try_merge(struct request *__rq, struct bio *bio)

return ret;
}
EXPORT_SYMBOL(elv_try_merge);

static struct elevator_type *elevator_find(const char *name)
{
Expand Down
25 changes: 0 additions & 25 deletions trunk/block/ll_rw_blk.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include <linux/slab.h>
#include <linux/swap.h>
#include <linux/writeback.h>
#include <linux/blkdev.h>
#include <linux/interrupt.h>
#include <linux/cpu.h>

Expand Down Expand Up @@ -2748,30 +2747,6 @@ static inline int attempt_front_merge(request_queue_t *q, struct request *rq)
return 0;
}

/**
* blk_attempt_remerge - attempt to remerge active head with next request
* @q: The &request_queue_t belonging to the device
* @rq: The head request (usually)
*
* Description:
* For head-active devices, the queue can easily be unplugged so quickly
* that proper merging is not done on the front request. This may hurt
* performance greatly for some devices. The block layer cannot safely
* do merging on that first request for these queues, but the driver can
* call this function and make it happen any way. Only the driver knows
* when it is safe to do so.
**/
void blk_attempt_remerge(request_queue_t *q, struct request *rq)
{
unsigned long flags;

spin_lock_irqsave(q->queue_lock, flags);
attempt_back_merge(q, rq);
spin_unlock_irqrestore(q->queue_lock, flags);
}

EXPORT_SYMBOL(blk_attempt_remerge);

static void init_request_from_bio(struct request *req, struct bio *bio)
{
req->flags |= REQ_CMD;
Expand Down
13 changes: 9 additions & 4 deletions trunk/block/scsi_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,16 +190,21 @@ static int verify_command(struct file *file, unsigned char *cmd)
safe_for_write(GPCMD_SET_STREAMING),
};
unsigned char type = cmd_type[cmd[0]];
int has_write_perm = 0;

/* Anybody who can open the device can do a read-safe command */
if (type & CMD_READ_SAFE)
return 0;

/*
* file can be NULL from ioctl_by_bdev()...
*/
if (file)
has_write_perm = file->f_mode & FMODE_WRITE;

/* Write-safe commands just require a writable open.. */
if (type & CMD_WRITE_SAFE) {
if (file->f_mode & FMODE_WRITE)
return 0;
}
if ((type & CMD_WRITE_SAFE) && has_write_perm)
return 0;

/* And root can do any command.. */
if (capable(CAP_SYS_RAWIO))
Expand Down
10 changes: 0 additions & 10 deletions trunk/drivers/ide/ide-cd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1332,8 +1332,6 @@ static ide_startstop_t cdrom_start_read (ide_drive_t *drive, unsigned int block)
if (cdrom_read_from_buffer(drive))
return ide_stopped;

blk_attempt_remerge(drive->queue, rq);

/* Clear the local sector buffer. */
info->nsectors_buffered = 0;

Expand Down Expand Up @@ -1874,14 +1872,6 @@ static ide_startstop_t cdrom_start_write(ide_drive_t *drive, struct request *rq)
return ide_stopped;
}

/*
* for dvd-ram and such media, it's a really big deal to get
* big writes all the time. so scour the queue and attempt to
* remerge requests, often the plugging will not have had time
* to do this properly
*/
blk_attempt_remerge(drive->queue, rq);

info->nsectors_buffered = 0;

/* use dma, if possible. we don't need to check more, since we
Expand Down
1 change: 1 addition & 0 deletions trunk/fs/bio.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ static void bio_fs_destructor(struct bio *bio)
inline void bio_init(struct bio *bio)
{
bio->bi_next = NULL;
bio->bi_bdev = NULL;
bio->bi_flags = 1 << BIO_UPTODATE;
bio->bi_rw = 0;
bio->bi_vcnt = 0;
Expand Down
1 change: 0 additions & 1 deletion trunk/include/linux/blkdev.h
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,6 @@ extern void generic_make_request(struct bio *bio);
extern void blk_put_request(struct request *);
extern void __blk_put_request(request_queue_t *, struct request *);
extern void blk_end_sync_rq(struct request *rq, int error);
extern void blk_attempt_remerge(request_queue_t *, struct request *);
extern struct request *blk_get_request(request_queue_t *, int, gfp_t);
extern void blk_insert_request(request_queue_t *, struct request *, int, void *);
extern void blk_requeue_request(request_queue_t *, struct request *);
Expand Down
2 changes: 0 additions & 2 deletions trunk/include/linux/elevator.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,6 @@ extern ssize_t elv_iosched_store(request_queue_t *, const char *, size_t);
extern int elevator_init(request_queue_t *, char *);
extern void elevator_exit(elevator_t *);
extern int elv_rq_merge_ok(struct request *, struct bio *);
extern int elv_try_merge(struct request *, struct bio *);
extern int elv_try_last_merge(request_queue_t *, struct bio *);

/*
* Return values from elevator merger
Expand Down

0 comments on commit 5a1a2ae

Please sign in to comment.