FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Kernel Team

 
 
LinkBack Thread Tools
 
Old 05-17-2011, 03:45 PM
Stefan Bader
 
Default UBUNTU: iscsitarget: Convert to new plugging method

The block device plugging used to be per-queue and implicitly
done when requests where added to an empty queue. Now callers
have to plug and unplug per-task.

This fixes a FTBS with 2.6.39 kernel code.

Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
---
debian.master/config/config.common.ubuntu | 2 +-
ubuntu/iscsitarget/block-io.c | 6 ++++--
2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/debian.master/config/config.common.ubuntu b/debian.master/config/config.common.ubuntu
index cc4c4fe..12ddcdd 100644
--- a/debian.master/config/config.common.ubuntu
+++ b/debian.master/config/config.common.ubuntu
@@ -4096,7 +4096,7 @@ CONFIG_SCSI_IN2000=m
CONFIG_SCSI_INIA100=m
CONFIG_SCSI_INITIO=m
CONFIG_SCSI_IPS=m
-# CONFIG_SCSI_ISCSITARGET is not set
+CONFIG_SCSI_ISCSITARGET=m
CONFIG_SCSI_ISCSI_ATTRS=m
# CONFIG_SCSI_IZIP_EPP16 is not set
# CONFIG_SCSI_IZIP_SLOW_CTR is not set
diff --git a/ubuntu/iscsitarget/block-io.c b/ubuntu/iscsitarget/block-io.c
index 3e7de38..e3c9e19 100644
--- a/ubuntu/iscsitarget/block-io.c
+++ b/ubuntu/iscsitarget/block-io.c
@@ -56,6 +56,7 @@ blockio_make_request(struct iet_volume *volume, struct tio *tio, int rw)
struct request_queue *bdev_q = bdev_get_queue(bio_data->bdev);
struct tio_work *tio_work;
struct bio *tio_bio = NULL, *bio = NULL, *biotail = NULL;
+ struct blk_plug plug;

u32 offset = tio->offset;
u32 size = tio->size;
@@ -78,6 +79,8 @@ blockio_make_request(struct iet_volume *volume, struct tio *tio, int rw)
atomic_set(&tio_work->bios_remaining, 0);
init_completion(&tio_work->tio_complete);

+ blk_start_plug(&plug);
+
/* Main processing loop, allocate and fill all bios */
while (tio_index < tio->pg_cnt) {
bio = bio_alloc(GFP_KERNEL, min(max_pages, BIO_MAX_PAGES));
@@ -127,8 +130,7 @@ blockio_make_request(struct iet_volume *volume, struct tio *tio, int rw)
submit_bio(rw, bio);
}

- if (bdev_q && bdev_q->unplug_fn)
- bdev_q->unplug_fn(bdev_q);
+ blk_finish_plug(&plug);

wait_for_completion(&tio_work->tio_complete);

--
1.7.0.4


--------------090005050300070606030404
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team

--------------090005050300070606030404--
 
Old 05-17-2011, 03:45 PM
Stefan Bader
 
Default UBUNTU: iscsitarget: Convert to new plugging method

The block device plugging used to be per-queue and implicitly
done when requests where added to an empty queue. Now callers
have to plug and unplug per-task.

This fixes a FTBS with 2.6.39 kernel code.

Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
---
debian.master/config/config.common.ubuntu | 2 +-
ubuntu/iscsitarget/block-io.c | 6 ++++--
2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/debian.master/config/config.common.ubuntu b/debian.master/config/config.common.ubuntu
index cc4c4fe..12ddcdd 100644
--- a/debian.master/config/config.common.ubuntu
+++ b/debian.master/config/config.common.ubuntu
@@ -4096,7 +4096,7 @@ CONFIG_SCSI_IN2000=m
CONFIG_SCSI_INIA100=m
CONFIG_SCSI_INITIO=m
CONFIG_SCSI_IPS=m
-# CONFIG_SCSI_ISCSITARGET is not set
+CONFIG_SCSI_ISCSITARGET=m
CONFIG_SCSI_ISCSI_ATTRS=m
# CONFIG_SCSI_IZIP_EPP16 is not set
# CONFIG_SCSI_IZIP_SLOW_CTR is not set
diff --git a/ubuntu/iscsitarget/block-io.c b/ubuntu/iscsitarget/block-io.c
index 3e7de38..e3c9e19 100644
--- a/ubuntu/iscsitarget/block-io.c
+++ b/ubuntu/iscsitarget/block-io.c
@@ -56,6 +56,7 @@ blockio_make_request(struct iet_volume *volume, struct tio *tio, int rw)
struct request_queue *bdev_q = bdev_get_queue(bio_data->bdev);
struct tio_work *tio_work;
struct bio *tio_bio = NULL, *bio = NULL, *biotail = NULL;
+ struct blk_plug plug;

u32 offset = tio->offset;
u32 size = tio->size;
@@ -78,6 +79,8 @@ blockio_make_request(struct iet_volume *volume, struct tio *tio, int rw)
atomic_set(&tio_work->bios_remaining, 0);
init_completion(&tio_work->tio_complete);

+ blk_start_plug(&plug);
+
/* Main processing loop, allocate and fill all bios */
while (tio_index < tio->pg_cnt) {
bio = bio_alloc(GFP_KERNEL, min(max_pages, BIO_MAX_PAGES));
@@ -127,8 +130,7 @@ blockio_make_request(struct iet_volume *volume, struct tio *tio, int rw)
submit_bio(rw, bio);
}

- if (bdev_q && bdev_q->unplug_fn)
- bdev_q->unplug_fn(bdev_q);
+ blk_finish_plug(&plug);

wait_for_completion(&tio_work->tio_complete);

--
1.7.0.4


--------------090005050300070606030404
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

--
ubuntu-server mailing list
ubuntu-server@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
More info: https://wiki.ubuntu.com/ServerTeam
--------------090005050300070606030404--
 

Thread Tools




All times are GMT. The time now is 09:10 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org