* [PATCH] remove use of get_gendisk in blkfront
@ 2005-09-02 8:28 Xiaofeng Ling
2005-11-09 3:53 ` Jeremy Katz
0 siblings, 1 reply; 5+ messages in thread
From: Xiaofeng Ling @ 2005-09-02 8:28 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1: Type: text/plain, Size: 283 bytes --]
remove use of get_gendisk in blkfront
gen_gendisk is no long exported by 2.6 kernel. this patch remove the
call of get_gendisk by saving the gd point in blkfront_info in vbd.c so
that blkfront can be built as kerenl module.
Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
[-- Attachment #2: get_gendisk.patch --]
[-- Type: text/x-patch, Size: 1485 bytes --]
diff -r 864434653dab linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c
--- a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c
+++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c
@@ -660,6 +651,7 @@
info->vdevice = vdevice;
info->connected = BLKIF_STATE_DISCONNECTED;
info->mi = NULL;
+ info->gd = NULL;
INIT_WORK(&info->work, blkif_restart_queue, (void *)info);
info->shadow_free = 0;
diff -r 864434653dab linux-2.6-xen-sparse/drivers/xen/blkfront/block.h
--- a/linux-2.6-xen-sparse/drivers/xen/blkfront/block.h
+++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/block.h
@@ -115,6 +115,7 @@
/* We watch the backend */
struct xenbus_watch watch;
dev_t dev;
+ struct gendisk *gd;
int vdevice;
blkif_vdev_t handle;
int connected;
diff -r 864434653dab linux-2.6-xen-sparse/drivers/xen/blkfront/vbd.c
--- a/linux-2.6-xen-sparse/drivers/xen/blkfront/vbd.c
+++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/vbd.c
@@ -266,6 +257,7 @@
gd->flags |= GENHD_FL_CD;
add_disk(gd);
+ info->gd = gd;
return 0;
@@ -298,23 +290,19 @@
void
xlvbd_del(struct blkfront_info *info)
{
- struct block_device *bd;
struct gendisk *gd;
int unused;
request_queue_t *rq;
- bd = bdget(info->dev);
- if (bd == NULL)
+ gd = info->gd;
+ if (gd == NULL)
return;
- gd = get_gendisk(info->dev, &unused);
rq = gd->queue;
-
del_gendisk(gd);
put_disk(gd);
xlbd_put_major_info(info->mi);
info->mi = NULL;
blk_cleanup_queue(rq);
- bdput(bd);
-}
+}
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] remove use of get_gendisk in blkfront
2005-09-02 8:28 [PATCH] remove use of get_gendisk in blkfront Xiaofeng Ling
@ 2005-11-09 3:53 ` Jeremy Katz
0 siblings, 0 replies; 5+ messages in thread
From: Jeremy Katz @ 2005-11-09 3:53 UTC (permalink / raw)
To: xen-devel@lists.xensource.com; +Cc: Ian Pratt
[-- Attachment #1: Type: text/plain, Size: 610 bytes --]
On Fri, 2005-09-02 at 16:28 +0800, Xiaofeng Ling wrote:
> remove use of get_gendisk in blkfront
> gen_gendisk is no long exported by 2.6 kernel. this patch remove the
> call of get_gendisk by saving the gd point in blkfront_info in vbd.c so
> that blkfront can be built as kerenl module.
>
> Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
This looks correct to me and helps in building blkfront as a module.
Any chance of getting it committed? I've gone ahead and rediffed
against the current tip and cleaned up the warnings. Attached here.
Signed-off-by: Jeremy Katz <katzj@redhat.com>
Jeremy
[-- Attachment #2: xen-get-gendisk.patch --]
[-- Type: text/x-patch, Size: 1704 bytes --]
diff -r abbe3df33774 linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c
--- a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c Tue Nov 8 17:39:58 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c Tue Nov 8 22:49:53 2005
@@ -641,6 +641,7 @@
info->vdevice = vdevice;
info->connected = BLKIF_STATE_DISCONNECTED;
info->mi = NULL;
+ info->gd = NULL;
INIT_WORK(&info->work, blkif_restart_queue, (void *)info);
info->shadow_free = 0;
diff -r abbe3df33774 linux-2.6-xen-sparse/drivers/xen/blkfront/block.h
--- a/linux-2.6-xen-sparse/drivers/xen/blkfront/block.h Tue Nov 8 17:39:58 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/block.h Tue Nov 8 22:49:53 2005
@@ -116,6 +116,7 @@
/* We watch the backend */
struct xenbus_watch watch;
dev_t dev;
+ struct gendisk *gd;
int vdevice;
blkif_vdev_t handle;
int connected;
diff -r abbe3df33774 linux-2.6-xen-sparse/drivers/xen/blkfront/vbd.c
--- a/linux-2.6-xen-sparse/drivers/xen/blkfront/vbd.c Tue Nov 8 17:39:58 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/vbd.c Tue Nov 8 22:49:53 2005
@@ -259,6 +259,7 @@
gd->flags |= GENHD_FL_CD;
add_disk(gd);
+ info->gd = gd;
return 0;
@@ -292,22 +293,19 @@
xlvbd_del(struct blkfront_info *info)
{
struct block_device *bd;
- struct gendisk *gd;
- int unused;
- request_queue_t *rq;
bd = bdget(info->dev);
if (bd == NULL)
return;
- gd = get_gendisk(info->dev, &unused);
- rq = gd->queue;
-
- del_gendisk(gd);
- put_disk(gd);
+ if (info->gd == NULL)
+ return;
+
+ del_gendisk(info->gd);
+ put_disk(info->gd);
xlbd_put_major_info(info->mi);
info->mi = NULL;
- blk_cleanup_queue(rq);
+ blk_cleanup_queue(info->rq);
bdput(bd);
}
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] remove use of get_gendisk in blkfront
@ 2005-11-09 10:48 Ian Pratt
2005-11-09 13:59 ` Josh Boyer
0 siblings, 1 reply; 5+ messages in thread
From: Ian Pratt @ 2005-11-09 10:48 UTC (permalink / raw)
To: Jeremy Katz, xen-devel; +Cc: Ian Pratt
> On Fri, 2005-09-02 at 16:28 +0800, Xiaofeng Ling wrote:
> > remove use of get_gendisk in blkfront
> > gen_gendisk is no long exported by 2.6 kernel. this patch
> remove the
> > call of get_gendisk by saving the gd point in blkfront_info
> in vbd.c
> > so that blkfront can be built as kerenl module.
> >
> > Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
>
> This looks correct to me and helps in building blkfront as a module.
> Any chance of getting it committed? I've gone ahead and
> rediffed against the current tip and cleaned up the warnings.
> Attached here.
Looks good to me -- AFAIK it was only dropped by accident first time
around.
Folks: if you submit a patch for inclusion please keep resending every
48h until you get some kind of response or it's committed.
[Aside: it would be really nice if there was some tool that pulled
patches off a mailing list and fed them into something like bugzilla,
along with all the coments associated with a patch. It should also watch
the changelog list and update the status as 'APPLIED' when appropriate.
At any time an author could withdraw/supercede a patch, and a maintainer
could reject/keep-on-file. A really smart system would also keep patches
fresh by trying to rebase them, or at least note if they still apply
cleanly.]
Thanks,
Ian
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] remove use of get_gendisk in blkfront
2005-11-09 10:48 Ian Pratt
@ 2005-11-09 13:59 ` Josh Boyer
0 siblings, 0 replies; 5+ messages in thread
From: Josh Boyer @ 2005-11-09 13:59 UTC (permalink / raw)
To: Ian Pratt; +Cc: Jeremy Katz, xen-devel, Ian Pratt
On 11/9/05, Ian Pratt <m+Ian.Pratt@cl.cam.ac.uk> wrote:
>
> [Aside: it would be really nice if there was some tool that pulled
> patches off a mailing list and fed them into something like bugzilla,
> along with all the coments associated with a patch. It should also watch
> the changelog list and update the status as 'APPLIED' when appropriate.
> At any time an author could withdraw/supercede a patch, and a maintainer
> could reject/keep-on-file. A really smart system would also keep patches
> fresh by trying to rebase them, or at least note if they still apply
> cleanly.]
Jeremy Kerr wrote a tool called patchwork that sort of does that.
It's not nearly as full featured as you'd like, but the basic idea is
there.
The project page is at:
http://www.ozlabs.org/~jk/projects/patchwork/
And an example of it running is at:
http://patchwork.ozlabs.org/linuxppc64/
josh
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] remove use of get_gendisk in blkfront
@ 2005-11-10 1:20 Ling, Xiaofeng
0 siblings, 0 replies; 5+ messages in thread
From: Ling, Xiaofeng @ 2005-11-10 1:20 UTC (permalink / raw)
To: Ian Pratt, Jeremy Katz, xen-devel; +Cc: Ian Pratt
Ian, this is one of the patches to enable para-driver in unmodified linux.
how about the other patches now?
Any comments for them?
Ian Pratt <> wrote:
>> On Fri, 2005-09-02 at 16:28 +0800, Xiaofeng Ling wrote:
>>> remove use of get_gendisk in blkfront gen_gendisk is no long
>>> exported by 2.6 kernel. this patch
>> remove the
>>> call of get_gendisk by saving the gd point in blkfront_info in vbd.c
>>> so that blkfront can be built as kerenl module.
>>>
>>> Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
>>
>> This looks correct to me and helps in building blkfront as a module.
>> Any chance of getting it committed? I've gone ahead and rediffed
>> against the current tip and cleaned up the warnings.
>> Attached here.
>
> Looks good to me -- AFAIK it was only dropped by accident first time
> around.
>
> Folks: if you submit a patch for inclusion please keep resending
> every 48h until you get some kind of response or it's committed.
>
> [Aside: it would be really nice if there was some tool that pulled
> patches off a mailing list and fed them into something like bugzilla,
> along with all the coments associated with a patch. It should also
> watch the changelog list and update the status as 'APPLIED' when
> appropriate. At any time an author could withdraw/supercede a patch,
> and a maintainer could reject/keep-on-file. A really smart system
> would also keep patches fresh by trying to rebase them, or at least
> note if they still apply cleanly.]
>
> Thanks,
> Ian
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-11-10 1:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-02 8:28 [PATCH] remove use of get_gendisk in blkfront Xiaofeng Ling
2005-11-09 3:53 ` Jeremy Katz
-- strict thread matches above, loose matches on Subject: below --
2005-11-09 10:48 Ian Pratt
2005-11-09 13:59 ` Josh Boyer
2005-11-10 1:20 Ling, Xiaofeng
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.