* [PATCH,RFC] initrd vs. BLKFLSBUF
@ 2000-11-20 3:21 Werner Almesberger
2000-11-20 7:36 ` Jeff Chua
2000-12-11 11:50 ` Jeff Chua
0 siblings, 2 replies; 6+ messages in thread
From: Werner Almesberger @ 2000-11-20 3:21 UTC (permalink / raw)
To: viro; +Cc: jchua, linux-kernel
Hi Al,
Jeff Chua reported a while ago that BLKFLSBUF returns EBUSY on a RAM disk
that was obtained via initrd. I think the problem is that the effect of
the blkdev_open(out_inode, ...) in drivers/block/rd.c:rd_load_image is
not undone at the end. I've attached a patch for 2.4.0-test11-pre7 that
seems to solve the problem. Since I'm not quite sure I understand the
reference counting rules there, I would appreciate your comment.
Thanks,
- Werner
---------------------------------- cut here -----------------------------------
--- linux.orig/drivers/block/rd.c Mon Nov 20 02:07:47 2000
+++ linux/drivers/block/rd.c Mon Nov 20 04:03:42 2000
@@ -690,6 +690,7 @@
done:
if (infile.f_op->release)
infile.f_op->release(inode, &infile);
+ blkdev_put(out_inode->i_bdev, BDEV_FILE);
set_fs(fs);
return;
free_inodes: /* free inodes on error */
--
_________________________________________________________________________
/ Werner Almesberger, ICA, EPFL, CH Werner.Almesberger@epfl.ch /
/_IN_N_032__Tel_+41_21_693_6621__Fax_+41_21_693_6610_____________________/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH,RFC] initrd vs. BLKFLSBUF
2000-11-20 3:21 [PATCH,RFC] initrd vs. BLKFLSBUF Werner Almesberger
@ 2000-11-20 7:36 ` Jeff Chua
2000-12-11 11:50 ` Jeff Chua
1 sibling, 0 replies; 6+ messages in thread
From: Jeff Chua @ 2000-11-20 7:36 UTC (permalink / raw)
To: Werner Almesberger, viro; +Cc: linux-kernel
Werner,
Thanks for fix. Applied the patch and it's working now.
Linus, please add this patch to the kernel source codes for 2.4.0.
Under 2.2.18, it's working fine without the patch.
Thanks,
Jeff
[ jchua@fedex.com ]
----- Original Message -----
From: "Werner Almesberger" <Werner.Almesberger@epfl.ch>
To: <viro@math.psu.edu>
Cc: <jchua@fedex.com>; <linux-kernel@vger.kernel.org>
Sent: Monday, November 20, 2000 11:21 AM
Subject: [PATCH,RFC] initrd vs. BLKFLSBUF
Hi Al,
Jeff Chua reported a while ago that BLKFLSBUF returns EBUSY on a RAM disk
that was obtained via initrd. I think the problem is that the effect of
the blkdev_open(out_inode, ...) in drivers/block/rd.c:rd_load_image is
not undone at the end. I've attached a patch for 2.4.0-test11-pre7 that
seems to solve the problem. Since I'm not quite sure I understand the
reference counting rules there, I would appreciate your comment.
Thanks,
- Werner
---------------------------------- cut
here -----------------------------------
--- linux.orig/drivers/block/rd.c Mon Nov 20 02:07:47 2000
+++ linux/drivers/block/rd.c Mon Nov 20 04:03:42 2000
@@ -690,6 +690,7 @@
done:
if (infile.f_op->release)
infile.f_op->release(inode, &infile);
+ blkdev_put(out_inode->i_bdev, BDEV_FILE);
set_fs(fs);
return;
free_inodes: /* free inodes on error */
--
_________________________________________________________________________
/ Werner Almesberger, ICA, EPFL, CH Werner.Almesberger@epfl.ch /
/_IN_N_032__Tel_+41_21_693_6621__Fax_+41_21_693_6610_____________________/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH,RFC] initrd vs. BLKFLSBUF
2000-11-20 3:21 [PATCH,RFC] initrd vs. BLKFLSBUF Werner Almesberger
2000-11-20 7:36 ` Jeff Chua
@ 2000-12-11 11:50 ` Jeff Chua
2000-12-11 15:00 ` Werner Almesberger
1 sibling, 1 reply; 6+ messages in thread
From: Jeff Chua @ 2000-12-11 11:50 UTC (permalink / raw)
To: Werner Almesberger, viro; +Cc: linux-kernel
I'm posting this again hoping that it'll get incorporated into the kernel.
I've tested the patch against 2.4.0-test12-pre8, and it's working fine.
Thanks,
Jeff
[ jchua@fedex.com ]
----- Original Message -----
From: "Werner Almesberger" <Werner.Almesberger@epfl.ch>
To: <viro@math.psu.edu>
Cc: <jchua@fedex.com>; <linux-kernel@vger.kernel.org>
Sent: Monday, November 20, 2000 11:21 AM
Subject: [PATCH,RFC] initrd vs. BLKFLSBUF
Hi Al,
Jeff Chua reported a while ago that BLKFLSBUF returns EBUSY on a RAM disk
that was obtained via initrd. I think the problem is that the effect of
the blkdev_open(out_inode, ...) in drivers/block/rd.c:rd_load_image is
not undone at the end. I've attached a patch for 2.4.0-test11-pre7 that
seems to solve the problem. Since I'm not quite sure I understand the
reference counting rules there, I would appreciate your comment.
Thanks,
- Werner
---------------------------------- cut
here -----------------------------------
--- linux.orig/drivers/block/rd.c Mon Nov 20 02:07:47 2000
+++ linux/drivers/block/rd.c Mon Nov 20 04:03:42 2000
@@ -690,6 +690,7 @@
done:
if (infile.f_op->release)
infile.f_op->release(inode, &infile);
+ blkdev_put(out_inode->i_bdev, BDEV_FILE);
set_fs(fs);
return;
free_inodes: /* free inodes on error */
--
_________________________________________________________________________
/ Werner Almesberger, ICA, EPFL, CH Werner.Almesberger@epfl.ch /
/_IN_N_032__Tel_+41_21_693_6621__Fax_+41_21_693_6610_____________________/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH,RFC] initrd vs. BLKFLSBUF
@ 2000-12-11 11:59 Jeff Chua
0 siblings, 0 replies; 6+ messages in thread
From: Jeff Chua @ 2000-12-11 11:59 UTC (permalink / raw)
To: Jeff Chua, Werner Almesberger, viro; +Cc: linux-kernel
I'm posting this again hoping that it'll get incorporated into the kernel.
I've tested the patch against 2.4.0-test12-pre8, and it's working fine.
Thanks,
Jeff
[ jchua@fedex.com ]
----- Original Message -----
From: "Werner Almesberger" <Werner.Almesberger@epfl.ch>
To: <viro@math.psu.edu>
Cc: <jchua@fedex.com>; <linux-kernel@vger.kernel.org>
Sent: Monday, November 20, 2000 11:21 AM
Subject: [PATCH,RFC] initrd vs. BLKFLSBUF
Hi Al,
Jeff Chua reported a while ago that BLKFLSBUF returns EBUSY on a RAM disk
that was obtained via initrd. I think the problem is that the effect of
the blkdev_open(out_inode, ...) in drivers/block/rd.c:rd_load_image is
not undone at the end. I've attached a patch for 2.4.0-test11-pre7 that
seems to solve the problem. Since I'm not quite sure I understand the
reference counting rules there, I would appreciate your comment.
Thanks,
- Werner
---------------------------------- cut
here -----------------------------------
--- linux.orig/drivers/block/rd.c Mon Nov 20 02:07:47 2000
+++ linux/drivers/block/rd.c Mon Nov 20 04:03:42 2000
@@ -690,6 +690,7 @@
done:
if (infile.f_op->release)
infile.f_op->release(inode, &infile);
+ blkdev_put(out_inode->i_bdev, BDEV_FILE);
set_fs(fs);
return;
free_inodes: /* free inodes on error */
--
_________________________________________________________________________
/ Werner Almesberger, ICA, EPFL, CH Werner.Almesberger@epfl.ch /
/_IN_N_032__Tel_+41_21_693_6621__Fax_+41_21_693_6610_____________________/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH,RFC] initrd vs. BLKFLSBUF
2000-12-11 11:50 ` Jeff Chua
@ 2000-12-11 15:00 ` Werner Almesberger
0 siblings, 0 replies; 6+ messages in thread
From: Werner Almesberger @ 2000-12-11 15:00 UTC (permalink / raw)
To: Jeff Chua; +Cc: viro, linux-kernel
Jeff Chua wrote:
> I'm posting this again hoping that it'll get incorporated into the kernel.
It's already in Alan's tree (e.g. patch-2.4.0test11-ac1.bz2) and should
find its way from there into Linus' tree soon (i.e. probably by test12).
- Werner
--
_________________________________________________________________________
/ Werner Almesberger, ICA, EPFL, CH Werner.Almesberger@epfl.ch /
/_IN_N_032__Tel_+41_21_693_6621__Fax_+41_21_693_6610_____________________/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH,RFC] initrd vs. BLKFLSBUF
@ 2001-01-01 7:36 Jeff Chua
0 siblings, 0 replies; 6+ messages in thread
From: Jeff Chua @ 2001-01-01 7:36 UTC (permalink / raw)
To: linus, Werner.Almesberger, viro, linux-kernel, jchua
Linus,
Happy new year.
I hope that the following patch will be included in the final 2.4.0 release.
Without it, the memory held by initrd ramdisk will never be freed!!!
Thanks,
Jeff
From: "Werner Almesberger" <Werner.Almesberger@epfl.ch>
To: <viro@math.psu.edu>
Cc: <jchua@fedex.com>; <linux-kernel@vger.kernel.org>
Sent: Monday, November 20, 2000 11:21 AM
Subject: [PATCH,RFC] initrd vs. BLKFLSBUF
Hi Al,
Jeff Chua reported a while ago that BLKFLSBUF returns EBUSY on a RAM disk
that was obtained via initrd. I think the problem is that the effect of
the blkdev_open(out_inode, ...) in drivers/block/rd.c:rd_load_image is
not undone at the end. I've attached a patch for 2.4.0-test11-pre7 that
seems to solve the problem. Since I'm not quite sure I understand the
reference counting rules there, I would appreciate your comment.
Thanks,
- Werner
---------------------------------- cut here -----------------------------------
--- linux.orig/drivers/block/rd.c Mon Nov 20 02:07:47 2000
+++ linux/drivers/block/rd.c Mon Nov 20 04:03:42 2000
@@ -690,6 +690,7 @@
done:
if (infile.f_op->release)
infile.f_op->release(inode, &infile);
+ blkdev_put(out_inode->i_bdev, BDEV_FILE);
set_fs(fs);
return;
free_inodes: /* free inodes on error */
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2001-01-01 8:11 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-11-20 3:21 [PATCH,RFC] initrd vs. BLKFLSBUF Werner Almesberger
2000-11-20 7:36 ` Jeff Chua
2000-12-11 11:50 ` Jeff Chua
2000-12-11 15:00 ` Werner Almesberger
-- strict thread matches above, loose matches on Subject: below --
2000-12-11 11:59 Jeff Chua
2001-01-01 7:36 Jeff Chua
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox