elevator.c (da6c5c720c52cc717124f8f0830b710ea6a092fd) | elevator.c (1f98a13f623e0ef666690a18c1250335fc6d7ef1) |
---|---|
1/* 2 * Block device elevator/IO-scheduler. 3 * 4 * Copyright (C) 2000 Andrea Arcangeli <andrea@suse.de> SuSE 5 * 6 * 30042000 Jens Axboe <axboe@kernel.dk> : 7 * 8 * Split the elevator a bit so that it is possible to choose a different --- 65 unchanged lines hidden (view full) --- 74int elv_rq_merge_ok(struct request *rq, struct bio *bio) 75{ 76 if (!rq_mergeable(rq)) 77 return 0; 78 79 /* 80 * Don't merge file system requests and discard requests 81 */ | 1/* 2 * Block device elevator/IO-scheduler. 3 * 4 * Copyright (C) 2000 Andrea Arcangeli <andrea@suse.de> SuSE 5 * 6 * 30042000 Jens Axboe <axboe@kernel.dk> : 7 * 8 * Split the elevator a bit so that it is possible to choose a different --- 65 unchanged lines hidden (view full) --- 74int elv_rq_merge_ok(struct request *rq, struct bio *bio) 75{ 76 if (!rq_mergeable(rq)) 77 return 0; 78 79 /* 80 * Don't merge file system requests and discard requests 81 */ |
82 if (bio_discard(bio) != bio_discard(rq->bio)) | 82 if (bio_rw_flagged(bio, BIO_RW_DISCARD) != 83 bio_rw_flagged(rq->bio, BIO_RW_DISCARD)) |
83 return 0; 84 85 /* 86 * different data direction or already started, don't merge 87 */ 88 if (bio_data_dir(bio) != rq_data_dir(rq)) 89 return 0; 90 --- 1037 unchanged lines hidden --- | 84 return 0; 85 86 /* 87 * different data direction or already started, don't merge 88 */ 89 if (bio_data_dir(bio) != rq_data_dir(rq)) 90 return 0; 91 --- 1037 unchanged lines hidden --- |