Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 721a9602 authored by Jens Axboe's avatar Jens Axboe
Browse files

block: kill off REQ_UNPLUG



With the plugging now being explicitly controlled by the
submitter, callers need not pass down unplugging hints
to the block layer. If they want to unplug, it's because they
manually plugged on their own - in which case, they should just
unplug at will.

Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
parent cf15900e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1290,7 +1290,7 @@ static int __make_request(struct request_queue *q, struct bio *bio)
	}

	plug = current->plug;
	if (plug && !sync) {
	if (plug) {
		if (!plug->should_sort && !list_empty(&plug->list)) {
			struct request *__rq;

+1 −1
Original line number Diff line number Diff line
@@ -80,7 +80,7 @@ static int _drbd_md_sync_page_io(struct drbd_conf *mdev,

	if ((rw & WRITE) && !test_bit(MD_NO_FUA, &mdev->flags))
		rw |= REQ_FUA;
	rw |= REQ_UNPLUG | REQ_SYNC;
	rw |= REQ_SYNC;

	bio = bio_alloc(GFP_NOIO, 1);
	bio->bi_bdev = bdev->md_bdev;
+1 −1
Original line number Diff line number Diff line
@@ -377,7 +377,7 @@ union p_header {
#define DP_HARDBARRIER	      1 /* depricated */
#define DP_RW_SYNC	      2 /* equals REQ_SYNC    */
#define DP_MAY_SET_IN_SYNC    4
#define DP_UNPLUG             8 /* equals REQ_UNPLUG  */
#define DP_UNPLUG             8 /* not used anymore   */
#define DP_FUA               16 /* equals REQ_FUA     */
#define DP_FLUSH             32 /* equals REQ_FLUSH   */
#define DP_DISCARD           64 /* equals REQ_DISCARD */
+1 −2
Original line number Diff line number Diff line
@@ -2477,12 +2477,11 @@ static u32 bio_flags_to_wire(struct drbd_conf *mdev, unsigned long bi_rw)
{
	if (mdev->agreed_pro_version >= 95)
		return  (bi_rw & REQ_SYNC ? DP_RW_SYNC : 0) |
			(bi_rw & REQ_UNPLUG ? DP_UNPLUG : 0) |
			(bi_rw & REQ_FUA ? DP_FUA : 0) |
			(bi_rw & REQ_FLUSH ? DP_FLUSH : 0) |
			(bi_rw & REQ_DISCARD ? DP_DISCARD : 0);
	else
		return bi_rw & (REQ_SYNC | REQ_UNPLUG) ? DP_RW_SYNC : 0;
		return bi_rw & REQ_SYNC ? DP_RW_SYNC : 0;
}

/* Used to send write requests
+1 −8
Original line number Diff line number Diff line
@@ -1100,8 +1100,6 @@ int drbd_submit_ee(struct drbd_conf *mdev, struct drbd_epoch_entry *e,
	/* > e->sector, unless this is the first bio */
	bio->bi_sector = sector;
	bio->bi_bdev = mdev->ldev->backing_bdev;
	/* we special case some flags in the multi-bio case, see below
	 * (REQ_UNPLUG) */
	bio->bi_rw = rw;
	bio->bi_private = e;
	bio->bi_end_io = drbd_endio_sec;
@@ -1130,10 +1128,6 @@ int drbd_submit_ee(struct drbd_conf *mdev, struct drbd_epoch_entry *e,
		bios = bios->bi_next;
		bio->bi_next = NULL;

		/* strip off REQ_UNPLUG unless it is the last bio */
		if (bios)
			bio->bi_rw &= ~REQ_UNPLUG;

		drbd_generic_make_request(mdev, fault_type, bio);
	} while (bios);
	return 0;
@@ -1621,12 +1615,11 @@ static unsigned long write_flags_to_bio(struct drbd_conf *mdev, u32 dpf)
{
	if (mdev->agreed_pro_version >= 95)
		return  (dpf & DP_RW_SYNC ? REQ_SYNC : 0) |
			(dpf & DP_UNPLUG ? REQ_UNPLUG : 0) |
			(dpf & DP_FUA ? REQ_FUA : 0) |
			(dpf & DP_FLUSH ? REQ_FUA : 0) |
			(dpf & DP_DISCARD ? REQ_DISCARD : 0);
	else
		return dpf & DP_RW_SYNC ? (REQ_SYNC | REQ_UNPLUG) : 0;
		return dpf & DP_RW_SYNC ? REQ_SYNC : 0;
}

/* mirrored write */
Loading